Is there any way to get the component that fired an event? I looked at the
documentation and the sources trying to find out, but no success.
IMHO it would be very intesresting for mixins. I have just wrote one that
uses Hibernate Validator to handle the form validation event automatically
and add the error messages. I had two implementation choices:
1) Assume that the validated form always has a default t:id (form):
@OnEvent(component = Constants.FORM_ID, value = Form.VALIDATE_FORM)
2) Assume that there will always only a form in the page, as the mixin
doesn't know what form fired the event:
@OnEvent(value = Form.VALIDATE_FORM)
I think the second choice is too harsh, but then my mixin would only with
one form per page and its t:id would have always the same.
What about a Component getSource() method in EventContext?
One another option would be that restricting instance mixins to only
handle events originated from their corresponding component instance, but
I don't know how difficult would it be to implement.
By the way, its amazing how powerful the mixin concept is in Tapestry.
Thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]