我正在尝试本教程,该教程描述了如何将属性设置为服务器调用以及如何分析支持 bean 上的属性;
<h:commandButton id="submit"
actionListener="#{userData.attributeListener}" action="result">
<f:attribute name="value" value="Show Message" />
<f:attribute name="username" value="JSF 2.0 User" />
</h:commandButton>
我用谷歌搜索了很多,但大多数示例显示了如何为同步调用而不是异步调用设置属性:S 所以我的问题是......如果那是 ajax 调用,如何在服务器上发送属性以及如何获取它们在支持 bean 上(参见建议 A 代码片段)?
建议A:
<h:commandButton id="submit"
actionListener="#{userData.attributeListener}" action="result">
<f:ajax>
<f:attribute/>? how to
</f:ajax>
</h:commandButton>
如果有关于这个问题的好教程,请分享链接:)
谢谢