我正在将JSF 1.2与RichFace 3配合使用,并且需要更新include标记内的面板,但是需要在运行时从服务器端代码执行此操作,因为这是来自第三个bean的调用。
包含标签:
<ui:insert name="ddlContracts">
<ui:include src="ddlContracts.xhtml" />
</ui:insert>
包含标签中要更新的面板:
<a4j:outputPanel id="pnlWarningAlert" style="margin-left:15px" rendered="#{menuContratosMB.showRejectedWarning eq 'Y'}">
<img id="imgWarningAlert" src="/sicucintrastatic/img/btns/btAttention.png" alt="warning" onclick="redirectToProcessRejectedTransaction()" onmouseover="this.style.cursor='pointer'" style="margin-bottom:-5px" />
</a4j:outputPanel>
父.xhtml上的commandLink
<a4j:commandLink action="#{menuMB.menuSubscribe}" title="Subscribe" reRender="showWarningAlert,pnlWarningAlert">
<label class="hand">Subscribe</label>
</a4j:commandLink>
.java
public void menuSubscribe(){
DdlContractMB contract = new DdlContractMB(); /*call to third bean
that belongs to included .xhtml*/
contract.changeContract(null); //third bean call
//need to update outputPanel here inside the include tag .xhtml
}
有什么想法吗?