Thats true, but you could create a method instead of your annotated method with the following content.

IPage getPage()  {
return getRequestCycle().getPage(getNamespace().getId() + ":" + pageName);
}

Stephane Decleire wrote:

Thanks Robert but that solution can't be used in the @InjectPage annotation which needs a constant value ... :-(

--
Stéphane Decleire



Robert Binna a écrit :

Hi

You could try the following. In the page you have the method getNamespace().getId() which returns you the id of the namespace the page is currently registered in, so if you want to link ot a page with in the same namespace you can link to getNamespace().getId() + ":" + pageName
If someone has a more ellegant solution, I would also be very happy ;-).

Kind regards,
                  Robert

Stephane Decleire wrote:

Hi,

Is there a default namespace that one can use in a library similar to the default "application" namespace for an application ? I have 2 pages in a library (say Page1 and Page2). When i make a link on one of those pages from an application page, i use the id i have declared in the <library> tag of my application as a namespace (say lib:Page1) and everything is ok. But i need a link between the 2 pages of my library (from Page1 to Page2). I can't use the "lib" namespace which is associated to the application. And with no namespace, i have the following error :
   Page 'Page2' not found in application namespace.
Any idea ?

--
Stéphane Decleire





---------------------------------------------------------------------
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