Also depending on your situation, clearInput might be necessary?

**
Martin

2009/2/12 Luca Provenzani <[email protected]>:
> i think you can put the field of the model/bean of the form to empty and
> then call target.addComponet(tagsContainer);
> what kind of effect do you want? If you need to call javascript you can use
> target.appendJavaScript()...
>
> Luca
>
> 2009/2/12 Azzeddine Daddah <[email protected]>
>
>> Hello everyone,
>>
>> Could someone please tell me how I can clear the selected value of an
>> AutoCompleteTextField. I've an AutoCompleteTextField and a link which
>> should
>> clear the value of the text field after clicking it. I would also do some
>> effects after clearing this value. Below my code:
>>
>> final AutoCompleteTextField<String> auto = new
>> AutoCompleteTextField<String>("auto", new Model<String>())
>> ...
>> form.add(auto);
>>
>> form.add(new IndicatingAjaxLink<String>("addLink", new
>> Model<String>("Add"))
>> {
>>        @Override
>>        public void onClick(AjaxRequestTarget target) {
>>            String inputValue = auto.getValue();
>>            auto.clearInput();
>>            // How to clear the auto's value and add some effects to the
>> tagsContainer?
>>            target.addComponent(tagsContainer);
>>        }
>> });
>>
>>
>> Kind Regards,
>>
>> Hbiloo
>>
>

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

Reply via email to