Hi,

How does a library component refer to a fellow library page?

I have an action listener in a library component that needs to invoke
cycle.setPage() with a page from the same library.  Using
cycle.setPage("MyLibPage") does not work - I get an exception saying that
MyLibPage is not found in the framework namespace (see below for the gory
exception details).

I can change it to cycle.setPage("MyLib:MyLibPage"), but I am concerned that
this relies on consumers of the library naming the library "MyLib".  If I
understand libraries correctly (and I may not!), someone might decide to use
my library by defining it with a different id - eg. <library id="HisLibrary"
specification-path="/path/to/My.library"/>.  Will this break the setPage in
my component?  If so, what is the correct way to refer to the page?

Or perhaps cycle.getPage(String) (which is ultimately called by
setPage(String)) is looking in the wrong place - though I'm not sure how it
could locate the library spec for the component, as wasn't there a
deliberate decision made not to have a component specify its library?
(Although, Spindle manages to figure it out ...)

I hope this makes sense to someone else!?!

Gory exception details:
net.sf.tapestry.ApplicationRuntimeException
Page 'LogoutPage' not found in framework namespace.
Stack Trace:
net.sf.tapestry.engine.Namespace.locatePageSpecification(Namespace.java:244)
net.sf.tapestry.engine.Namespace.getPageSpecification(Namespace.java:160)
net.sf.tapestry.pageload.PageSource$PageSpecificationResolver.getSpecificati
on(PageSource.java:140)
net.sf.tapestry.pageload.PageSource.getPage(PageSource.java:219)
net.sf.tapestry.engine.RequestCycle.getPage(RequestCycle.java:226)
net.sf.tapestry.engine.RequestCycle.setPage(RequestCycle.java:626)

Richard




-------------------------------------------------------
This sf.net email is sponsored by: DEDICATED SERVERS only $89!
Linux or FreeBSD, FREE setup, FAST network. Get your own server 
today at http://www.ServePath.com/indexfm.htm
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to