我想将参数node传递给将由远程命令调用的函数doAction ,我该如何传递它?假设节点有属性名称和类型,我想在 doAction 中使用它们,我该如何传递变量?
谢谢!
public static class node {
String name;
String type;
//setters getters etc...
}
<p:remoteCommand name="doWhatYouWant" action="#{managedBean.doAction}" />
<p:treeTable value="#{managedBean.tree}" var="node">
<p:column>
<p:commandLink value="Invoke action" onclick="doWhatYouWant([params...])" />
</p:column>
</p:tree>
public void doAction() {
// do something with var="node"
}