You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Carl Pelletier <ca...@yahoo.ca> on 2006/05/25 16:13:23 UTC

Best directory stucture

Hi everyone, I`m starting a project with Tapestry 4.0 and was wondering if someone have recommendation on how to structure my project.

I don`t really understand how Tapestry work with directory. It`s like everything is in the same folder.

For us, it`s doesnt fit to have juste one directory with all the .page .html and component in the same folder.

I know I can specify where are the component by using org.apache.tapestry.component-class-packages but it`s just work for the java files.

Is there a way to specify all this without adding each page in the .application ?

For now, we doing something like:
   <page name="contactHome" specification-path="contact/home.page" />
   <page name="contactList" specification-path="contact/gestionContacts/contactList.page" />
   <page name="contact" specification-path="contact/gestionContacts/contact.page"/>
   <page name="profilCRUD" specification-path="contact/gestionContacts/contact.page" />
   <page name="conjointCRUD" specification-path="contact/gestionContacts/conjointCRUD.page" />
   <page name="adjointCRUD" specification-path="contact/gestionContacts/adjointCRUD.page" />
   <page name="entrepriseCRUD" specification-path="contact/gestionContacts/entrepriseCRUD.page" />
   <page name="consommationCRUD" specification-path="contact/gestionContacts/consommationCRUD.page" />

For each section and sub section. At the end of the project, we will have ~200 pages. It's we be a real mess in the .application, don`t you think ?

Thanks for any advise, help or recommendation!

Really sorry for the bad english, I`m french.

Carl Pelletier


Re: Best directory stucture

Posted by Carl Pelletier <ca...@yahoo.ca>.
Thank you very much, that what I looking for. Sorry to ask a stupid question like that, I scan the Documentation many times, but english is not my natural language and I guess I just never read it like it should be.

Thanks again!

Carl Pelletier

----- Original Message ----
From: Erik Husby <mh...@broad.mit.edu>
To: Tapestry users <us...@tapestry.apache.org>
Sent: Thursday, May 25, 2006 10:34:51 AM
Subject: Re: Best directory stucture

In Tapestry 4, you can put your pages (the .html and .page files) in  
subdirectories that live under WEB-INF. That means that you address  
your pages like "contact/home" or "contact/gestionContacts/contactList"

So your directories would be WEB-INF/contact and WEB-INF/contact/ 
gestionContacts


On May 25, 2006, at 10:16 AM, Rui Pacheco wrote:

> I may be wrong, but I think you can put your .page files under WEB- 
> INF and
> your .html under the context. That way you'll have them separated.
>
> On 5/25/06, Carl Pelletier <ca...@yahoo.ca> wrote:
>>
>> Hi everyone, I`m starting a project with Tapestry 4.0 and was  
>> wondering if
>> someone have recommendation on how to structure my project.
>>
>> I don`t really understand how Tapestry work with directory. It`s like
>> everything is in the same folder.
>>
>> For us, it`s doesnt fit to have juste one directory with all  
>> the .page
>> .html and component in the same folder.
>>
>> I know I can specify where are the component by using
>> org.apache.tapestry.component-class-packages but it`s just work  
>> for the
>> java files.
>>
>> Is there a way to specify all this without adding each page in the
>> .application ?
>>
>> For now, we doing something like:
>>    <page name="contactHome" specification-path="contact/home.page" />
>>    <page name="contactList"
>> specification-path="contact/gestionContacts/contactList.page" />
>>    <page name="contact"
>> specification-path="contact/gestionContacts/contact.page"/>
>>    <page name="profilCRUD"
>> specification-path="contact/gestionContacts/contact.page" />
>>    <page name="conjointCRUD"
>> specification-path="contact/gestionContacts/conjointCRUD.page" />
>>    <page name="adjointCRUD"
>> specification-path="contact/gestionContacts/adjointCRUD.page" />
>>    <page name="entrepriseCRUD"
>> specification-path="contact/gestionContacts/entrepriseCRUD.page" />
>>    <page name="consommationCRUD"
>> specification-path="contact/gestionContacts/consommationCRUD.page" />
>>
>> For each section and sub section. At the end of the project, we  
>> will have
>> ~200 pages. It's we be a real mess in the .application, don`t you  
>> think ?
>>
>> Thanks for any advise, help or recommendation!
>>
>> Really sorry for the bad english, I`m french.
>>
>> Carl Pelletier
>>
>>
>>
>
>
> -- 
> Cumprimentos,
> Rui Pacheco

---
Erik Husby
Senior Software Engineer
Broad Institute of MIT and Harvard
Rm. 2192, 320 Charles St, Cambridge, MA 02141-2023
mobile: 781.354.6669, office: 617.258.9227
email: mhusby@broad.mit.edu AIM: ErikAtBroad





Re: Best directory stucture

Posted by Erik Husby <mh...@broad.mit.edu>.
In Tapestry 4, you can put your pages (the .html and .page files) in  
subdirectories that live under WEB-INF. That means that you address  
your pages like "contact/home" or "contact/gestionContacts/contactList"

So your directories would be WEB-INF/contact and WEB-INF/contact/ 
gestionContacts


On May 25, 2006, at 10:16 AM, Rui Pacheco wrote:

> I may be wrong, but I think you can put your .page files under WEB- 
> INF and
> your .html under the context. That way you'll have them separated.
>
> On 5/25/06, Carl Pelletier <ca...@yahoo.ca> wrote:
>>
>> Hi everyone, I`m starting a project with Tapestry 4.0 and was  
>> wondering if
>> someone have recommendation on how to structure my project.
>>
>> I don`t really understand how Tapestry work with directory. It`s like
>> everything is in the same folder.
>>
>> For us, it`s doesnt fit to have juste one directory with all  
>> the .page
>> .html and component in the same folder.
>>
>> I know I can specify where are the component by using
>> org.apache.tapestry.component-class-packages but it`s just work  
>> for the
>> java files.
>>
>> Is there a way to specify all this without adding each page in the
>> .application ?
>>
>> For now, we doing something like:
>>    <page name="contactHome" specification-path="contact/home.page" />
>>    <page name="contactList"
>> specification-path="contact/gestionContacts/contactList.page" />
>>    <page name="contact"
>> specification-path="contact/gestionContacts/contact.page"/>
>>    <page name="profilCRUD"
>> specification-path="contact/gestionContacts/contact.page" />
>>    <page name="conjointCRUD"
>> specification-path="contact/gestionContacts/conjointCRUD.page" />
>>    <page name="adjointCRUD"
>> specification-path="contact/gestionContacts/adjointCRUD.page" />
>>    <page name="entrepriseCRUD"
>> specification-path="contact/gestionContacts/entrepriseCRUD.page" />
>>    <page name="consommationCRUD"
>> specification-path="contact/gestionContacts/consommationCRUD.page" />
>>
>> For each section and sub section. At the end of the project, we  
>> will have
>> ~200 pages. It's we be a real mess in the .application, don`t you  
>> think ?
>>
>> Thanks for any advise, help or recommendation!
>>
>> Really sorry for the bad english, I`m french.
>>
>> Carl Pelletier
>>
>>
>>
>
>
> -- 
> Cumprimentos,
> Rui Pacheco

---
Erik Husby
Senior Software Engineer
Broad Institute of MIT and Harvard
Rm. 2192, 320 Charles St, Cambridge, MA 02141-2023
mobile: 781.354.6669, office: 617.258.9227
email: mhusby@broad.mit.edu AIM: ErikAtBroad


Re: Best directory stucture

Posted by Rui Pacheco <ru...@gmail.com>.
I may be wrong, but I think you can put your .page files under WEB-INF and
your .html under the context. That way you'll have them separated.

On 5/25/06, Carl Pelletier <ca...@yahoo.ca> wrote:
>
> Hi everyone, I`m starting a project with Tapestry 4.0 and was wondering if
> someone have recommendation on how to structure my project.
>
> I don`t really understand how Tapestry work with directory. It`s like
> everything is in the same folder.
>
> For us, it`s doesnt fit to have juste one directory with all the .page
> .html and component in the same folder.
>
> I know I can specify where are the component by using
> org.apache.tapestry.component-class-packages but it`s just work for the
> java files.
>
> Is there a way to specify all this without adding each page in the
> .application ?
>
> For now, we doing something like:
>    <page name="contactHome" specification-path="contact/home.page" />
>    <page name="contactList"
> specification-path="contact/gestionContacts/contactList.page" />
>    <page name="contact"
> specification-path="contact/gestionContacts/contact.page"/>
>    <page name="profilCRUD"
> specification-path="contact/gestionContacts/contact.page" />
>    <page name="conjointCRUD"
> specification-path="contact/gestionContacts/conjointCRUD.page" />
>    <page name="adjointCRUD"
> specification-path="contact/gestionContacts/adjointCRUD.page" />
>    <page name="entrepriseCRUD"
> specification-path="contact/gestionContacts/entrepriseCRUD.page" />
>    <page name="consommationCRUD"
> specification-path="contact/gestionContacts/consommationCRUD.page" />
>
> For each section and sub section. At the end of the project, we will have
> ~200 pages. It's we be a real mess in the .application, don`t you think ?
>
> Thanks for any advise, help or recommendation!
>
> Really sorry for the bad english, I`m french.
>
> Carl Pelletier
>
>
>


-- 
Cumprimentos,
Rui Pacheco

Re: Best directory stucture

Posted by corsair <pa...@fontel.net.ua>.
Hello!
Try to read UsersGuide
http://jakarta.apache.org/tapestry/UsersGuide/template.html#template.locations
http://jakarta.apache.org/tapestry/UsersGuide/page-class.html
http://jakarta.apache.org/tapestry/UsersGuide/configuration.html


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org