public class invalidindicator extends abstractbehavior {
  protected void oncomponenttag(component c, tag t) {
      boolean valid=((formcomponent)c).isvalid();
      if (!valid) {
         tag.put("class","invalid");
     }
  }
}

formcomponent.add(new invalidindicator());

-igor

On Tue, Sep 23, 2008 at 2:53 AM, cstein1206 <[EMAIL PROTECTED]> wrote:
>
> I basically want to achieve this:
> http://www.jroller.com/karthikg/entry/wicket_and_ajax
> but handle the validation only after the form has been submitted with an
> AjaxIndicatingButton instead of with the "onblur" as in the example.
>
> I think I tried too many things over the last couple of days and got totally
> confused now. Would anybody be so kind to help me out a bit? What do I need
> to add to the FormComponents so that they will be updated with an
> HTML-attribute "class='invalid'"? So far my form doesn't do that (I did
> setOutputMarkupId(true)).
>
> Thanks a ton!
> Chris
> --
> View this message in context: 
> http://www.nabble.com/Adding-HTML-class%3D%22invalid%22-after-validating-with-IndicatingAjaxButton-tp19624501p19624501.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]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to