Denis:

in 3.0 you can specify your own ITemplateSourceDelegate. See if it's the same in 4.0



On Jul 6, 2005, at 4:49 PM, Denis Souza wrote:

That's not what I meant. The problem is not regarding the java class files for the pages/components. Yes, I can organize the classes any way I want and just throw in the application file as many packages I want so that Tapestry
will find them.

The problem is with the html files. Wouldn't it be nice to have
configuration properties analogous to the ones which are used to find the
class files? Eg. it would be something like:

<meta key="org.apache.tapestry.component-bodies"
value="components,components/account,components/generic"/>
<meta key="org.apache.tapestry.page-bodies"
value="pages,pages/account,pages/product"/>

That way one could use the same structure for the page/component html files as are used by the classes/packages instead of having one big folder full of html files for the components and pages. As far as I know Tapestry will only look for html files in either the same directory as the specification file
for the page/component (which defeats the purpose of not having
specification files) or in the context root.

I'm just trying to find a solution that will allow me to keep my html files
organized without having to use specification files for pages and
components.

Denis Souza


-----Original Message-----
From: Scott F. Walter [mailto:[EMAIL PROTECTED]
Sent: quarta-feira, 6 de julho de 2005 17:35
To: Tapestry users
Subject: Re: Where do my component files go in Tapestry 4?

Denis Souza wrote:


Hi,



 I have a question about where to place my files in Tapestry 4. In

Tapestry

3.x I was used to specify my pages and components in my .application file and place them anywhere I wanted to. I placed the files depending on my application structure so that they would always be in a nice organized way
and very easy to find. Under my WEB-INF folder I had a "pages" and a
"components" folder and they where further organized from there. In

Tapestry

4 I can simply continue to do that and everything will be fine, but I guess I'll lose the advantage of having simple pages and components without a
specification file.

I wouldn't mind at all having to specify in the .application file where
each page and component is since I would continue to get exactly the
separation I want between my files, but from what I've learned so far,
Tapestry 4 does not allow you to specify pages and components in the
.application file without an associated specification file. According to

the

docs, if I place my html files starting at the context root and specify the java packages for the page classes I'll be ok and won't need to specify any pages in the .application file. Sure, I'll have to reference my pages with their full path in my app (eg. account\LoginPage), but I actually prefer it
that way. I even tried it out. It's great!

The problem I have is with the components. (I read on the list that there is a bug that won't allow you to create components without a specification file, but I don't know exactly what the bug is. For this argument, let's suppose there is no bug). If a component without a specification file works the same way as a page, it will search for any .html files in the context root, just like the pages. This would mean that I would necessarily have to have the html files for my pages together with my components, which is not
good for keeping things organized. Also, if I can't just do a
"jwcid='@account\LoginComponent" then there is no way I can have components
that are not in the .application file, which means I must have a
specification file for each component.



So my question is actually three:



Will there be any way for me to physically store the .html files for my components separated (i.e. in a different folder structure) from the .html files for my pages and still be able to have all these components/ pages

free

of any specification files?



How can I use components that are stored in different folders (to keep them organized), reference them by their component names (without regard for where they are stored) and still not need the specification files for them?



Will there be, in the final version, configuration properties that will allow you to specify root folders for you page and component resources
(.html and .properties files) separately?



I'm not great at explaining things, but I hope I was clear enough. Maybe

I'm

missing something, so please help me understand.



Thanks,

Denis Souza







If I understand your question, there are entries you can put in your
.application file, Tapestry will use these to search for pages/ components.

<meta key="org.apache.tapestry.component-class-packages"
value="com.scottwalter.sandbox.tapestry4.components"/>
<meta key="org.apache.tapestry.page-class-packages"
value="com.scottwalter.sandbox.tapestry4.pages"/>

If you have multiple packages, just separate them by commas

--

Scott F. Walter     Scott F. Walter
Principal Consultant
Vivare, Inc.

E: [EMAIL PROTECTED]
E: [EMAIL PROTECTED]
Visit scottwalter.com <http://scottwalter.com> --Point. Click. Explore!




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to