0 Replies Latest reply on Aug 18, 2011 10:30 AM by anubondada

    Richfaces popup disappearing when clicked on the dropdown menu item.

    anubondada

      I am facing one issue to show richfaces popup when clicks on richfaces drop down menu item.

       

      I need to show a context menu (View User, Edit User) when clicks on USERNAME (table column). And need to show a popup when clicks on a particular menu item.

       

      we are uasing RichFaces4.0.0.Final version and JSF 2.0

       

      I used richfaces dropdownMenu for this. Hear is my code snippet

       

      <rich:dataTable id="userTable" rows="#{prod.noOfRowsPerPage}"

      value="#{searchBean.usersList}" var="userData"

      rowClasses="tableOddRow,tableEvenRow" styleClass="case-list"

      width="75%" headerClass="iceTblHeader" reRender="userdataScroller">

           

            <rich:column>

      <f:facet name="header">

      <h:outputText value=" #{samp.userName}" />

      </f:facet>

           

      <rich:dropDownMenu>

      <f:facet name="label">

        <h:outputText value=" #{userData.username}" />

        <h:graphicImage value="/images/link_arrow.gif"></h:graphicImage>

      </f:facet>

       

      <rich:menuItem label="Edit User"></rich:menuItem>

       

      <rich:menuItem label="View User"

      action="#{searchBean.getUserProfile}" render="viewPopupGrid,roleData">

      <a4j:param value="#{userData.username}"

      assignTo="#{searchBean.searchUserName}" />

      <rich:componentControl event="oncomplete"

      target="viewUserProfilePopUp" operation="show" />

      </rich:menuItem>

            </rich:dropDownMenu>

      </rich:column>

      </rich:dataTable>

       

       

      The problem, occuring is that on clicking the menu item in a browser, the popup is shortly displayed but closes straight away without any further user interaction.

       

      But If I use event="click", displaying the popup with wrong data and closes immediately. If I use event="oncomplete", the popup is not displaying, but the action is performing.

       

      anybody have an idea on this issue?