This issue is quite similar to the listener and action parameters of
submit components [1].

Currently, the method annotated with EventListener is invoked after
all the elements of the
form are rewound (like the action parameter does).

I've just come across a situation that i would like
to have (either the same or another) method called as soon as the
component that triggered the
submission is rewound (like the listener parameter does).

To give an example (quite similar to [2]), here's a simple Selector
component (wrapper for PropertySelection)

    @EventListener(targets="data", events="onchange")
    public void doSelect() { System.out.println("Selected: " + getValue()); }

When used in the following manner:

<form jwcid="@Form">
  <span jwcid="@For" source="ognl:{1,2,3}">
     <span jwcid="@Selector"/>
   </span>
</form>

it'll always display the value of the last select

So, my questions are:
-) Does it makes sense to add a "listener" parameter to @EventListener
that'll be called at the 'correct' time?
-) Any workarounds or alternatives?


[1] http://tapestry.apache.org/tapestry4.1/components/form/submit.html
[2] https://issues.apache.org/jira/browse/TAPESTRY-2092

-- 
Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

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

Reply via email to