You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Raphaƫl Jean <ra...@entropysoft.net> on 2005/08/02 20:10:26 UTC

Tapestry 4 form submit types

I have several submit buttons on a form. Some of these buttons are "refresh-like" buttons, in that they just update some values in the form but don't submit it (from a user standpoint). Only one OK button is the real submit button.

Depending on the button clicked, I want client-side javascript validation to be performed or not.

I understand that there are now multiple submit types: cancel, refresh or submit. This is fine for the OK or Cancel buttons, for which you can just use the appropriate form listener but how do you do that for a button that has a specific listener?

How can I submit a refresh-submit and still have my button's listener called?

 

I used to add some javascript to the buttons to disable client-side validation: onclick="form.onsubmit=null"

Isn't there something more elegant in Tapestry 4?

 

Thanks all,

Raphael Jean