If you copy-paste your code here we can probably dig into it better  ...

**
Martin

2009/2/12 Azzeddine Daddah <waarhei...@gmail.com>:
> Thanks guys for the quick replay.
> Martin: What I want to do is to select a value from the auto complete text
> field, and when clicking the "Add" button, the selected value should be
> added to the tagsContainer (which is in fact a div that wraps the added
> values) and cleared from the text field.
>
> Luca: I've tried your suggestion but it didn't help. I've also tried to
> clear the text field using Javascript
> target.appendJavascript(String.format("document.getElementById('%s').value =
> ''", auto.getOutputMarkupId()));
> but it also didn't work.
>
> Are there any other suggestions ways to implement this?
>
>
>
> Kind Regards
>
> Hbiloo
>
>
>
>
>
> On Thu, Feb 12, 2009 at 11:24 AM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
>> Also depending on your situation, clearInput might be necessary?
>>
>> **
>> Martin
>>
>> 2009/2/12 Luca Provenzani <eufor...@gmail.com>:
>> > 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 <waarhei...@gmail.com>
>> >
>> >> 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: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>

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

Reply via email to