You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Joachim Van der Auwera <jo...@progs.be> on 2007/12/04 14:27:11 UTC
page navigation (return to arbitrary page)
I have situation where I have a page in my application which can be
reached from many different pages. When a certain link is indicated, I
want the user to move back to the previous page. The problem is that
this class has no idea (cannot know) what the possible return pages are.
I thought about using a mechanism like the following, on the originator
pages, include an actionlink component with the following code
---- OriginatorPage
@InjectPage
private DestinationPage destination;
Object onActionFromLink()
{
// initialize
destinationPage.setReturnPage( this );
return destination;
}
-----
On the destination page, I would have another actionlink to get back to
the originator page.
----- DestinationPage
@Persist
private Object returnPage;
public void setReturnPage( Object o ) { returnPage = o; }
Object onActionFromLinkback()
{
return page;
}
-----
Unfortunately this does not work, presumably because the originator page
is detached.
Is there some way serialize/deserialize a page so that I can be used?
It would be possible to add two methods which store/restore all the
persisted fields, but I still need to be able to attach/inject a page of
which the page name is not known in advance.
Any suggestions?
Thanks for the help,
Joachim
--
Joachim Van der Auwera
PROGS bvba, progs.be
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
Re: page navigation (return to arbitrary page)
Posted by Ulrich Stärk <ul...@spielviel.de>.
I think this is the wrong place to ask for help. This list is mainly for
developing purposes. So unless you want to discuss the innards of
Tapestry (which does not include how to use it) you should post to the
user mailing list. You are much more likely to receive help there.
Cheers
Uli
Joachim Van der Auwera schrieb:
> I have situation where I have a page in my application which can be
> reached from many different pages. When a certain link is indicated, I
> want the user to move back to the previous page. The problem is that
> this class has no idea (cannot know) what the possible return pages are.
>
> I thought about using a mechanism like the following, on the originator
> pages, include an actionlink component with the following code
>
> ---- OriginatorPage
>
> @InjectPage
> private DestinationPage destination;
>
> Object onActionFromLink()
> {
> // initialize
> destinationPage.setReturnPage( this );
> return destination;
> }
> -----
>
> On the destination page, I would have another actionlink to get back to
> the originator page.
>
> ----- DestinationPage
>
> @Persist
> private Object returnPage;
>
> public void setReturnPage( Object o ) { returnPage = o; }
>
> Object onActionFromLinkback()
> {
> return page;
> }
>
> -----
>
> Unfortunately this does not work, presumably because the originator page
> is detached.
>
> Is there some way serialize/deserialize a page so that I can be used?
>
> It would be possible to add two methods which store/restore all the
> persisted fields, but I still need to be able to attach/inject a page of
> which the page name is not known in advance.
>
> Any suggestions?
>
> Thanks for the help,
> Joachim
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org