You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Nemanja Kostic <n....@youngculture.com> on 2006/02/18 20:18:03 UTC

Determining the page class in subpackages ?

Hi,

   In my Tapestry project I have more then 30 pages which page classes 
are located in different
packages. They all start with com.webaspect.tapestry.pages and then each 
page has its own package,
for example: page Profile is in package 
com.webaspect.tapestry.pages.profile etc.

Some of those pages do not have .page file.
So, it means that I need to list them all in <meta tag of .application 
file like:
<meta key="org.apache.tapestry.page-class-packages"
    value="com.webaspect.tapestry.pages, 
com.webaspect.tapestry.pages.profile, ...... and other 30 subpackages 
... "/>

Is it possible to tell Tapestry to search for the page classes in 
subpackages as well, without needing
to list them all?
Would be perfect to write something like:
<meta key="org.apache.tapestry.page-class-packages" 
value="com.webaspect.tapestry.pages.*"/>

Regards,
Nemanja.

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


RE: Determining the page class in subpackages ?

Posted by James Carman <ja...@carmanconsulting.com>.
No problem.  Hope that helps!  It's not entire intuitive how Tapestry
searches for pages.  It took a little trial and error to figure that out. 

-----Original Message-----
From: Nemanja Kostic [mailto:n.kostic@youngculture.com] 
Sent: Saturday, February 18, 2006 3:17 PM
To: Tapestry users
Subject: Re: Determining the page class in subpackages ?

That makes sense now. :)

Thanks a lot James.


James Carman wrote:

>That's because the page name changes when you move it.  It's new name is
>"profile/ProfileInfo."
>  
>


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



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


Re: Determining the page class in subpackages ?

Posted by Nemanja Kostic <n....@youngculture.com>.
That makes sense now. :)

Thanks a lot James.


James Carman wrote:

>That's because the page name changes when you move it.  It's new name is
>"profile/ProfileInfo."
>  
>


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


RE: Determining the page class in subpackages ?

Posted by James Carman <ja...@carmanconsulting.com>.
That's because the page name changes when you move it.  It's new name is
"profile/ProfileInfo."


-----Original Message-----
From: Nemanja Kostic [mailto:n.kostic@youngculture.com] 
Sent: Saturday, February 18, 2006 3:11 PM
To: Tapestry users
Subject: Re: Determining the page class in subpackages ?

I see what you mean, but still can't make it work.

If I move ProfileInfo.html anywhere outside root folder, I get "Page 
'ProfileInfo' not found in application namespace."
If Tapestry could find ProfileInfo.html in subfolder other then root, 
maybe it would find ProfileInfo.class in subpackage as well.

This ProfileInfo.html page is called from some other page as 
ExternalLink like this:
<a jwcid="@ExternalLink" page="ProfileInfo" ....>


James Carman wrote:

>No, here's what I mean.  In your application's root directory, create a
>directory called "profile."  In there, put your ProfileInfo.html file.
>Then, Tapestry will look in a subpackage called "profile" under your root
>pages package for the ProfileInfo class.  Does that make sense? 
>  
>


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



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


Re: Determining the page class in subpackages ?

Posted by Nemanja Kostic <n....@youngculture.com>.
I see what you mean, but still can't make it work.

If I move ProfileInfo.html anywhere outside root folder, I get "Page 
'ProfileInfo' not found in application namespace."
If Tapestry could find ProfileInfo.html in subfolder other then root, 
maybe it would find ProfileInfo.class in subpackage as well.

This ProfileInfo.html page is called from some other page as 
ExternalLink like this:
<a jwcid="@ExternalLink" page="ProfileInfo" ....>


James Carman wrote:

>No, here's what I mean.  In your application's root directory, create a
>directory called "profile."  In there, put your ProfileInfo.html file.
>Then, Tapestry will look in a subpackage called "profile" under your root
>pages package for the ProfileInfo class.  Does that make sense? 
>  
>


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


RE: Determining the page class in subpackages ?

Posted by James Carman <ja...@carmanconsulting.com>.
No, here's what I mean.  In your application's root directory, create a
directory called "profile."  In there, put your ProfileInfo.html file.
Then, Tapestry will look in a subpackage called "profile" under your root
pages package for the ProfileInfo class.  Does that make sense? 

-----Original Message-----
From: Nemanja Kostic [mailto:n.kostic@youngculture.com] 
Sent: Saturday, February 18, 2006 2:42 PM
To: Tapestry users
Subject: Re: Determining the page class in subpackages ?


All my .html files are in root filder.

If I understood you correctly you ment to do it like this:

/
--/com/webaspect/pages/profileInfo/ProfileInfo.html
--/WEB-INF
-----/classes
--------/com/webaspect/pages/profileInfo/ProfileInfo.class

I just  tried this as you said but got exception: "Page ProfileInfo not 
found in namespace".


Nemanja.


James Carman wrote:

>If you put your html files in subfolders off the root, Tapestry will look
in
>subpackages under the main page package.
>
>  
>


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



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


Re: Determining the page class in subpackages ?

Posted by Nemanja Kostic <n....@youngculture.com>.
All my .html files are in root filder.

If I understood you correctly you ment to do it like this:

/
--/com/webaspect/pages/profileInfo/ProfileInfo.html
--/WEB-INF
-----/classes
--------/com/webaspect/pages/profileInfo/ProfileInfo.class

I just  tried this as you said but got exception: "Page ProfileInfo not 
found in namespace".


Nemanja.


James Carman wrote:

>If you put your html files in subfolders off the root, Tapestry will look in
>subpackages under the main page package.
>
>  
>


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


RE: Determining the page class in subpackages ?

Posted by James Carman <ja...@carmanconsulting.com>.
If you put your html files in subfolders off the root, Tapestry will look in
subpackages under the main page package.


-----Original Message-----
From: Nemanja Kostic [mailto:n.kostic@youngculture.com] 
Sent: Saturday, February 18, 2006 2:18 PM
To: Tapestry users
Subject: Determining the page class in subpackages ?

Hi,

   In my Tapestry project I have more then 30 pages which page classes 
are located in different
packages. They all start with com.webaspect.tapestry.pages and then each 
page has its own package,
for example: page Profile is in package 
com.webaspect.tapestry.pages.profile etc.

Some of those pages do not have .page file.
So, it means that I need to list them all in <DEFANGED_meta tag of
.application 
file like:
<DEFANGED_meta key="org.apache.tapestry.page-class-packages"
    value="com.webaspect.tapestry.pages, 
com.webaspect.tapestry.pages.profile, ...... and other 30 subpackages 
... "/>

Is it possible to tell Tapestry to search for the page classes in 
subpackages as well, without needing
to list them all?
Would be perfect to write something like:
<DEFANGED_meta key="org.apache.tapestry.page-class-packages" 
value="com.webaspect.tapestry.pages.*"/>

Regards,
Nemanja.

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



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