<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: PrimeFaces: Autocomplete using user dialog method</title><link>https://answers.axonivy.com/questions/61/primefaces-autocomplete-using-user-dialog-method</link><description>&lt;p&gt;Hi there&lt;/p&gt;
&lt;p&gt;I've created some workflows in Ivy 4.x, using the Web Page component in the designer. Most of the functionality was coded with jQuery.&lt;/p&gt;
&lt;p&gt;Now I'd like to switch to Ivy 5. On my old workflow I used jQuery-UI autocomplete to get a list of organization units from our LDAP server. According to the PrimeFaces documentation there is a autocomplete tag. While there are examples on how to use the functions with a regular Java-environement, I couldn't figure out how to use it in Xpert.Ivy.&lt;/p&gt;
&lt;p&gt;What I've got is an user-dialog, consisting of one start method and another method, which should retrieve the results from the LDAP server, based on the query-text in the input field.&lt;/p&gt;
&lt;p&gt;I'd be happy if someone could explain to me, how I'd have to setup the autocomplete tag and what format my method has to return, in order for the autocomplete to work.&lt;/p&gt;
&lt;p&gt;Thank you :)
Ahatius&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/61/primefaces-autocomplete-using-user-dialog-method" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 11 Nov 2013 12:57:48 -0500</lastBuildDate><item><title>Comment by ahatius on Flavio Sadeghi's answer</title><link>https://answers.axonivy.com/questions/61/primefaces-autocomplete-using-user-dialog-method#65</link><description>&lt;p&gt;&lt;a href="/users/5/peter-st%C3%B6ckli/"&gt;&lt;a href="/users/5/peter-st%C3%B6ckli/"&gt;@peter&lt;/a&gt;&lt;/a&gt;-stöckli Thanks for the clarification, works as described :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ahatius</dc:creator><pubDate>Mon, 11 Nov 2013 12:57:48 -0500</pubDate><guid>https://answers.axonivy.com/questions/61/primefaces-autocomplete-using-user-dialog-method#65</guid></item><item><title>Comment by Peter Stöckli on Flavio Sadeghi's answer</title><link>https://answers.axonivy.com/questions/61/primefaces-autocomplete-using-user-dialog-method#64</link><description>&lt;p&gt;&lt;a href="/users/27/ahatius/"&gt;&lt;a href="/users/27/ahatius/"&gt;@ahatius&lt;/a&gt;&lt;/a&gt;: It is a bit strange, but it seems to work correctly ;) The sample has an autocomplete form that is case sensitive. So if you type 's' it shows all countries which contain an 's'. And if you type 'Swit' (with capital S) it should show Switzerland in the list. Maybe we better change this to avoid further confusion.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Stöckli</dc:creator><pubDate>Mon, 11 Nov 2013 12:17:11 -0500</pubDate><guid>https://answers.axonivy.com/questions/61/primefaces-autocomplete-using-user-dialog-method#64</guid></item><item><title>Comment by ahatius on Flavio Sadeghi's answer</title><link>https://answers.axonivy.com/questions/61/primefaces-autocomplete-using-user-dialog-method#63</link><description>&lt;p&gt;Thanks for the hint, that's useful to begin with. What's actually strange: Even the provided FormDemo Autocomplete doesn't seem to work properly. When typing "s", all countries containing a s are showed, but as soon as I extend it to swit (for Switzerland) the suggestions disappear. I tried creating a completely new project and imported the demo into it, but the problem still exists.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ahatius</dc:creator><pubDate>Sun, 10 Nov 2013 14:05:11 -0500</pubDate><guid>https://answers.axonivy.com/questions/61/primefaces-autocomplete-using-user-dialog-method#63</guid></item><item><title>Answer by Flavio Sadeghi</title><link>https://answers.axonivy.com/questions/61/primefaces-autocomplete-using-user-dialog-method/62</link><description>&lt;p&gt;An example project is delivered within Xpert.ivy Designer which points out different aspects of a classic
 formular. On this formular the country selection is implemented with a AutoComplete field. Import the project into your workspace and inspect the demo(s) for an easy reference.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Location of the demo project: &lt;code&gt;[Designer]/applications/samples/HtmlDialogDemos&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;ID/Location of the HTML User Dialog: &lt;code&gt;ch.ivyteam.htmldialog.demo.input.FormDemo&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Basically the method in the Logic get the search-input as String and returns a list of Strings for the proposed selection. Short: &lt;code&gt;List&amp;lt;String&amp;gt;:mySearchMethod(String myUserInput)&lt;/code&gt;. The method is called with  "&lt;code&gt;&amp;lt;p:autoComplete completeMethod="#{logic.mySearchMethod}"&amp;gt;"&lt;/code&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Flavio Sadeghi</dc:creator><pubDate>Sun, 10 Nov 2013 00:40:57 -0500</pubDate><guid>https://answers.axonivy.com/questions/61/primefaces-autocomplete-using-user-dialog-method/62</guid></item></channel></rss>