12 Replies Latest reply on Jul 15, 2010 3:21 AM by newbeewan

    Trouble with rich:modalPanel in liferay 6

    newbeewan

      Hi,

       

      I'm using liferay 6.0.2 with jboss portlet bridge 2.0.0.Final, JSF 1.2 (mojarra), facelet 1.1.15 and richfaces 3.3.3.Final on tomcat.

      Most of things works well (ajax requests, menu, panel...) but I have some troubles with modal panel, when I'm using it, the page flash a little, showing the content of the panel and after become blank ... There are no error message no exception server side and the page source is completly empty !

       

      It works when deploying as webapp in standalone environment.

       

      The code :

      <h:form>
                           <rich:dataList value="#{taskViewerControler.assignedTasks}" var="taskInfo" >
                              <rich:panel id="assignedTaskPanel">
                                 <rich:modalPanel id="panel" width="350" height="100">
                                    <f:facet name="header">
                                       <h:panelGroup>
                                          <h:outputText value="Process details"></h:outputText>
                                       </h:panelGroup>
                                    </f:facet>
                                    <f:facet name="controls">
                                       <h:panelGroup>
                                          <h:graphicImage value="/images/modal/close.png" styleClass="hidelink" id="hidelink"/>
                                          <rich:componentControl for="panel" attachTo="hidelink" operation="hide" event="onclick"/>
                                       </h:panelGroup>
                                    </f:facet>
                                    <h:panelGrid columns="2">
                                       <h:outputText value="Process Name"/>
                                       <h:outputText value="#{taskInfo.processDefinition.name}"/>
                                       <h:outputText value="Start date :"/>
                                       <h:outputText value="#{taskInfo.instanceStartDate}">
                                          <f:convertDateTime type="date" dateStyle="medium"/>
                                       </h:outputText>
      
                                    </h:panelGrid>
                                 </rich:modalPanel>
                                 <h:commandLink actionListener="#{changePortletStateAction.portletMaximize}"
                                                action="#{bpmProcessControler.showProcessState}" value="#{taskInfo.task.name}">
                                    <f:param name="taskId" value="#{taskInfo.task.id}"/>
                                 </h:commandLink>
                                 <h:outputLink id="zoomin"  value="#">
      
                                    <h:graphicImage value="/images/zoomin.png"/>
                                    <rich:componentControl for="panel" attachTo="zoomin" operation="show" event="onclick"/>
                                 </h:outputLink>
      
                              </rich:panel>
                           </rich:dataList>
                        </h:form>
      
      

       

      Is there any of you who is using that configuration and solved that issue or got an idea to inspect it ?

       

      Regards

        • 1. Re: Trouble with rich:modalPanel in liferay 6
          mudi30

          Hi I have the same problem, however, not with modalPanel separate with Aiax Request. Aiax Request grows after everybody navigation higher and higher what it leads to memmory leak to. but if you say that you have no problem with Aiax Request, I would try to evacuate modalPanel beyond the DataList and then try.

          • 2. Re: Trouble with rich:modalPanel in liferay 6
            newbeewan

            I have an other modalPanel only in a rich:panel and it is exactly the same result

             

            It's more like an unattend navigation more than an ajax problem !

             

            Regards

            • 3. Re: Trouble with rich:modalPanel in liferay 6
              mudi30

              Hello,  have you tested Liferay 6.0.2  with the  version 1.0.0.CR3, there  are no problems with . I recommend you  to use this version with Liferay.

              • 4. Re: Trouble with rich:modalPanel in liferay 6
                newbeewan

                Hi,

                 

                I'm trying to downgrade to 1.0.0.CR3 on lf 6.0.2 (fresh install) but I've got that exception :

                2010-07-01 11:36:55,225 [ERROR] org.ajax4jsf.resource.InternetResourceService 219  - Error on send resource 
                org.ajax4jsf.cache.CacheException: Could not get Input stream for resource: org/richfaces/renderkit/html/scripts/panelMenu.js
                    at org.ajax4jsf.resource.InternetResourceService.load(InternetResourceService.java:337)
                    at org.ajax4jsf.cache.LRUMapCache.load(LRUMapCache.java:116)
                    at org.ajax4jsf.cache.LRUMapCache.get(LRUMapCache.java:87)
                    at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:195)
                    at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:141)
                    at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:508)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:179)
                    at com.liferay.portal.servlet.filters.minifier.MinifierFilter.processFilter(MinifierFilter.java:423)
                    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:106)
                    at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:69)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:179)
                    at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:128)
                    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:106)
                    at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:69)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:179)
                    at com.liferay.portal.servlet.filters.cache.CacheFilter.processFilter(CacheFilter.java:400)
                    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:106)
                    at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:69)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:179)
                    at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:47)
                    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:106)
                    at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:69)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:179)
                    at com.liferay.portal.servlet.filters.header.HeaderFilter.processFilter(HeaderFilter.java:131)
                    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:106)
                    at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:69)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
                    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:465)
                    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
                    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
                    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
                    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
                    at java.lang.Thread.run(Thread.java:619)
                Caused by: java.io.IOException: Could not get Input stream for resource: org/richfaces/renderkit/html/scripts/panelMenu.js
                    at org.ajax4jsf.resource.ScriptRenderer.send(ScriptRenderer.java:54)
                    at org.ajax4jsf.resource.InternetResourceBase.send(InternetResourceBase.java:374)
                    at org.ajax4jsf.resource.ResourceLifecycle.sendResource(ResourceLifecycle.java:221)
                    at org.ajax4jsf.resource.ResourceLifecycle.send(ResourceLifecycle.java:160)
                    at org.ajax4jsf.resource.InternetResourceService.load(InternetResourceService.java:335)
                    ... 48 more

                And nothing works !

                 

                Do I need to add something in my configuration (I join my web.xml if it can help...) ?

                 

                Regards

                • 5. Re: Trouble with rich:modalPanel in liferay 6
                  jjamrich

                  Very similar problem is known on JBoss Portal environment.

                  Modal panel demo from Richfaces project doesn't work correctly within Portal (or with PortletBridge).

                   

                  There is JIRA related to problem I mentioned:

                  https://jira.jboss.org/browse/PBR-168

                  • 6. Re: Trouble with rich:modalPanel in liferay 6
                    jjamrich

                    As far as I don't see whole page source, I'm only guessing, but... please notice that within Portal/PortletBridge you need to link resource like following:

                    <a4j:loadScript src="resource:///org/mycompany/assets/script/focus.js" />

                     

                    ... or use "///" prefix, and in come other cases absolute path works better than relative (for example for images addressing)

                    • 7. Re: Trouble with rich:modalPanel in liferay 6
                      mudi30

                      Have you inserted the resources themselves . It is also recommended to use Rich Faces 3.3.2.GA with  1.0.0.CR3 Bridge. I use  this two versions together and it works without problems.

                      • 8. Re: Trouble with rich:modalPanel in liferay 6
                        newbeewan

                        Mahmoud Ali a écrit:

                         

                        Have you inserted the resources themselves .

                        I don't understand what do you mean by that ?

                         

                        I have exactly the same error with rf 3.3.2.GA

                         

                        Concerning dependencies, in my pom.xml, I have that :

                        <dependency>
                                    <groupId>org.jboss.portletbridge</groupId>
                                    <artifactId>portletbridge-api</artifactId>
                                    <version>1.0.0.CR3</version>
                                 </dependency>
                                 <dependency>
                                    <groupId>org.jboss.portletbridge</groupId>
                                    <artifactId>portletbridge-impl</artifactId>
                                    <version>1.0.0.CR3</version>
                                 </dependency>
                                 <dependency>
                                    <groupId>org.richfaces.framework</groupId>
                                    <artifactId>richfaces-api</artifactId>
                                    <version>3.3.2.GA</version>
                                    <type>jar</type>
                                 </dependency>
                                 <dependency>
                                    <groupId>org.richfaces.framework</groupId>
                                    <artifactId>richfaces-impl</artifactId>
                                    <version>3.3.2.GA</version>
                                    <type>jar</type>
                                 </dependency>
                                 <dependency>
                                    <groupId>org.richfaces.ui</groupId>
                                    <artifactId>richfaces-ui</artifactId>
                                    <version>3.3.2.GA</version>
                                 </dependency>
                        
                        

                        Is it enough or do I need to add something else ?

                         

                        Regards

                        • 9. Re: Trouble with rich:modalPanel in liferay 6
                          mudi30

                          It's enough. You have to disable the liferay  speed-filters, this  can be done by copying the attached file (liferay-plugin-package.properties) in your WEB-INF.

                          • 10. Re: Trouble with rich:modalPanel in liferay 6
                            newbeewan

                            Hi,

                             

                            Thanks for that parameter, it help a little but that break other things !

                             

                            I manage to make a test application works, but tabpanel and panelmenu do not work any more (previewsly they were working with portlet bridge 2.0.0.FINAL)...

                             

                            For the moment I have :

                            modalPanel works with portletbridge 1.0.0.CR3/RichFaces 3.3.2.GA but tabpanel and panel menu don't work well

                            tabpanel and panel menu work well with portletbrigde 2.0.0.FINAL/RichFaces 3.3.3.FINAL but modalPanel is in a mess...

                             

                            How to diagnose troubles all the software stack ?

                             

                            Regards

                            • 11. Re: Trouble with rich:modalPanel in liferay 6
                              newbeewan

                              Finally I solve all my issues by replacing <html> tag by <a4j:portlet>

                               

                              Now it works same way in web app and in portlet !

                               

                              Regards

                              • 12. Re: Trouble with rich:modalPanel in liferay 6 -> real solution
                                newbeewan

                                Hi,

                                 

                                Finally I find the trick to use jboss portlet brigde 2.0.0.Final and richface 3.3.3 in liferay, some more parameters are needed in the liferay-portlet.xml :

                                 

                                ...
                                   <portlet>
                                      <portlet-name>myRichFacesPortlet</portlet-name>
                                      <icon>/images/icon.png</icon>
                                <!-- here the interesting part -->
                                      <instanceable>true</instanceable>
                                      <render-weight>1</render-weight>
                                      <ajaxable>false</ajaxable>
                                   </portlet>
                                ...

                                 

                                I pick up that parameters from icefaces portlet support which is more liferay oriented, but less easy to use that richfaces, particularly for ajax applications.

                                 

                                Regards