[英]Can you cascade ajax rendered content in JSF 2.0?
例:
<h:form>
<h:commandLink action="#{someBean.someAction}">
<f:ajax render="somePanel"/>
</h:commandLink>
<h:panelGroup id="somePanel">
<h:commandLink action="#{someBean.otherAction}">
<f:ajax render="otherPanel">
</h:commandLink>
<h:panelGroup id="otherPanel">
some content here
</h:panelGroup>
</h:panelGroup>
</h:form>
显然,我之所以问是因为无法完成这项工作。 嵌套的commandLink完全死了。
看起来不错。 当您实际上在链接或其父级之一上设置了rendered
属性并且bean在请求范围内时,它将失败。 如果将Bean放在视图范围内,并且您总是从应该返回相同视图的链接操作中返回null
或void
,这应该可以工作。 这样,将保留rendered
属性的条件。 JSF即在表单提交的“申请请求值”阶段重新检查此条件,以防止黑客入侵/篡改请求。
我认为第一个命令链接应该在h:form中
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.