Yes, that is right...I'm....it is obvious :-)

thank you all for your help!

V.

2009/2/20 Martin Voigt <martin.vo...@artnology.com>

> You can set the form processing mode per button:
>
> submitButton.setDefaultFormProcessing(true);
> cancelButton.setDefaultFormProcessing(false);
>
> So if the user clicks submitButton, the form is validated, if she
> clicks cancelButton, it is not.
>
> Martin
>
>
>
> 2009/2/20 Vitek Tajzich <v.tajz...@gmail.com>:
> > Well....sometimes is a good idea to read a documentation :-)
> >
> > I found on wicket's wiki that I have to update feedback panel. This
> should
> > be done like this:
> >
> > protected void onError(final AjaxRequestTarget target, final Form form) {
> >    // or update the feedback panel
> >    target.addComponent(form.getPage().get("feedback"));
> > }
> >
> >
> > And It is work! :-)
> >
> > So, If you have only one submit button, do not set defaultFormProcessing
> =
> > false, because this will remove validation and do not forget to update
> > feedbackpanel like in an example above.
> >
> > One more question remains. What If I have more than one submit buttons
> and I
> > have to set defaultFormProcessing = false. How can I call validation?
> >
> > thx,
> >
> > V.
> >
> > 2009/2/20 Vitek Tajzich <v.tajz...@gmail.com>
> >
> >> well it happend inside of Form....I cannot do anything....
> >>
> >> 2009/2/20 Martijn Dashorst <martijn.dasho...@gmail.com>
> >>
> >> perhaps add the feedback panel to the ajax request target?
> >>>
> >>> Martijn
> >>>
> >>> On Fri, Feb 20, 2009 at 10:55 AM, Vitek Tajzich <v.tajz...@gmail.com>
> >>> wrote:
> >>> > Hi,
> >>> >
> >>> > that was my mistake. I set to submit button defaultFormProcessing =
> >>> false
> >>> > and that is why validation haven't been processed.
> >>> >
> >>> > Now validations are processed but I'm getting this warning:
> >>> > Component-targetted feedback message was left unrendered. This could
> be
> >>> > because you are missing a FeedbackPanel on the page.
> >>> >
> >>> > And no validation message is displayed.
> >>> >
> >>> > But when I use non ajax based submit then message are shown
> correctly.
> >>> >
> >>> > piece of code...
> >>> >
> >>> > IndicatingAjaxButton orderSubmit = new
> >>> IndicatingAjaxButton("order-submit",
> >>> > orderForm) {
> >>> >
> >>> >            private static final long serialVersionUID =
> >>> > -3779837727856697099L;
> >>> >
> >>> >            /** {...@inheritdoc} */
> >>> >            @Override
> >>> >            protected void onSubmit(AjaxRequestTarget target, Form<?>
> >>> form)
> >>> > {
> >>> >
> >>> >            //some bussines logic here
> >>> >            }
> >>> >        };
> >>> >
> >>> >
> >>> >
> >>> > 2009/2/19 Matt Welch <matt...@welchkin.net>
> >>> >
> >>> >>
> >>> >> I think more information is needed before someone can provide a
> useful
> >>> >> response:
> >>> >>
> >>> >>
> >>> >> Are you initializing the AjaxButton with the form (in the the
> >>> constructor
> >>> >> of
> >>> >> the AjaxButton or with setter)?
> >>> >> Is the form data being submitted? If not, this would indicate a
> problem
> >>> >> somewhere other than in the validation itself.
> >>> >> Can you show your actual code?
> >>> >>
> >>> >>
> >>> >>
> >>> >>
> >>> >> Vitek.Tajzich wrote:
> >>> >> >
> >>> >> > Hi guys,
> >>> >> >
> >>> >> > I have form and AjaxButton as submit button for the form. If I use
> >>> non
> >>> >> > ajax
> >>> >> > button validation is called and input fields are validated. But If
> I
> >>> use
> >>> >> > AjaxButton then validation are passed....What should I do to get
> form
> >>> >> > validated even If I use ajax button?
> >>> >> >
> >>> >> > thank you,
> >>> >> >
> >>> >> > Vitek
> >>> >> >
> >>> >> >
> >>> >>
> >>> >> --
> >>> >> View this message in context:
> >>> >>
> >>>
> http://www.nabble.com/form---ajax-submit-and-validation-tp22102523p22104799.html
> >>> >> Sent from the Wicket - User mailing list archive at Nabble.com.
> >>> >>
> >>> >
> >>>
> >>>
> >>>
> >>> --
> >>> Become a Wicket expert, learn from the best: http://wicketinaction.com
> >>> Apache Wicket 1.3.5 is released
> >>> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >>> For additional commands, e-mail: users-h...@wicket.apache.org
> >>>
> >>>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to