Re: Custom autocompletion event 'on selection change'

2010-09-09 Thread Peter Karich
Hi Martin, hi Pieter! wow! This works now and I thought one has to write ajax assembler to make it running ... Thanks a lot! Are the ajax functions documented anywhere? Regards, Peter. > Hi Peter, > > Use wicketAjaxGet() instead of Wicket.Ajax.Request.get(). > The former uses the latter and kno

Re: Custom autocompletion event 'on selection change'

2010-09-09 Thread Martin Grigorov
Hi Peter, Use wicketAjaxGet() instead of Wicket.Ajax.Request.get(). The former uses the latter and knows how to process the xml response returned by AjaxRequestTarget. On Thu, Sep 9, 2010 at 5:54 PM, Peter Karich wrote: > Hi Martin, > > your instructions helped a lot! Now I can send an ajax req

Re: Custom autocompletion event 'on selection change'

2010-09-09 Thread Peter Karich
Hi Martin, your instructions helped a lot! Now I can send an ajax request via * and recieve the request via ** But the problem is that the javascript function 'doUpdateChoices' will only update the choices-divs and not all the targets that I added in the java method 'onSelectionChange'. Do you k

Re: Custom autocompletion event 'on selection change'

2010-09-09 Thread Martin Grigorov
Hi Peter, Looking at the code I think you'll need to touch wicket-autocomplete.js. Copy it to your project and override org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteBehavior#renderHead(IHeaderResponse) so that it loads your .js file. Then make org.apache.wicket.extensions

Re: Custom autocompletion event 'on selection change'

2010-09-09 Thread Peter Karich
Hi Pieter, thanks for your quick response! And sorry, I didn't mention that I am using org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField from wicket extensions. Or did you have another autocomplete component in mind that I am not aware of? Nevertheless I tried the A

Re: Custom autocompletion event 'on selection change'

2010-09-09 Thread Pieter Degraeuwe
add AjaxFormComponentUpdatingBehavior to your dropdownChoice. new AjaxFormComponentUpdatingBehavior("onchange") { @Override protected void onUpdate(AjaxRequestTarget target) { //do the needed stuff here... } }) The onUpdate() will be tri

Custom autocompletion event 'on selection change'

2010-09-09 Thread Peter Karich
Hi, I would like to fire an ajax event every time the user changes the selection of the choices e.g. he switches from 'wiki' to 'wicket' with keys or mouse Which function is necessary to fire such an event on the client side? I never did sth. similar to this and tried (without success + a long ti