mix automapping with template default location

5 Messages Forum Options Options
Permalink
getagrip
mix automapping with template default location
Reply Threaded More
Print post
Permalink
Hi would it be possible If I used the automapping feature PLUS defining one extra folder where the search for automapped templates begins?
This would mean that click would not start the search in / but in let's say /html =>

src/main/java
src/main/webapp
src/main/webapp/html
src/main/webapp/html/user
src/main/webapp/html/project
src/main/webapp/html/static

Here all templates reside in subfolders of "html". This improves my projectstructure a lot as I can separate css, js, WEB-INF and html from each other.

best, torin
_______________________________________________________________________
EINE FÜR ALLE: die kostenlose WEB.DE-Plattform für Freunde und Deine
Homepage mit eigenem Namen. Jetzt starten! http://unddu.de/?kid=kid@mf2


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Click-user mailing list
Click-user@...
https://lists.sourceforge.net/lists/listinfo/click-user
sabob
Re: mix automapping with template default location
Reply Threaded More
Print post
Permalink
Hi Torin,

You can do this but your Java package would need to reflect the path.

For example:

com.mycorp.page.html


Then in click.xml define your package as:

<click-app>
   <pages package="com.mycorp.page.html"/>
</click-app>

This way Click will pickup your templates from webapp/html

Will this work for you?

kind regards

bob

torin farmer wrote:

> Hi would it be possible If I used the automapping feature PLUS defining one extra folder where the search for automapped templates begins?
> This would mean that click would not start the search in / but in let's say /html =>
>
> src/main/java
> src/main/webapp
> src/main/webapp/html
> src/main/webapp/html/user
> src/main/webapp/html/project
> src/main/webapp/html/static
>
> Here all templates reside in subfolders of "html". This improves my projectstructure a lot as I can separate css, js, WEB-INF and html from each other.
>
> best, torin
> _______________________________________________________________________
> EINE FÜR ALLE: die kostenlose WEB.DE-Plattform für Freunde und Deine
> Homepage mit eigenem Namen. Jetzt starten! http://unddu.de/?kid=kid@mf2
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Click-user mailing list
Click-user@...
https://lists.sourceforge.net/lists/listinfo/click-user
getagrip
Re: mix automapping with template default location
Reply Threaded More
Print post
Permalink


bob wrote:

> Hi Torin,
>
> You can do this but your Java package would need to reflect the path.
>
> For example:
>
> com.mycorp.page.html
>
>
> Then in click.xml define your package as:
>
> <click-app>
>    <pages package="com.mycorp.page.html"/>
> </click-app>
>
> This way Click will pickup your templates from webapp/html
>
> Will this work for you?
>
> kind regards
>
> bob
>
> torin farmer wrote:
>> Hi would it be possible If I used the automapping feature PLUS defining one extra folder where the search for automapped templates begins?
>> This would mean that click would not start the search in / but in let's say /html =>
>>
>> src/main/java
>> src/main/webapp
>> src/main/webapp/html
>> src/main/webapp/html/user
>> src/main/webapp/html/project
>> src/main/webapp/html/static
>>
>> Here all templates reside in subfolders of "html". This improves my projectstructure a lot as I can separate css, js, WEB-INF and html from each other.
>>
>> best, torin
>> _______________________________________________________________________
>> EINE FÜR ALLE: die kostenlose WEB.DE-Plattform für Freunde und Deine
>> Homepage mit eigenem Namen. Jetzt starten! http://unddu.de/?kid=kid@mf2
>>
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
>> Build the coolest Linux based applications with Moblin SDK & win great prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Click-user mailing list
> Click-user@...
> https://lists.sourceforge.net/lists/listinfo/click-user

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Click-user mailing list
Click-user@...
https://lists.sourceforge.net/lists/listinfo/click-user
getagrip
Re: mix automapping with template default location
Reply Threaded More
Print post
Permalink
In reply to this post by sabob
Sorry, the last post came with no content,

 > You can do this but your Java package would need to reflect the path.
That's exactly what I am trying to avoid. So If there's no other way
I'll just stick to the standard implementation.


bob wrote:

> Hi Torin,
>
> You can do this but your Java package would need to reflect the path.
>
> For example:
>
> com.mycorp.page.html
>
>
> Then in click.xml define your package as:
>
> <click-app>
>    <pages package="com.mycorp.page.html"/>
> </click-app>
>
> This way Click will pickup your templates from webapp/html
>
> Will this work for you?
>
> kind regards
>
> bob
>
> torin farmer wrote:
>> Hi would it be possible If I used the automapping feature PLUS defining one extra folder where the search for automapped templates begins?
>> This would mean that click would not start the search in / but in let's say /html =>
>>
>> src/main/java
>> src/main/webapp
>> src/main/webapp/html
>> src/main/webapp/html/user
>> src/main/webapp/html/project
>> src/main/webapp/html/static
>>
>> Here all templates reside in subfolders of "html". This improves my projectstructure a lot as I can separate css, js, WEB-INF and html from each other.
>>
>> best, torin
>> _______________________________________________________________________
>> EINE FÜR ALLE: die kostenlose WEB.DE-Plattform für Freunde und Deine
>> Homepage mit eigenem Namen. Jetzt starten! http://unddu.de/?kid=kid@mf2
>>
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
>> Build the coolest Linux based applications with Moblin SDK & win great prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Click-user mailing list
> Click-user@...
> https://lists.sourceforge.net/lists/listinfo/click-user

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Click-user mailing list
Click-user@...
https://lists.sourceforge.net/lists/listinfo/click-user
sabob
Re: mix automapping with template default location
Reply Threaded More
Print post
Permalink
In reply to this post by getagrip
Hi Torin,

In fact my package was wrong anyway. It should be:

<click-app>
   <pages package="com.mycorp.page"/>
</click-app>

torin farmer wrote:
> Thanks for the fast reply!
> That's exactly what I am trying to avoid as the html folder would only be a convenience-feature to hold all templates. This is not reflected in the package structure so if there is no other way I'll just stick with the momentary implementation.
>  
Click 1.5 provides the interface ConfigService and default
implementation XmlConfigService.

If you really need this feature its always possible to plug in in a
different "template path to pageClass"
lookup strategy. :)

kind regards

bob

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Click-user mailing list
Click-user@...
https://lists.sourceforge.net/lists/listinfo/click-user