AjaxFormSubmitBehavior

On Mon, Oct 18, 2010 at 3:57 PM, MaxLambrecht <maxlambre...@gmail.com>wrote:

>
> I have a form with some fields, one of them has an ajax request associated
> to
> the onblur event.
>
> See the following code:
>
> AjaxFormComponentUpdatingBehavior zipcodeOnBlur = new
> AjaxFormComponentUpdatingBehavior("onblur") {
>            private static final long serialVersionUID = 1L;
>
>            @Override
>            protected void onUpdate(AjaxRequestTarget target) {
>                System.out.println("Zipcode value: " +
> getFormComponent().getModelObject());
>                System.out.print("FormModel: " +
> getFormComponent().getForm().getModelObject());
>            }
>        };
> propertyAddress.setZipcode( null );
> TextField<String> zipCodeField = new TextField<String>(
> "propertyAddress.zipcode" );
> zipCodeField.setMarkupId( "zip_code" ).setOutputMarkupId( true );
> zipCodeField.add(zipcodeOnBlur);
> add(zipCodeField);
>
> I need some values in the form to be submitted and accessible in the
> onUpdate method.
>
> Which is the best way to get that working?
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Can-AjaxFormComponentUpdatingBehavior-handle-more-than-only-one-field-in-the-form-tp3001079p3001079.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*

Reply via email to