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

Reply via email to