4 Replies Latest reply on Dec 10, 2008 9:35 AM by indusukumar

    Pop up window implementation using richfaces

      Iam using richfaces 3.0 version , with JSF 1.1 sun implementatio. I want to implement a pop up window in my application. Is there a richfaces component , which will help me implement this pop up window, or am I better off implementing with plain javascript? If I can use rich faces to implement popup window in jsf, where can I find the appropriate documentation for it.Any help will be appreciated.

      Thanks in advance!!!

        • 1. Re: Pop up window implementation using richfaces

          Does, any body have any suggestions on this one. Iam kinda stuck on this problem for some time now..any help would be appreciated

          • 2. Re: Pop up window implementation using richfaces
            shadowcreeper

            Weird, I couldn't find it in a search either. Good thing I kept it in my inbox...

            See: http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4189949#4189949

            Also see: https://jira.jboss.org/jira/browse/RF-994

            • 3. Re: Pop up window implementation using richfaces
              ilya_shaikovsky

              RAJESHIV, Use 3.1.6.. It's latest stable GA for jsf 1.1 branch. And modal panel component works fine there.

              • 4. Re: Pop up window implementation using richfaces
                indusukumar

                You can use rich:ModalPanel in place of popup window, jus pasting some sample code which i have used, which works fine and should be helpful.

                On button click:

                <h:commandButton value="#{prop.submit}" styleClass="buttonSave" onclick="showMyPanel('AddUserAlertPanel');return false;">
                </h:commandButton>

                JavaScript:

                function showMyPanel(modalPanel)
                {
                Richfaces.showModalPanel(modalPanel,{left:350, width:300, top:300, height:100});
                return false;
                }


                Panel:

                <rich:modalPanel id="AddUserAlertPanel" resizeable="false" tridentIVEngineSelectBehavior="hide" moveable="true" styleClass="tr_row_light" >
                <f:facet name="header">
                <h:panelGroup>
                <h:outputText value="User Admin"></h:outputText>
                </h:panelGroup>
                </f:facet>
                <s:div id="AddUserPaneldiv">
                <h:panelGrid>
                <h:panelGroup>
                <rich:spacer width="20"></rich:spacer>
                <h:outputText value="#{prop.adduser}"></h:outputText>
                </h:panelGroup>
                <h:panelGroup id="addUserOkButton">

                <a:commandButton value="#{prop.ok}" actionListener="#{adminuser.submitNewUser}" id="_addUserSaveButton"
                styleClass="buttonSave" onclick="showStatusPanel1('StatusPanel')" oncomplete="hideModalPanel('AddUserAlertPanel','StatusPanel');return false;" reRender="userArea,userAreaDetails,userSearchArea,userAddArea,userSaveArea">
                <a:support event="onclick">
                </a:support></a:commandButton>

                <a:commandButton value="#{prop.cancel}" id="_addUserCancelButton" styleClass="buttonCancel">
                <a:support event="onclick" ajaxSingle="true" oncomplete="Richfaces.hideModalPanel('AddUserAlertPanel');return false;">
                </a:support>
                </a:commandButton>
                </h:panelGroup>
                </h:panelGrid>
                </s:div>

                </rich:modalPanel>