The second and third parameters to DefaultAutocompleteModel are the names
of fields of the objects you pass as the first parameter. I.e. if you had
a User object with the fields id and name and you wanted id to be the
keyField and name to be the labelField you would have to have getters for
those fields in your object and pass id and name as keyField and
labelField respectively. If you just want to have simple strings you'll
have to write a wrapper object around them.
Also have a look at the Suggest component in the script.aculo.us section.

Uli

Am Mo, 17.03.2008, 10:56, schrieb uday65:
>
> Hello EveryBody,
> I am facing the problem while creating the Autocompleter in tapestry 4.1.
> What i am doing...
> in html
>
>
>
> in java
> public IAutocompleteModel model = null;
>       public IAutocompleteModel getModel() {
>               System.out.println("in model");
>               if (model == null) {
>                       model = new 
> DefaultAutocompleteModel(Arrays.asList("aaaa", "bbbb",
> "dddd"), "id", "name");
>               }
>               return model;
>       }
>
>       public abstract String getSelect();
>
>       public abstract String getId();
>
>       public abstract String getName();
> ----------------------
> One drop down is created but when i type aaa in it the list of available
> values are not displayed.
> i.e the appear drop down is empty
> Please can any one tell what is the problem,Or give me the link of example
> with the source code.
> I really very thankful to all of you
> Thanks in advance,
> Uday Mahajan
> --
> View this message in context:
> http://www.nabble.com/How-to-use-Autocompleter-in-tapestry4.1-tp16091320p16091320.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to