1 Reply Latest reply on May 11, 2011 3:41 PM by mp911de

    ModalPanel not working with the MenuItem

    chaitanya198

      Hi Guys,

       

      Need some help to open a modal panel when I click the menuItem. Please refer to the code below. If the run this code, the modelPanel opens and just closes off in a sec. Am I doing something, please let me know. I am using richfaces 3.3.3 Final version

       

      <f:view>

      <h:form>

       

       

      <rich:menuItem>

                     <h:outputLink value="#" id="link"> (Over here I also tried a4j:commandLink but it did not work, I also tried with reRender but still it did not work)

                                         Vehicle Comments

                                    <rich:componentControl for="testModal" operation="show" event="onclick" attachTo="link"/>

               </h:outputLink>

      </rich:menuItem>

       

       

      <rich:modalPanel id="testModal"></rich:modalPanel>

      </h:form>

       

       

      </f:view>

       

      Please let me know

        • 1. ModalPanel not working with the MenuItem
          mp911de

          Hi there,

          you need to call a JS Function Richfaces.showModalPanel('testModal'). The best way to do this could be either to have a onclick="Richfaces.showModalPanel('testModal');return false" or within an Ajax-Component at the oncomplete-Method. Since your link does a Page Submit the Modal Panel disappears.

           

          Best regards,

          Mark