page-pathes are always relative to your pages-package, so
cycle.getPage("admin/UserList") should be fine.
Somehow, Tapestry seems to find your template in
<context>/admin/UserList and associates it with BasePage.
Could it be, that you have a page class named UserList in both the pages
package and the admin sub-package? Maybe a dirty build after moving
thins around?

> -----Original Message-----
> From: mraible [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, August 28, 2007 3:59 PM
> To: users@tapestry.apache.org
> Subject: Re: How do I get a page from a sub-package
> 
> 
> I have the following configured:
> 
> <meta key="org.apache.tapestry.page-class-packages"
> value="org.appfuse.webapp.pages"/>
> 
> Are you saying I should change it to:
> 
> <meta key="org.apache.tapestry.page-class-packages"
> value="org.appfuse.webapp.pages,org.appfuse.webapp.pages.admin"/>
> 
> Are you sure it doesn't scan sub-packages by default? It 
> seems to - if I put a class in this package and move the page 
> into a matching sub-directory, it works. However, when I get 
> a page from the IRequestCycle, I don't know how to traverse 
> into the sub-package (or above the current package for that matter).
> 
> Thanks,
> 
> Matt
> 
> 
> Martino Piccinato wrote:
> > 
> > I think you can use configuration parameter
> > 
> > org.apache.tapestry.component-class-packages
> > 
> > (from documentation) A comma-seperated list of package names, used 
> > when  searching for the component class  . These must 
> appear as <meta>  
> > tags in the application or library specification containing the 
> > component
> > 
> > 
> > For other options you can see
> > 
> > http://tapestry.apache.org/tapestry4.1/usersguide/components.html
> > 
> > at the section "Referencing Library Components"
> > 
> > 
> > On 8/28/07, mraible <[EMAIL PROTECTED]> wrote:
> >>
> >> I have a UserForm class in a "pages" package and a 
> UserList class in 
> >> an "admin" sub-package. In UserForm, how do I get UserList? The 
> >> following doesn't seem to work:
> >>
> >> UserList nextPage = (UserList) cycle.getPage("UserList");
> >>
> >> Results in: java.lang.ClassCastException: $UserList_4
> >>
> >> If I change it to cycle.getPage("admin/UserList"), I get:
> >>
> >> java.lang.ClassCastException: $BasePage_4
> >>
> >> The last option (cycle.getPage("admin.UserList")) seems a 
> bit closer, 
> >> but still doesn't work:
> >>
> >> java.lang.NoClassDefFoundError: 
> >> org/appfuse/webapp/pages/Admin/UserList
> >> (wrong name: org/appfuse/webapp/pages/admin/UserList)
> >>
> >> Thanks,
> >>
> >> Matt
> >>
> >> --
> >> View this message in context:
> >> 
> http://www.nabble.com/How-do-I-get-a-page-from-a-sub-package-tf433985
> >> 7.html#a12362460 Sent from the Tapestry - User mailing 
> list archive 
> >> at Nabble.com.
> >>
> >>
> >> 
> ---------------------------------------------------------------------
> >> 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]
> > 
> > 
> > 
> 
> --
> View this message in context: 
> http://www.nabble.com/How-do-I-get-a-page-from-a-sub-package-t
> f4339857.html#a12368479
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> 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