【发布时间】:2013-05-25 14:46:40
【问题描述】:
我正在做一个增强项目。有一个父 <form> 元素。我在这个父表单中包含了一个 XHTML 文件。包含的 XHTML 文件有一个<a4j:commandLink>。不会调用此操作。
现在,如果我将<a4j:commandLink> 包装在<h:form> 中,这将起作用。这样,父窗体的动作和<a4j:commandLink> 的动作一样被调用。但不鼓励嵌套形式。
我不能使用父表单的操作,因为它转到一个 servlet 并且我的操作在一个
请求范围 bean。我无法访问 servlet 中的 bean。
任何关于如何在没有<h:form> 的情况下进行操作调用的帮助都非常感谢。
下面是它的样子:
<form id="parentFormId" name="parentFormId" action="aservletaction">
<a4j:outputPanel id="includedRegion">
<ui:include src="setupView.xhtml"></ui:include>
</a4j:outputPanel>
</form>
setupView.xhtml 的内容:
<ui:composition>
<a4j:outputPanel>
<h:form>
<a4j:commandLink action="#{myBean.actionMethod}"
render="adatatableid" limitRender="true"/>
</h:form>
</ui:composition>
【问题讨论】:
标签: jsf-2 xhtml richfaces ajax4jsf