Have you checked out the MyFaces examples?

You can look into the source-code there, you will find a full working example...

Essentially, you will need to supply a list from your backing bean.

regards,

Martin

On 9/20/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>  
> I have set the Client State... 
> What else could be? 
>  
> -----Ursprüngliche Nachricht-----
> Von: Maxence Dewil [mailto:[EMAIL PROTECTED]
> Gesendet: Dienstag, 20. September 2005 18:14
> An: MyFaces Discussion
> Betreff: RE: InputSuggestAjax Problems - How does this tag work?
> 
>  
>  
> 
> Hi, 
> 
>   
> 
> I think the inputSuggestAjax works only with the "client" state saving
> method (not the default "server" method). 
> 
>   
> 
>   <context-param> 
> 
>     <param-name>javax.faces.STATE_SAVING_METHOD</param-name> 
> 
>     <param-value>client</param-value> 
> 
>   </context-param> 
> 
>   
> 
> Regards, 
> 
>   
> 
> Maxence Dewil 
> 
>   
>  
>  ________________________________
>  
> 
> De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Envoyé : mardi 20 septembre 2005 18:04
> À : users@myfaces.apache.org
> Objet : InputSuggestAjax Problems - How does this tag work? 
> 
>   
> 
> I have just tested the InputSuggestAjax, but it doesn't seem to work, like i
> want: 
> 
> Here is my code-snippet: 
> 
> JSP Site: 
> 
> <%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%> 
> <%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%> 
> <%@ taglib uri="http://myfaces.apache.org/sandbox";
> prefix="s"%> 
> 
> <html> 
> <f:view> 
>         <head> 
>         <title>text</title> 
>         </head> 
>         <body> 
> 
>         <h:form> 
>                 <table class="haupttabelle" cellspacing="0"> 
>                         <tr> 
>                                 <td> 
>                                 <s:inputSuggestAjax
> suggestedItemsMethod="#{queryHelper.getItems}"/> 
>                                 </td> 
>                         </tr> 
>                 </table> 
>         </h:form> 
> 
>         </body> 
> </f:view> 
> </html> 
> 
>   
> 
> Backing Bean: 
> 
> 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; 
>     } 
> 
> I have copied the code from the example, but when I enter something in the
> textbox, nothing happens... 
> 
> Please can anybody describe me, how this inputsuggestAjax tag works? 
> I want to read the Data for the InputSuggestAjax Tag from a Database. Do I
> only have to iterate through the result and add it to an arraylist? Can I
> also use a Map for InputSuggestAjax? 
> 
> Perhaps are there some tutorials? 
> 
> Thx for help! 
> 
> 
> 
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> If you have received this email in error please notify your system manager.
> This footnote also confirms that this email message has been swept for the
> presence of computer viruses.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> If you have received this email in error please notify your system manager.
> This footnote also confirms that this email message has been swept for the
> presence of computer viruses.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  


-- 

http://www.irian.at
Your JSF powerhouse - 
JSF Trainings in English and German

Reply via email to