【发布时间】:2015-05-10 11:40:05
【问题描述】:
在 JSF 中,我可以使用 ajax 更新组件:
<h:commandButton ...>
<f:ajax render="@form" />
</h:commandButton>
我在网上找到了其中一些值:@form @this @parent @none @region @all。
<f:ajax> 附带的标准值是否完整列表?这些值是否有我可以查找的特殊名称?
【问题讨论】:
在 JSF 中,我可以使用 ajax 更新组件:
<h:commandButton ...>
<f:ajax render="@form" />
</h:commandButton>
我在网上找到了其中一些值:@form @this @parent @none @region @all。
<f:ajax> 附带的标准值是否完整列表?这些值是否有我可以查找的特殊名称?
【问题讨论】:
看看<f:ajax> tag documentation。
渲染
评估为
Collection<String>。将参与请求处理生命周期的“渲染”部分的组件的 clientId。如果指定了文字,则标识符必须用空格分隔。可以在标识符列表中指定任何关键字“@this”、“@form”、“@all”、“@none”。如果未指定,则假定默认值为“@none”。例如,@this clientIdOne clientIdTwo。
您提到的其他人(@region 和 @parent)可以识别为来自 PrimeFaces <p:ajax>。因此,如果您在使用 <f:ajax> 时确实遇到了问题,那么您现在应该明白原因了。
【讨论】: