hi cris,

sounds interesting, how about a sample code/template to let us understand
more? thanks.

angelo


Chris Lewis-5 wrote:
> 
> Hello all,
> 
> I'm wondering how others handle a simple flow where a user fills out a
> form, form is processed, and then a message is shown as a result ("ok"
> or "failed"). I have a simple contact form and am handling this like so:
> 
> In my template I have 2 blocks: 1 is the form and the other is the
> message (or a place holder). There is also a t:delegate that will render
> the page property "content", which is just another block that will be
> assigned the form or message block.
> 
> Now because I have 2 different possible "bodies" (the blocks), I have to
> have some logic to make sure the correct one gets displayed. So my the
> page's content property is annotated as @Persist("flash"), and at the
> end of the form submission I set the content member to a message. It's
> persisted, so that works. To get the initial content (the form) to
> render, I check if the content property is null in onActivate, and if so
> assign the form block.
> 
> It works nicely, and I was wondering how others were handling this
> common use case and if something stinks about my method.
> 
> Thanks!
> 
> chris
> 
> -- 
> http://thegodcode.net
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-form%2C-action%2C-result-tp18795277p18795704.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