Re: [Wicket-user] how to get a form's field when i click on an ajax object

2007-05-02 Thread wicket0123
I have a form which extends wicket form: MyForm extends Form In the constructor, I have this line: super(formId, new CompoundPropertyModel(new SignUpFormModel())); SignUpFormModel is a Java class that contains my form fields. After the super call, i add the components: fc =

Re: [Wicket-user] how to get a form's field when i click on an ajax object

2007-04-30 Thread ChuckDeal
igor.vaynberg wrote: if you use wicket validators and the component is invalid the onerror() will be called instead of onupdate() the value is available via getformcomponent().getmodelobject() inside onupdate() -igor On 4/27/07, wicket0123 [EMAIL PROTECTED] wrote: I want to use

Re: [Wicket-user] how to get a form's field when i click on an ajax object

2007-04-28 Thread Martijn Dashorst
Also, attach the formcomponentupdate behavior to the field that needs to be updated, not to a button. Martijn On 4/28/07, wicket0123 [EMAIL PROTECTED] wrote: I want to use ajax to check if a field value is valid w/o submitting the entire form. I add AjaxFormComponentUpdatingBehavior to my

Re: [Wicket-user] how to get a form's field when i click on an ajax object

2007-04-28 Thread wicket0123
when i use getformcomponent.getmodleobject inside the onupdate, it throws nullpointer exeption. see code below, ((SignUpFormModel) getFormComponent().getModelObject()).getUserName() If I use this, i have no problem: ((SignUpFormModel)

Re: [Wicket-user] how to get a form's field when i click on an ajax object

2007-04-28 Thread Igor Vaynberg
you most likely did not give the formcomponent a model. paste the relevant code -igor On 4/28/07, wicket0123 [EMAIL PROTECTED] wrote: when i use getformcomponent.getmodleobject inside the onupdate, it throws nullpointer exeption. see code below, ((SignUpFormModel)

[Wicket-user] how to get a form's field when i click on an ajax object

2007-04-27 Thread wicket0123
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

Re: [Wicket-user] how to get a form's field when i click on an ajax object

2007-04-27 Thread Igor Vaynberg
if you use wicket validators and the component is invalid the onerror() will be called instead of onupdate() the value is available via getformcomponent().getmodelobject() inside onupdate() -igor On 4/27/07, wicket0123 [EMAIL PROTECTED] wrote: I want to use ajax to check if a field value