-2
I wonder if in the same way it is possible to pass parameters to a function of a "remoteCommand" if it is possible to receive the return? Just 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 that 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”;
}
Leonardo, welcome to [en.so]. Here the questions should be posted only in Portuguese, click on [Edit] in your question and translate that we will help you or, if you really want to post in English, you should go to [so].
– Jéf Bueno