You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by de...@web.de on 2005/04/01 18:08:00 UTC
How to handle multiple instances of a page with different data in the same session, at the same time ?
In my current project, i have to ensure, that a user can work with
multiple instances of the same page, but every page instance has different data.
Means, that he can open multiple windows with the same page. With a
plain page, this should be no problem, but in this case, the page
contains a TabPanel, which, as we all know, forces a page reload in
case of changing the current tab page. In other cases, it is necessary
to reload the page with a "location.href" refresh in javascript, without
a form submit.
The problem is:
if the user opens the page to display data object A, after that opens
another instance of the same page with data object B, goes back to A
and does something with this instance (i.e. forcing a page reload or
changing the tab page), the data of object B is displayed in page A, because it was the
last data object bound to this tapestry page.
Hope, you can understand, what i mean.
How can i handle this ?
best,
Rene
__________________________________________________________
Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min.
weltweit telefonieren! http://freephone.web.de/?mc=021201
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: How to handle multiple instances of a page with different data in the same session, at the same time ?
Posted by Kent Tong <ke...@cpttm.org.mo>.
<der-echte-chris <at> web.de> writes:
> if the user opens the page to display data object A, after that opens
> another instance of the same page with data object B, goes back to A
> and does something with this instance (i.e. forcing a page reload or
> changing the tab page), the data of object B is displayed in page A,
> because it was the
> last data object bound to this tapestry page.
Are you just copying the TabPane in the example for RenderBlock?
It is using a persistent property "selectedBlock". To make the
two pages independent, they must not use the session. At least
you need to delete the call to fireObserveChange():
public void selectBlock(IRequestCycle cycle) {
String block = (String) cycle.getServiceParameters()[0];
setSelectedBlock(block);
fireObservedChange("selectedBlock", block); //Delete this line!
}
Then see if it works.
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org