Check OnChangeAjaxBehavior too.
It is bit smarter than AjaxFormComponentUpdatingBehavior and you wont
need to leave the text input field with it.

On Thu, Apr 19, 2012 at 3:34 PM, Tom Eugelink <[email protected]> wrote:
>
> Thank you!
>
> The problem apparently was that I had the ajax bound to "onblur" and not to
> "onchange". Copied that from some example on the web.
>
> Tom
>
>
>
>
>
> On 19-4-2012 14:12, Martin Grigorov wrote:
>>
>> field1.add(new AjaxFormComponentUpdatingBehavior("onchange") {
>>   onUpdate(target) {
>>     buildingNr = getComponent.getModelObject();
>>     if (buildingNr == ...) {
>>        field2.setModelObject(newValue)
>>        target.add(field2)
>>     }
>>   }
>> })
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to