从JavaScript传递参数到p:remoteCommand我想remoteCommand从javascript 传递价值。如果可以的话,我怎么能这样做,如何在支持bean中接收它们?
3 回答

Smart猫小萌
TA贡献1911条经验 获得超7个赞
页:
<p:remoteCommand name="command" action="#{bean.method}" />
JavaScript的:
command({param: 'value'});
豆:
public void method() { String value = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("param");}
添加回答
举报
0/150
提交
取消