I would like to know if just like it is possible to pass parameters to a function of a "remoteCommand" if it is possible to receive the return? Like the example:
Xhtml: <p:remoteCommand name="myRemoteCommand" actionListener="#{testBean.testRemote }" />
JavaSctript: myRemoteCommand([{name:"id", 1}]);
Bean:
public void testRemote()
{
String[] id = JSFUtil.getRequestParameterMap().get("id");
System.out.println(id);
}
I need my "testRemote" function to return a value, and I capture this value after the call, as an example:
JavaSctript: alert(myRemoteCommand([{name:"id", 1}]));
Bean:
public String testRemote()
{
String[] id = JSFUtil.getRequestParameterMap().get("id");
System.out.println(id);
return “Test Success”;
}