You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "M. Hansen" <mp...@gmail.com> on 2009/04/20 22:46:44 UTC
Passing argument to AjaxAutocompleteBehavior?
Hi,
I have implemented a form with a text field that I autocomplete with
AjaxAutocompleteBehaviour from Wicketstuff.
final TextField myTextField = new TextField("myField", new
PropertyModel(myModelObject, "myField"));
myTextField.add(new AjaxAutocompleteBehavior() {
protected String[] getResults(String input) {
return new String[] {"option1", "option2", .... "optionN"}
}
});
I would like to make getResults(..) dependent on a value that a give
as argument to the Ajax call so the code looks something like this:
myTextField.add(new AjaxAutocompleteBehavior() {
protected String[] getResults(String input) {
return getOptionsDependentOnArgument(argument);
}
});
Is there any way I can do that with AjaxAutocompleteBehaviour?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org