我已經在PrimeFaces對話框內測試了Balusc的inputDate組件:Composite component with multiple input fields。 encodeAll
方法根本不被調用,並且選擇框未被初始化。如文章中所示,複合組件在放置到表單中時工作正常。encodeAll方法在將複合組件置於PrimeFaces p:對話框內時不會調用
爲什麼encodeAll
在對話框內不起作用,如何解決?
編輯1
我用鑽嘴魚科2.1.13和3.4.2 PrimeFaces。
編輯2 以下是我真實項目的示例。我使用你的組件來了解複合組件。我有一個查看帳戶,一個數據表和一個工具欄。按添加應該打開一個自定義嚮導的對話框。該對話框有其自己的形式,但不會顯示該向導。
accounts.xhtml
<h:form id="form">
<ui:include src="/WEB-INF/flows/accounts/accountsTable.xhtml" />
</h:form>
<ui:include src="/WEB-INF/flows/accounts/mainDialog4.xhtml" />
accountsTable.xhtml
<p:dataTable id="accounts" ... />
<p:toolbar>
<p:toolbarGroup align="left">
<p:commandButton value="Add"
action="#{accountsBean.initializeEntity}"
process="@this" update=":actionsDialog4"
oncomplete="actionsDialogWidget4.show()">
<f:setPropertyActionListener value="#{2}"
target="#{accountsBean.operation}" />
<f:setPropertyActionListener value="accountsBean"
target="#{sessionScope.beanName}" />
</p:commandButton>
</p:toolbarGroup>
</p:toolbar>
mainDialog4.xhtml
<p:dialog id="actionsDialog4" widgetVar="actionsDialogWidget4" dynamic="true"
modal="true">
<h:form>
<costom:actionWizard name="wizard" widgetVar="wiz" bean="#{accountsBean}" header="#{accountsBean.entityHeader}" />
</h:form>
</p:dialog>
無法在Tomcat 7.0.37上使用Mojarra 2.1.20和PrimeFaces 3.5進行復制。在將來的問題中,請提及使用的確切庫impl /版本,並且包含[SSCCE](http://stackoverflow.com/tags/jsf/info)。 – BalusC 2013-03-19 12:41:35
添加了庫信息。 – Seitaridis 2013-03-19 12:49:40
現在還是SSCCE。我至少不能用這個最小片段在''中重現它:' ' –
BalusC
2013-03-19 12:50:41