<h:panelGrid columns="3" >
<p:inputText styleClass="textbox" id="search" style="margin-top:30px;width: 340px !important;" value="#{testBean.name}"/>
<p:watermark for="search" value="searchText" />
<p:commandButton value="search" process="@form" styleClass="btn-primary" style="margin-top:18px;" action="#{testBean.search}" update="aaa"/>
</h:panelGrid>
<p:pickList id="aaa" value="#{testBean.searchList}" var="contact"
itemLabel="#{contact.firstName}" itemValue="#{contact}" rendered="true" >
<!-- <p:ajax event="transfer" listener="#{contactManagedBean.onTransfer}" />-->
</p:pickList>
and action method is
public DualListModel<ContactBean> search(){
String searchString= getSearch();
contacts= manageConatctDelegate.search(searchString);
List<ContactBean> contactTarget= new ArrayList<ContactBean>();
contactsSource.add(contacts.get(0));
contactList = new DualListModel<ContactBean>(contactsSource,contactTarget);
return contactList;
}
I am working on the pick list example. I have an input box where I can search name. I have a method to search a string which will retrieve contact object. After calling search method I am updating list. I have checked the list and list is getting contact. But still pick list is blank on page.