Tony, We use an annotation to perform the page injection, but fundamentally under the hood the annotation simply prepends the namespace onto the pagename.
I think, based on http://tapestry.apache.org/tapestry4/tapestry/hivedocs/config/tapestry.e nhance.InjectWorkers.html that the page type inject depends on the InjectPageWorker class, which in 4.1 adds a method with the body (drawn from line 66 of the InjectPageWorker class): getPage().getRequestCycle().getPage(\"{0}\") The parameter is filled by the page name part of the object. This should support prepending the namespace in the fashion described. For convenience, We ended up adding an annotation to help detect namespaces automatically, however, the out of the box inject page worker appears to support the explicit addition of namespace to the page name. -jason -----Original Message----- From: Tony Giaccone [mailto:[EMAIL PROTECTED] Sent: Thursday, March 13, 2008 5:25 PM To: Tapestry users Subject: Re: Refer to a page component in a library Jason, First nice to talk to you again. Second if I follow your suggestion correctly, to inject the page from the library into a page in the application you would use the namespace as part of the object binding? Like this? <inject property="simplePage" type="page" object="myLib:SimplePage" /> Tony On Thu, Mar 13, 2008 at 3:23 PM, <[EMAIL PROTECTED]> wrote: > > Use the namespace, just as you did with the component. It can depend on > the component you're using, but for the most part you just specify the > namespace as you did with the component. For things like page links, > you can set the namespace parameter. > > -jason > > -----Original Message----- > From: Tony Giaccone [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 13, 2008 2:41 PM > To: users@tapestry.apache.org > Subject: Refer to a page component in a library > > Tapestry 4.0 Question. > > I have a created a very simple library. It's included in my .application > file like this: > > <library id="myLib" > specification-path="/com/company/project/reportlibrary/ReportLibrary.lib > rary"/> > > > As a result components in the library can be referenced in page files. > For > example: > > <component id="simple" type="myLib:Simple"/> > > That declaration work just fine. > > But now, but I'm a bit at a loss. > > If I have a page in my library and it's defined in the library file like > this: > > <page name="SimplePage" specification-path="pages/SimplePage.page"/> > > How do I then make use of that page in a application .page file. > > > If the page is in my normal Application page space, it's easy: > > <inject property="simplePage" type="page" object="SimplePage" /> > > but when I try that I get this error: > > > Page 'SimplePage' not found in application namespace. > > How do I inform Tapestry that the page is in the library? > > > > Tony > > --------------------------------------------------------------------- > 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]