AjaxRequestTarget.get() returns the current AjaxRequestTarget, if there is one, otherwise it returns null. use that in the getChoices callback and you should be fine.
On Sun, May 23, 2010 at 8:17 PM, Katherine <kati...@rambler.ru> wrote: > Hello, > > Can anybody help newbie with following question: > I'm using AutocompletText field with > AjaxFormComponentUpdatingBehavior("onchange"), which catches onchange event, > when user selects item from the list. > It appeared so that sometimes I get too many items for DropDownList, and > I don't want it to hang and I need to update a warning label in case there > are too many items for the DropDownList. > That's why I need to make a check after each character is inputed. That > is well done in getChoices method, but in that method I don't have > AjaxRequestTarget to update the label. > And when I use OnChangeAjaxBehavior everything is good with updating > label, but it doesn't catch the event when item from DropDownList is > selected. > I can't use bot AjaxFormComponentUpdatingBehavior and > OnChangeAjaxBehavior because the last one extend the first. > Is there a possibility to handle my problem? Or may be it is already > solved, but I wasn't able to find the solution, so will be greatfull for the > link. > I'm using wicket 1.3.7 > > Big thanks in advance! > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >