I currently have a very simple webapp.  I have a form and return a pageable
grid component based on the form parameters.  Right now, I have the form and
response as separate tml/Java classes.  Everything works fine, but it's
getting to be a pain to keep all of these pieces in order (2 templates and 2
Java classes per query x 10 queries).

I'd like to combine the form with response so I only have to maintain one
tml and one Java class per query.  What is the logic I need in my
class/template to do this?  

So far, my attempts have been unsuccessful.  I tried to add a Persist
boolean and set it to true in the onSuccess method and included an if-else
in the template to render the appropriate piece.  If I just used @Persist, I
couldn't get back to the form to ever load again once it was submitted the
first time.  If I used @Persist("flash"), I could reload the form on demand,
but now the grid pager links would take me back to the form (since the
boolean would reset to false).

Does anyone else combine their forms and response pages?  Is this a bad
practice?  It just seems silly to have to keep track of 4 entities for a
simple form/response.  Boy do I miss Perl.
-- 
View this message in context: 
http://www.nabble.com/Combine-a-form-and-response-in-same-template-Java-class-tp20287170p20287170.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to