p:autoComplete Complete Method returns the list in the backend but is not showing in the UI

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


p:autoComplete Complete Method returns the list in the backend but is not showing in the UI



I have this part in the file


<p:autoComplete required="true" requiredMessage="Value required"
valueChangeListener="#{xxxxx.updateListener}"
id="yy" value="#{ybean.prop}"
completeMethod="#{xxxxx.autoCompleteValues}"
placeholder="Type a Name..." >
</p:autoComplete>



When I am trying to get the list from autoCompleteValues of xxxxx(RequestScoped) class I am able to return it in the backend but it is not displaying in the UI.



Please find the below backend code whose class is RequestScoped:


public List autoCompleteValues(String name) {


List finalList = new ArrayList<>();
try {
//BackingWorkBean is sessionScoped
BackingWorkBean bean = (BackingWorkBean)getValueFromTheFacesSession("backingWkbean");
if(bean == null){
bean = new BackingWorkBean();
setValueToFacesSession(bean, "backingWkbean");//Here getting and putting the objects in FacesContext.externalContext
}

bean.setName(name); //name property to attach it to url query and call API

forwardToServlet();


//forwarded to a Servlet which calls an API and returns the list(Can't disclose details of servlet call) which is set to nameList of bean


finalList= bean.getNameList();

}

catch (Exception e) {
e.printStackTrace();
// TODO: handle exception
}
return finalList;
}



What might be the reason?





I do'nt see any backend code... Minimal, Complete, and Verifiable example please... (and tried a viewscoped bean?) And post version info
– Kukeltje
yesterday







Please find the backend code. I can't disclose the entire thing except for few main things. However I am able to return the list which I have checked using debugger breakpoint.
– Manu94
3 hours ago





Sorry, if I cannot try to reproduce, it becomes guessing, asking etc... Costs me too much time. Sorry, but I'm spending my time on question where I can.And there were 2 other questions in my comment...
– Kukeltje
2 hours ago









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Keycloak server returning user_not_found error when user is already imported with LDAP

PHP parse/syntax errors; and how to solve them?

How to scale/resize CVPixelBufferRef in objective C, iOS