0

我尝试了很多东西,但它不起作用,我在对话框中有一个向导,当我提交表单并重新打开对话框时,我在最后一个数据中找到了它,这是我的代码:

     <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>
4

1 回答 1

0

Primefaces 向导具有“步骤”属性来设置“流程中当前步骤的 ID”,您可以设置要显示的选项卡的 ID:

<p:wizard step="#{managedBeanProjects.tabIndex}" id="wizForNewIssue" widgetVar="wizNewIsssue"
        flowListener="#{managedBeanProjects.onFlowProcess}"
        style="width:100%;">

豆:

if(true){
tabIndex = "personal";
}
于 2013-04-09T17:29:20.207 回答