I want to use ajax to check if a field value is valid w/o submitting the
entire form.  I add AjaxFormComponentUpdatingBehavior to my ajax object
(link/button/etc).  But, I don't know how to retrieve the edit field's value
inside the onUpdate method.  See the code I have:

                fc = new RequiredTextField("userName");
                fc.setLabel(new Model("User Name"));
                add(fc);

                fc = new Button("checkId");
                fc.add(new AjaxFormComponentUpdatingBehavior("onClick") {
                        protected void onUpdate(AjaxRequestTarget target) {

                                System.out.println("This gets called");
                                
                                // TODO: how to get the userName field's value?
                                
                                
                        }
                });

                add(fc);
-- 
View this message in context: 
http://www.nabble.com/how-to-get-a-form%27s-field-when-i-click-on-an-ajax-object-tf3660473.html#a10228341
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to