Thanks for the suggestion!  I gave it a shot but the result was the same.

-Aj

Jesse Kuhnert wrote:
What about using IRequestCycle to set the page instead? Ie

public void doSubmit(IRequestCycle cycle) {
  cycle.activate(getTestPage());  ?
}

On 1/30/06, Aj Gregory <[EMAIL PROTECTED]> wrote:
I have a page which I want to use to display a form and some results
after the form is submitted.

After the form listener does some work I want to set a value on the page
and show the same page again.  To do this I created a listener on the
page class and inject a page of the same type as the current page and
set the property that I want:

@InjectPage("TestPage")
public abstract TestPage getTestPage();

public abstract Object getObject();
public abstract void setObject(Object o);

public IPage doSubmit() {
    TestPage tp = getTestPage();
    tp.setObject(...);
    return tp;
}

This doesn't work.  From what I can tell tapestry doesn't create a new
instance of the page and instead gets the same instance that it used to
handle the form submit with all of the values reset.  I tried just
calling setObject() on the current instance and returning "this" but
that doesn't work either.

Any suggestions?  I'm doing this within a portlet in case that matters.

Thanks
-Aj





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