清除对话框JSF

时间:2013-04-09 16:14:00

标签: jsf primefaces

我尝试了很多东西,但它没有用,我有一个向导进入一个对话框,当我提交表格并重新打开对话框时,我发现它在最后一个雕像中,最后一个数据是我的代码:

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

2 个答案:

答案 0 :(得分:0)

Primefaces向导具有“step”属性来设置“当前步骤的ID”,您可以设置要显示的标签的Id:

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

豆:

if(true){
tabIndex = "personal";
}

答案 1 :(得分:0)

    <p:dialog id="roleMenuDialog" widgetVar="menuRoleName"
                                    modal="true" header="Update User Role" resizable="false"
                                    width="220" draggable="false" onHide="desableScroll(1);" onShow="desableScroll(0);">

                                    <p:ajax event="close" resetValues="msgRole" immediate="true" update="roleMenuDialog"/>
                                    <h:message for="activeRoleMenu" id="msgRole"
                                        style="color:red;" />
                                    <p:outputPanel id="panelGridMenu" layout="block">
                                        <h:panelGrid columns="2" styleClass="cleanTable">
                                            <p:selectOneMenu id="activeRoleMenu"
                                                value="#{userAdministrationBean.selectedRoleMap}"
                                                style="width:130px;" required="true"
                                                requiredMessage="#{msg['useradmin.required.role']}">
                                                <f:selectItem itemLabel="-- SELECT ROLE --"
                                                    noSelectionOption="true" />
                                                <f:selectItems
                                                    value="#{userAdministrationBean.userRolesMapDtos}"
                                                    var="role" itemValue="#{role}"
                                                    itemLabel="#{role.roleId.roleName}" />
                                                <f:converter
                                                    converterId="com.dgsl.jam.convertor.GenericConvertor" />
                                            </p:selectOneMenu>

                                            <p:commandButton id="activeRoleSaveButton"
                                                styleClass="btn btn-default btn btn-default-userRole"
                                                value="OK"
                                                actionListener="#{userAdministrationBean.updateUser(index, admin,'activeRoleMenu','activeRoleEditButton','activeRoleSaveButton','activeRoleCancleButton', 'rolePanelGroup')}"
                                                update="msgRole,activeRole" process="@this,panelGridMenu" />
                                        </h:panelGrid>
                                    </p:outputPanel>
                                </p:dialog>