Hi, This is how I did it at the end:
In html: <input jwcid="@Submit" value="Submit Form" listener="listener:formActionSubmit" selected="ognl:selectedSubmit" tag="literal:useValidators"/> And then in java: public abstract String getSelectedSubmit(); public void renderPage(IMarkupWriter writer, IRequestCycle cycle) { if ( !"useValidators".equals(getSelectedSubmit() ) { getValidationDelegate().clearErrors(); } } Greetings Reto On 1/24/07, jiju <[EMAIL PROTECTED]> wrote:
Hi all, I am also facing the same problem... is there any way to disable validation for some button clicks ? Reto Hotz wrote: > > Hello, > > I have a @Form with a validationDelegate. Inside this form there is a > custom component. There are also several @TextFields with > validators-rules after the custom-component. The custom component has > a @Submit button. > > My problem is, when the submit button of that custom component is > pressed, the validator of the form gets triggered. But at this time > there shouldn't be a validation at all. The validation should start > when the submit-button of the form itself is pressed. > > I tried it this way in my component: > > /* submit listener of component */ > public void formActionFindMachine() { > IValidationDelegate delegate = getForm().getDelegate(); > delegate.clearErrors(); > } > > This works, but if the TextFields are located after the custom > component, they still record their validation errors. > > I think I oversee something. > > Thank for any help. > > Greetings > Reto > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/ValidationDelegate-and-Form-Component-tf3065098.html#a8560178 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]