Thanks, I've figured it out now, hadn't read the doc on 'selected'
attribute :(
Nick Westgate wrote:
Isn't this just a field of your page base class?
In T4 you can inherit, which should be great.
In T3 I had to add the property to each .page file.
Cheers,
Nick.
Paul Stanton wrote:
thanks, listener="ognl:page.listeners.formSubmit" works.
anyone know how to read the 'tag' attribute once in the form submit
listener?
Nick Westgate wrote:
I have no T4 project to test with, but in T3 I used OGNL expressions:
getPage().listeners.submitForm
getPage().submitTarget
Cheers,
Nick.
Paul Stanton wrote:
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]
---------------------------------------------------------------------
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]
---------------------------------------------------------------------
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]