tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aj Gregory <ajg...@u.washington.edu>
Subject Rendering form submit response with the same page.
Date Mon, 30 Jan 2006 17:20:13 GMT
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:

public abstract TestPage getTestPage();

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

public IPage doSubmit() {
    TestPage tp = getTestPage();
    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.


To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org

View raw message