Thank you, but I've seen from code that beginPageRender is called only
during rewind
so I added a property to the page and did the following:
/**
* Reset the grid content if the page is accessed without form
submission
* (refresh or new access), then performs normal renderPage operations.
*/
public void renderPage(ResponseBuilder builder, IRequestCycle cycle) {
if (!getFormRewound().booleanValue()) {
setEditItemCollection(new ArrayList());
}
setFormRewound(Boolean.FALSE);
super.renderPage(builder, cycle);
}
/**
* Called by the framework during rewind. It informs the page the it
* has been rewinded when the renderPage method will be called
*/
public void beginPageRender() {
setFormRewound(Boolean.TRUE);
}
Is there any better way to do this ?
ciao,
kiuma
On 2/27/07, Sam Gendler <[EMAIL PROTECTED]> wrote:
pageBeginRender (implement PageBeginRenderListener interface). This
will be called before rendering both the rewind and render cycle, but
you can just put a conditional on cycle.isRewinding() in order to
ensure you only re-init the variable during the render cycle.
--sam
On 2/26/07, Andrea Chiumenti <[EMAIL PROTECTED]> wrote:
> What I need is that when I access or refresh the page a parameter bound
to
> session must be reset
>
> On 2/26/07, Andrea Chiumenti <[EMAIL PROTECTED]> wrote:
> >
> > Hi!,
> > where do I have to put page initialization code in tapestry 4.1.1?
> > I need that the init method is called only when I render the page, but
not
> > when I call a form submit.
> >
> > Thx,
> > kiuma
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]