Re: disabling error validation
On Fri, 11 Jul 2008, tbt wrote: > Thanks for the link. But my form doesnt have static components like in the > example. All the form components are dynamic and generated using ListViews > and are nested inside panels. Is there a way to traverse the component > hierarchy with a loop and call validate() on each component. Please provide > an example. getPage().visitChildren(FormComponent.class, new IVisitor() {}); ... Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations Oyhttp://www.ri.fi/ > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: disabling error validation
Hi Thanks for the link. But my form doesnt have static components like in the example. All the form components are dynamic and generated using ListViews and are nested inside panels. Is there a way to traverse the component hierarchy with a loop and call validate() on each component. Please provide an example. Thanks Serkan Camurcuoglu-2 wrote: > > this link may help you a bit.. > > http://cwiki.apache.org/WICKET/conditional-validation.html > > > > tbt wrote: >> Hi >> >> But I need the component models to be updated. Thats why i'm using a >> SubmitLink instead of using a Link. I was hoping there was a simple >> method >> to disable form validation with the SubmitLink such as >> 'link2.setFormValidation(false)' or something like that. >> >> Is there a way to disable validations for some links and enable >> validations >> for others, yet at the same time update the form components when the >> links >> are clicked. Please provide a simple example. >> >> Thanks >> >> >> ZedroS wrote: >> >>> Hi >>> >>> If you don't want our form to be validated, why do you use a SubmitLink >>> ? >>> A simple Link wouldn't trigger the validation. Isn't that what you're >>> looking for ? >>> >>> ++ >>> zedros >>> >>> >>> >> >> > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/disabling-error-validation-tp18375841p18397964.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: disabling error validation
this link may help you a bit.. http://cwiki.apache.org/WICKET/conditional-validation.html tbt wrote: Hi But I need the component models to be updated. Thats why i'm using a SubmitLink instead of using a Link. I was hoping there was a simple method to disable form validation with the SubmitLink such as 'link2.setFormValidation(false)' or something like that. Is there a way to disable validations for some links and enable validations for others, yet at the same time update the form components when the links are clicked. Please provide a simple example. Thanks ZedroS wrote: Hi If you don't want our form to be validated, why do you use a SubmitLink ? A simple Link wouldn't trigger the validation. Isn't that what you're looking for ? ++ zedros - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: disabling error validation
Hi But I need the component models to be updated. Thats why i'm using a SubmitLink instead of using a Link. I was hoping there was a simple method to disable form validation with the SubmitLink such as 'link2.setFormValidation(false)' or something like that. Is there a way to disable validations for some links and enable validations for others, yet at the same time update the form components when the links are clicked. Please provide a simple example. Thanks ZedroS wrote: > > Hi > > If you don't want our form to be validated, why do you use a SubmitLink ? > A simple Link wouldn't trigger the validation. Isn't that what you're > looking for ? > > ++ > zedros > > -- View this message in context: http://www.nabble.com/disabling-error-validation-tp18375841p18377623.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: disabling error validation
Hi If you don't want our form to be validated, why do you use a SubmitLink ? A simple Link wouldn't trigger the validation. Isn't that what you're looking for ? ++ zedros -- View this message in context: http://www.nabble.com/disabling-error-validation-tp18375841p18377437.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
disabling error validation
Hi I'm a newbie to wicket and I have a form which has several text fields and two SubmitLinks. eg:- class MyForm extends Form { public MyForm(String id) { super(id); TextField textField = new TextField("field1"); textField.setRequired(true); SubmitLink link1 = new SubmitLink("link1") { public void onSubmit() { // go to page A } } SubmitLink link2 = new SubmitLink("link2") { public void onSubmit() { // go to page B } } } } I would like to know a way to stop the form components being validated when link1 is clicked and the form components to be validated as usual when link2 is clicked. On both occasions the form should get submitted and the models updated. Is there a way to do this the wicket way. Please provide an example. Thanks -- View this message in context: http://www.nabble.com/disabling-error-validation-tp18375841p18375841.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]