2 Replies Latest reply on Dec 15, 2008 10:56 AM by Boris Ruch

    2 modalPanel Attribute "Rendered" doens't work

    Boris Ruch Newbie

      Hi,
      I've got a Problem with two Modal Panels in the same page. first modal panel (START POPUP RECTIFY) is for select an action. After submit, first popup closes and the other popup (POPUP CONFIRM RECTIFY) apperars.
      Depending on the selection of the frist popup, one part (Panel) in the second popup will not be rendered.

      Does anybody have a clue for solving this problem? Many thanks!

      here is the codefragment:

       <!-- ****************************** -->
       <!-- START POPUP RECTIFY -->
       <!-- ****************************** -->
       <rich:modalPanel id="rectifyPopup"
       autosized="true" shadowOpacity="0">
       <f:facet name="header">
       <h:panelGroup>
       <h:outputText value="#{mbCodes.acqSingleTransaction} #{mbCodes.editing}" />
       </h:panelGroup>
       </f:facet>
       <f:facet name="controls">
       <h:panelGroup>
       <h:graphicImage value="/images/layout/close.png"
       style="cursor:pointer" id="hidelinkEdit" />
       <rich:componentControl for="rectifyPopup" attachTo="hidelinkEdit"
       operation="hide" event="onclick" />
       </h:panelGroup>
       </f:facet>
       <h:form>
       <h:panelGrid columns="2">
      
       <h:panelGroup>
       <!-- Rectify with candidate -->
       <rich:panel id="subPanelWithCandidate">
       <f:facet name="header">
       <h:outputLabel value="#{mbCodes.rectifyWithCandidate}" />
       <h:outputText value="#{mbCodes.rectifyPopUpInfo1}" />
       <h:selectManyCheckbox
       value="#{rectifyController.selectedOptionsWithCandidate}"
       id="checkboxOptions" layout="pageDirection">
       <f:selectItems
       value="#{rectifyController.allOptionsWithCandidate}" />
       </h:selectManyCheckbox>
       <rich:spacer height="20px" />
       <a4j:commandButton id="searchCandidates"
       value="#{mbCodes.searching}"
       actionListener="#{rectifyController.rectifyAcqWithCandidate}"
       action="#{navigationController.startAcqRectify}" />
       <rich:componentControl for="matchCriteriaPopup"
       attachTo="searchCandidates" operation="hide" event="onclick" />
       </rich:panel>
      
       <!-- Rectify without candidate -->
       <rich:panel id="subPanelWithoutCandidate">
       <f:facet name="header">
       <h:outputLabel value="#{mbCodes.rectifyWithoutCandidate}" />
       </f:facet>
       <h:selectOneRadio id="radioOptions" layout="pageDirection"
       value="#{rectifyController.selectedAcqOptionWithoutCandidate}">
       <f:selectItems
       value="#{rectifyController.allAcqOptionsWithoutCandidate}" />
       </h:selectOneRadio>
       <a4j:commandButton onclick="Richfaces.showModalPanel('confirmPopup')" id="confirmButton" value="#{mbCodes.run}"
       actionListener="#{rectifyController.prepareAcqRectifyWithoutCandidate}"
       reRender="acqTable,question,candidateTable,candidatePanel" />
       <rich:componentControl for="rectifyPopup"
       attachTo="confirmButton" operation="hide" event="onclick" />
       </rich:panel>
       </h:panelGroup>
       </h:panelGrid>
       </h:form>
       </rich:modalPanel>
       <!-- ****************************** -->
       <!-- END POPUP MatchCriteria -->
       <!-- ****************************** -->
       <!-- ****************************** -->
       <!-- POPUP CONFIRM RECTIFY -->
       <!-- ****************************** -->
       <rich:modalPanel id="confirmPopup" shadowOpacity="0" width="420" autosized="true">
       <f:facet name="header">
       <h:outputText value="#{mbCodes.confirmation}" />
       </f:facet>
       <f:facet name="controls">
       <h:panelGroup>
       <h:graphicImage value="/images/layout/close.png"
       style="cursor:pointer" id="hidelinkEdit2" />
       <rich:componentControl for="confirmPopup" attachTo="hidelinkEdit2"
       operation="hide" event="onclick" />
       </h:panelGroup>
       </f:facet>
       <h:form>
      
      
       <rich:panel>
       <f:facet name="header">
       <h:outputLabel value="#{mbCodes.rectifyPopUpInfo2}" />
       </f:facet>
       <rich:dataTable value="#{rectifyBean.acqTrx}"
       id="acqTable" var="selAcq">
       <rich:column>
       <f:facet name="header">
       <h:outputText value="#{mbCodes.trxDate}" />
       </f:facet>
       <h:outputText value="#{selAcq.trxDate}">
       <f:converter converterId="dateConverter" />
       </h:outputText>
       </rich:column>
       <rich:column>
       <f:facet name="header">
       <h:outputText value="#{mbCodes.amountGross}" />
       </f:facet>
       </rich:column>
       </rich:dataTable>
       </rich:panel>
      
      
       <rich:panel id="candidatePanel" rendered="#{rectifyController.renderCandidate}">
       <f:facet name="header">
       <h:outputLabel value="#{mbCodes.selectedCandidate}" />
       </f:facet>
       <rich:dataTable value="#{rectifyBean.acqCandidates}"
       id="candidateTable" var="acqCandidates">
       <rich:column>
       <f:facet name="header">
       <h:outputText value="#{mbCodes.trxDate}" />
       </f:facet>
       <h:outputText value="#{acqCandidates.trxDate}"/>
       </rich:column>
       <rich:column>
       <f:facet name="header">
       <h:outputText value="#{mbCodes.amountGross}" />
       </f:facet>
       </rich:column>
       </rich:dataTable>
       </rich:panel>
      
      
       <h:panelGrid columns="1">
       <rich:spacer height="10px" />
       <h:outputLabel id="question"
       value="#{mbCodes.deliverableCorrection}: #{rectifyController.selectedAcqOptionWithoutCandidate}" />
       <rich:spacer height="10px" />
       </h:panelGrid>
       <h:panelGrid columns="2">
       <!-- cancel button -->
       <a4j:commandButton id="rectifyingCancel" value="#{mbCodes.cancel}" >
       <rich:componentControl for="confirmPopup" attachTo="rectifyingCancel"
       operation="hide" event="onclick" />
       </a4j:commandButton>
      
       <a4j:commandButton id="submitRectifyButton" value="#{mbCodes.run}"
       actionListener="#{rectifyController.rectifyAcqWithoutCandidate}"
       action="#{navigationController.rectifyingAcq}" />
       </h:panelGrid>
       </h:form>
       </rich:modalPanel>
       <!-- ****************************** -->
       <!-- END CONFIRM RECTIFY -->
       <!-- ****************************** -->