Re: Previous Page ref. in PageParameters

2007-08-04 Thread Matej Knopp
What you need to do here is pass the pageId and pageMap name as page
parameters. And then lookup the page using session.get(). But this
approach is somewhat fragile. If someone bookmarks the url and then
pastes it to browser, the previous page will not be there.

Anyway, if you are using current 1.3, there is easier solution. Just
mount the page using HybridUrlCodingStrategy (and make sure it has
default constructor - is bookmarkable). Then pass the page reference
to page constructor (not the default one).

Even if you create the page using new MyPage(myPrevPage) and do
setResponsePage(myPageInstance) the url will still be bookmarkable.
But will also contain page instance number so it will look like
/my/mount-path.3 (3 being the page instance id).

-Matej

On 8/4/07, Gumnaam <[EMAIL PROTECTED]> wrote:
> Can a ref. to the previous page be passed via PageParameters.
>
> What I am trying to do  is have a BookmarkablePage
> The PageParameters if contain a ref. to previous field,
> will display a "go back" link.
>
> I can pass the prev page as a ref. in the constructor, but then the page is
> not bookmarkable,
> I need to pass some sort of ref. to the current page, via PageParameters
> and look it up in the next page's constructor.
> some thing like
> PrevPage p = getPageMap.get(pageParams.getString("prevPage"))
>
> any thoughts.
>
> thanks
>
>
> -
> 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]



Previous Page ref. in PageParameters

2007-08-04 Thread Gumnaam

Can a ref. to the previous page be passed via PageParameters.

What I am trying to do  is have a BookmarkablePage
The PageParameters if contain a ref. to previous field,
will display a "go back" link.

I can pass the prev page as a ref. in the constructor, but then the page is
not bookmarkable,
I need to pass some sort of ref. to the current page, via PageParameters
and look it up in the next page's constructor.
some thing like
PrevPage p = getPageMap.get(pageParams.getString("prevPage"))

any thoughts.

thanks


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]