Note that there are some explanatory texts on larger screens.

plurals
  1. PO<p:pickList> not showing on button click
    primarykey
    data
    text
    <p>I have a code: </p> <pre><code>&lt;h:panelGroup&gt; &lt;p:panel&gt; &lt;p:commandButton value="Go" style="background:#25A6E1;color:#fff;font-family:'Helvetica Neue',sans-serif;font-size:10px;border-radius:4px;" actionListener="#{customCalender.searchUserofList}" update="picklist"&gt; &lt;f:attribute name="trigram" value="#{customCalender.listTrig}"/&gt; &lt;f:attribute name="firstName" value="#{customCalender.listFname}"/&gt; &lt;f:attribute name="lastName" value="#{customCalender.listLname}"/&gt; &lt;f:attribute name="teamName" value="#{customCalender.selectedTeam}"/&gt; &lt;/p:commandButton&gt; &lt;/p:panel&gt; &lt;/h:panelGroup&gt; &lt;h:panelGroup id="picklist" rendered="#{not empty customCalender.searchList}"&gt; &lt;p:pickList value="#{customCalender.searchList}" var="user" itemLabel="#{user}" itemValue="#{user}"/&gt; &lt;/h:panelGroup&gt; </code></pre> <p>and the <code>searchList</code> generates on button click in the method <code>searchUserofList()</code>.</p> <p>I declared <code>searchList</code> as: </p> <p>private DualListModel searchList;</p> <pre><code>public DualListModel&lt;String&gt; getSearchList() { return searchList; } public void setSearchList(DualListModel&lt;String&gt; searchList) { this.searchList = searchList; } </code></pre> <p>and its being defined in method <code>searchUserofList</code> method like:</p> <pre><code>List&lt;EmpBean&gt; list = new ArrayList&lt;EmpBean&gt;(); list = getSearchResult("people",trigram,firstName,lastName,teamName); Iterator&lt;EmpBean&gt; iterator = list.iterator(); List&lt;String&gt; userList = new ArrayList&lt;String&gt;(); List&lt;String&gt; userTarget = new ArrayList&lt;String&gt;(); while(iterator.hasNext()){ String userName = iterator.next().getStrUserid(); System.out.println("Name :: "+userName); userList.add(userName); } searchList = new DualListModel&lt;String&gt;(userList, userTarget); </code></pre> <p>But when button clicked it gets the list but the picklist with the values are not shown. How can I make that correct to show the picklist?Please suggest.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload