Thanks Martin, worked like a charm. This component is really cool.
Ryan
| Martin Marinschek <[EMAIL PROTECTED]>
09/25/2005 08:54 PM
|
|
It depends on whether you set the maxSize parameter - find below an
excerpt of the corresponding sandbox example.
regards,
Martin
public class InputSuggestAjaxBean
{
public List getItems(String prefix)
{
List li = new ArrayList();
li.add(prefix+1);
li.add(prefix+2);
li.add(prefix+3);
li.add(prefix+4);
li.add(prefix+5);
li.add(prefix+6);
return li;
}
public List getItems(String prefix, Integer maxSize) {
List li = new ArrayList();
for(int i = 0; i < maxSize.intValue(); i++) {
li.add(prefix+ " " +(i+1));
}
return li;
}
}
On 9/26/05, Ryan Wynn <[EMAIL PROTECTED]> wrote:
>
> I have the following
>
> <s:inputSuggestAjax suggestedItemsMethod="#{app.findMessages}"
> styleLocation="" />
>
> what is the expected signature for findMessages? Retuns a list of
> SelectItems? take any parameters?
>
> How do I get the value of the input field; what the user has typed so far?
> I assume this would be passed in the ajax request, but under what parameter
> name?
>
> Thanks,
> Ryan
>
>
--
http://www.irian.at
Your JSF powerhouse -
JSF Trainings in English and German

