2 Replies Latest reply on Apr 19, 2011 4:16 AM by Job Mathew Kollamana

    Modal panel on If Condition Richface 3.3

    Job Mathew Kollamana Newbie



      I wanted to pop up a modal panel depending on the certian condition.


      I have tried two different kind of codes but not yet success,


      Any help is highly appricated.


      first method


          <a4j:commandButton  value="Finish" action="#{bean.finish}" reRender="hForm" oncomplete="if(testcaseBean.showModalPanel) Richfaces.showModalPanel('modalPanel')" >

                                                       <f:setPropertyActionListener value="#{record.row}" target="#{bean.collection}" />



      showModalPanel :- Is a boolean value in the backing bean.


      second method


        <a4j:commandButton  value="Finish" action="#{bean.finish}" reRender="hForm" oncomplete="#{bean.launchModalPanel()}" >

                                                       <f:setPropertyActionListener value="#{record.row}" target="#{bean.collection}" />



          public void launchModalPanel() {


              FacesContext context = Utility.getFacesContext();

              UIComponent component = context.getViewRoot().findComponent("modalPanel");

              HtmlModalPanel panel = (HtmlModalPanel) component;