You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by eugenebalt <eu...@yahoo.com> on 2011/07/31 15:55:21 UTC

Form Model Not Available for AjaxFallbackLink

I have a TextField and an AjaxFallbackLink. The AjaxFallbackLink, when
clicked, must read the value of the TextField. But that value isn't
available yet, because there has been no form submit and no model binding
yet.

Both getInput() and getModelObject() return NULL at the time of the
AjaxFallbackLink's click. Any ideas how to solve that?

Thanks

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Form-Model-Not-Available-for-AjaxFallbackLink-tp3707795p3707795.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Form Model Not Available for AjaxFallbackLink

Posted by vineet semwal <vi...@gmail.com>.
second suggestion is good too ,you will have to specify the js event
say onchange/onblur for ajaxformcomponentupdatingbehavior
when that even will be fired,your model will be updated with the new
value,you dont have to use ajaxsubmitlink in that case..

 it depends on which way you want to do..


On Mon, Aug 1, 2011 at 1:45 AM, eugenebalt <eu...@yahoo.com> wrote:
> The first suggestion worked. Thanks.
>
> Regarding AjaxUpdatingBehavior, yes my component was Ajax, but the data was
> not binding to the model at the time of the click because we weren't
> submitting the form. I needed to read the value entered for one of the
> components and it wasn't available at that time.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Form-Model-Not-Available-for-AjaxFallbackLink-tp3707795p3708330.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
thank you,

regards,
Vineet Semwal

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Form Model Not Available for AjaxFallbackLink

Posted by eugenebalt <eu...@yahoo.com>.
The first suggestion worked. Thanks. 

Regarding AjaxUpdatingBehavior, yes my component was Ajax, but the data was
not binding to the model at the time of the click because we weren't
submitting the form. I needed to read the value entered for one of the
components and it wasn't available at that time.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Form-Model-Not-Available-for-AjaxFallbackLink-tp3707795p3708330.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Form Model Not Available for AjaxFallbackLink

Posted by Rodrigo Heffner <ro...@gmail.com>.
I had the same question last week. This is probably what you want:
http://wicket.apache.org/apidocs/1.4/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.html
.

Add this to your component and it's model will be updated without submitting
the form.
On 31 Jul 2011 15:05, "vineet semwal" <vi...@gmail.com> wrote:
> use ajaxsubmitlink and it will submit the form the textfield is in ..
>
>
>
> On Sun, Jul 31, 2011 at 7:25 PM, eugenebalt <eu...@yahoo.com> wrote:
>> I have a TextField and an AjaxFallbackLink. The AjaxFallbackLink, when
>> clicked, must read the value of the TextField. But that value isn't
>> available yet, because there has been no form submit and no model binding
>> yet.
>>
>> Both getInput() and getModelObject() return NULL at the time of the
>> AjaxFallbackLink's click. Any ideas how to solve that?
>>
>> Thanks
>>
>> --
>> View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Form-Model-Not-Available-for-AjaxFallbackLink-tp3707795p3707795.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
>
> --
> thank you,
>
> regards,
> Vineet Semwal
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>

Re: Form Model Not Available for AjaxFallbackLink

Posted by vineet semwal <vi...@gmail.com>.
 use ajaxsubmitlink and it will submit the form the textfield is in ..



On Sun, Jul 31, 2011 at 7:25 PM, eugenebalt <eu...@yahoo.com> wrote:
> I have a TextField and an AjaxFallbackLink. The AjaxFallbackLink, when
> clicked, must read the value of the TextField. But that value isn't
> available yet, because there has been no form submit and no model binding
> yet.
>
> Both getInput() and getModelObject() return NULL at the time of the
> AjaxFallbackLink's click. Any ideas how to solve that?
>
> Thanks
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Form-Model-Not-Available-for-AjaxFallbackLink-tp3707795p3707795.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
thank you,

regards,
Vineet Semwal

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org