Hi Bhovat
I am not sure I understood the whole question but from what I understand, you
can use form context.
<form t:type='Form' t:context='whatever'></form>
public boolean updateComponent(String whatever){
if(whatever){
...
}
}
regards
Taha
On Oct 18, 2012, at 2:38 AM, bhorvat wrote:
> I am having a bit of a problem that I would like to solve in the most elegant
> way so I am interested if there a better way to handle it.
>
> I have a one object call it component that has multiple properties, and for
> each 4 properties I have 4 forms that dont have the id so they are handled
> by one method that does not have the id associated with, and for 1 property
> that has id on its form and the special method for it.
>
> The reason for that is that the first 4 properties can be handled in the
> same way but the 5th one has to handled in a special way.
>
> My problem is that I need to prevent event bubbling for the default method
> which in return stops the the trigger of the special method, also I can not
> group all for properties into one form as they are all over the place in the
> html.
>
> So my question is can I somehow handle the 4 forms in one method but
> separate it from the 5th one.
>
> Below are code samples for the methods
>
> @OnEvent(value = EventConstants.SUCCESS)
> public boolean updateComponent() {
> systemManager.updateComponent(component);
> return true;
> }
>
> @OnEvent(value = EventConstants.SUCCESS, component = "artist")
> public void updateComponentArtist() {
> systemManager.updateComponentArtist(component, artistUsername);
> }
>
> As you can see the default method returns true so the second method is never
> triggered even when that form is submited.
>
> I know that links have the event parameter that I can put on them and in
> that way I can specify that they all will be handled in one way, can I do
> something similar with the form?
>
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Event-parameter-on-the-form-or-Multiple-from-handle-in-one-method-tp5717020.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]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]