When i looked with firebug i saw that the list had inline style and the top attribute was set to -10000 px or something like that . When i modified that value i could see my list. So i am wondering if this could be a primefaces bug or i did something wrong in my project.
I mention that if i enter the same query the second time that suggestion list is shown.
This is the code for the autocomplete component :
Code: Select all
<p:autoComplete id="filterByMachine" value="#{notificationListViewLazyModel.selectedMachine}" queryDelay="700" scrollHeight="150"
completeMethod="#{notificationListViewLazyModel.complete}" converter="#{notificationListViewLazyModel.converter}"
var="p" itemLabel="#{p.platformName} #{p.serial} #{p.sitename}"
itemValue="#{p}" forceSelection="true" size="48" >
<p:ajax event="itemSelect" update="filterMenu notificationListDataTable" listener="#{notificationListViewLazyModel.showSelectedValues}"/>
</p:autoComplete>
Code: Select all
public List<NotifFilterDTO> complete(String query){
List<NotifFilterDTO> results = new ArrayList<NotifFilterDTO>();
String queryLowerCase = query.toLowerCase();
for (NotifFilterDTO filter : comboFilterList) {
if((filter.getPlatformName().toLowerCase().indexOf(queryLowerCase) != -1) || (filter.getSerial().toString().toLowerCase().indexOf(queryLowerCase) != -1) || (filter.getSitename().toLowerCase().indexOf(queryLowerCase) != -1))
{
results.add(filter);
}
}
return results;
}
Best regards,Vio