我尝试了很多东西,但它不工作,我有一个向导进入一个对话框,当我提交表单并重新打开对话框时,我发现它在最后的雕像与最后的数据,这是我的代码:
<p:wizard id="wizForNewIssue" widgetVar="wizNewIsssue"
flowListener="#{managedBeanProjects.onFlowProcess}"
style="width:100%;">
<p:tab id="personal" title="Details">
<p:panel style="width:800px;height:200px">
<h:messages errorClass="error" />
<h:panelGrid id="new0" columns="3">
...........
</h:panelGrid>
<f:facet name="footer">
<h:outputText value="Skip to last: " />
<h:selectBooleanCheckbox value="#{managedBeanProjects.skip}" />
</f:facet>
</p:panel>
</p:tab>
<p:tab id="version" title="Version Details">
<p:panel style="width:800px;height:200px">
............
</p:panel>
</p:tab>
<p:tab id="goConfirm" title="Confirmation">
<p:panel style="width:800px;height:200px">
<h:panelGrid id="final" columns="4">
.............
</h:panelGrid>
<f:facet name="footer">
<p:commandButton value="Submit"
update=":form1:growl :form1:dialogNewIssue "
actionListener="#{managedBeanProjects.newIssue}"
oncomplete="newDialog.hide()" />
</f:facet>
</p:panel>
</p:tab>
</p:wizard>
</p:dialog>
Primefaces wizard有"step"属性来设置" flow中当前步骤的Id ",您可以设置要显示的选项卡的Id:
<p:wizard step="#{managedBeanProjects.tabIndex}" id="wizForNewIssue" widgetVar="wizNewIsssue"
flowListener="#{managedBeanProjects.onFlowProcess}"
style="width:100%;">
豆:
if(true){
tabIndex = "personal";
}