Nick (or anyone), two questions:
1. If I define the form in the border component, why doesn't
listener="listener:page.formSubmit" work? It seems I have to define a
listener in the border component that delegates to the page method?
2. How do I read the value of the 'tag' attribute of a LinkSubmit once
the form is submitted? using this to decide which link was clicked
sounds tidier than using the parameters attribute.
Thanks again all of you.
Nick Westgate wrote:
Paul Stanton wrote:
Hmm.. I guess what I don't get is how you can submit a form from a
DirectLink component.
I'm guessing you can't, unless you emulate what LinkSubmit does:
http://tapestry.apache.org/tapestry4.1/components/form/linksubmit.html
In my Tapestry 3 apps I actually used form submits exclusively
exactly because of the problem you're having. Any link or button
press should preserve form data and then validate or navigate.
I structured this by having a form in my Border component,
and the base class for all pages providing the "root" listener.
Every link assigned a string which the listener processed.
Each page handled it's own action strings ("save" etc) and the
root listener handled various global actions like navigation
(E.g. "_PageName").
Cheers,
Nick.
---------------------------------------------------------------------
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]