6 Replies Latest reply on Jan 20, 2011 11:44 AM by shdgrao

    ModalPanel issue in Google Chrome oncomplete event

    shdgrao

      Hi. I am developing an application with RichFaces 3.3.3 Final. I have a modalpanel that is shown in the oncomplete event of a a4j:commandButton after executing the commandbuttono action. I have never had a problem with this and it is working with Firefox 3. I have tested it with google Chrome and the panel doesn't show up. The action gets executed and the oncomple event fired but the panel isn't shown. If I change the code for showing the panel to the onclick event, it works in chrome.

      ¿Is there any known issue about showing a modalpanel in google chrome with the a4j:commandbutton oncomplete event?

       

      Thank you.

       

      Pablo

        • 1. ModalPanel issue in Google Chrome oncomplete event
          ilya40umov

          Could you post a sample of your code, please?

          • 2. Re: ModalPanel issue in Google Chrome oncomplete event
            shdgrao

            The page with the button and the modalpanel looks like this. With the button I am rerendering three components "foto,selector,fileupload", that are inside the modalpanel. If I remove the rerender, it doesn't work either. The action FileUploadBean.clear, it does nothing special, and it is executed without problems.

             

            If you need more code, please tell me and I post it.

             

            Pablo.

             

            <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"

                            xmlns:f="http://java.sun.com/jsf/core"

                            xmlns:h="http://java.sun.com/jsf/html"

                            xmlns:rich="http://richfaces.org/rich"

                            xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"

                            template="/WEB-INF/templates/generaltemplate.xhtml">

             

                <ui:define name="content">

                    <a4j:form id="userform">

                        <h:panelGrid columns="2">

                                    <a4j:commandButton value="Cambiar" image="#{LoggedUserWebBean.pathUserImage}" action="#{FileUploadBean.clear}" reRender="foto,selector,fileupload" oncomplete="Richfaces.showModalPanel('panelchangepicture')"/>

                        </h:panelGrid>

                    </a4j:form>

             

                        <rich:modalPanel id="panelchangepicture" autosized="true">

                            <f:facet name="header">

                                <h:outputText value="Seleccione su fotografia de perfil"/>

                            </f:facet>

                            <a4j:form id="imageuploaderform">

                                <ui:include src="/components/imageuploader.xhtml"/>

                                <h:panelGrid columns="2">

                                    <h:commandButton value="Aceptar" action="#{LoggedUserWebBean.changeUserPicture}"/>

                                    <h:commandButton value="Borrar imagen" action="#{LoggedUserWebBean.deleteUserPicture}"/>

                                    <a4j:commandButton value="Cancelar" action="#{FileUploadBean.clear}" reRender="info" oncomplete="Richfaces.hideModalPanel('panelchangepicture')"/>

                                </h:panelGrid>

                            </a4j:form>

                        </rich:modalPanel>

                </ui:define>

            </ui:composition>

            • 3. Re: ModalPanel issue in Google Chrome oncomplete event
              ilya40umov

              I'm not sure that it;s not the same. But could you try it in the following way:

              #{rich:component('panelchangepicture')}.show();

              • 4. ModalPanel issue in Google Chrome oncomplete event
                shdgrao

                I had already tried and nothing. The oncomplete event is working because if I put oncomplete=alert('hi'), it works in Firefox and Chrome showing the hi message.

                 

                I have tested the page in IE6 and it works perfectly. 

                • 5. ModalPanel issue in Google Chrome oncomplete event
                  shdgrao

                  I have also tested the same page in Internet Explorer 8 and it also works. I don't really know whats happening with chrome...

                  • 6. ModalPanel issue in Google Chrome oncomplete event
                    shdgrao

                    no way to get that working. I had to use showWhenRendered, which works ok for me in all browsers.

                     

                    Thanks,

                     

                    Pablo