2 Replies Latest reply on Feb 21, 2012 5:31 PM by Maheswara Sunkara

    PopUpPanel dynamic Rendering

    Sabyasachi Rout Newbie

      Hi,

      I am trying to use a pop up panel(for Delete Confirmation).

      It should be rendered only when a dataTable row is selected or else error message should be displayed

      I had implemented it using RF3.3X,but facing problem in 4.X

      My code

        • 1. Re: PopUpPanel dynamic Rendering
          Sabyasachi Rout Newbie

          <h:form>  

           

           

          <rich:panel styleClass="addDeletePanel">

           

           

          <h:commandLink value="ADD"></h:commandLink>

           

           

          <richext:spacer width="5"/>

           

           

          <a4j:commandLink value="DELETE"

           

           

          action="#{feedSetUpBean.verifydeleteFeed}">

           

           

          <!-- <rich:componentControl target="confirmDeleteDR" operation="show" event="click"></rich:componentControl> -->

           

           

          <a4j:ajax event="click" render="confirmDeleteDR"

           

           

          oncomplete="#{rich:component('confirmDeleteDR')}.show()"></a4j:ajax>

           

           

          </a4j:commandLink>

           

           

          </rich:panel>

          ....

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

          <

           

          rich:popupPanel id="confirmDeleteDR"onmaskclick="#{rich:component('confirmDeleteDR')}.hide()"rendered="#{feedSetUpBean.deleteFeedPop}" autosized="true" modal="true"><f:facet name="header"><h:outputText value="Delete Confirmation"/></f:facet><f:facet name="controls"><h:panelGroup><h:graphicImage value="/resources/images/close.png" id="hidelinkDR"onclick="#{rich:component('confirmDeleteDR')}.hide()"/></h:panelGroup></f:facet><rich:panel><h:outputText value="Are you sure you want to delete?"></h:outputText></rich:panel><rich:panel style="width: 98%;"><a4j:commandButton value="YES" render=feedDataTbl@body action="#{feedSetUpBean.deleteSelected}"onclick="#{rich:component('confirmDeleteDR')}.hide()"></a4j:commandButton><richext:spacer width="5"></richext:spacer><a4j:commandButton value="NO" onclick="#{rich:component('confirmDeleteDR')}.hide()"></a4j:commandButton></rich:panel></rich:popupPanel>

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

          But the dynamic rendering is not working..the popUpPanel is displayed irrespective of boolean value

          • 2. Re: PopUpPanel dynamic Rendering
            Maheswara Sunkara Novice

            change

             

            <a4j:ajax event="click" render="confirmDeleteDR" oncomplete="#{rich:component('confirmDeleteDR')}.show()"></a4j:ajax>

             

            to

             

            <a4j:ajax event="click" render="confirmDeleteDR"  oncomplete="if(#{feedSetUpBean.deleteFeedPop}){#{rich:component('confirmDeleteDR')}.show()}"></a4j:ajax>

             

            and remove

             

            rendered="#{feedSetUpBean.deleteFeedPop}"  from

            <rich:popupPanel  tag