0 Replies Latest reply on Oct 16, 2008 2:58 PM by alex_krasov

    Resources problem with portlets and RichFaces 3.2.2

    alex_krasov

      Hi.

      I have some problem with .

      We are trying to avoid multipple resources (javascript / css) loading when using richfaces with portlets. We are using beta4 version of portlets bridge and RichFaces 3.2.2.

      I've RTFMed richfaces manual and portlet bridge's manual, and configured system according to them, but it just doesn't works for me for some reason. Richfaces just keeps loading the resources one by one multipple times and the reasources I've told to load manually at jboss-portlet.xml just ignored.

      I've double checked everything and am not sure what's going on...

      Could you please take a look?

      Thanks.


      my web.xml includes

      <context-param>
       <param-name>javax.portlet.faces.renderPolicy</param-name>
       <param-value>NEVER_DELEGATE</param-value>
       </context-param>
      - <context-param>
       <param-name>org.ajax4jsf.RESOURCE_URI_PREFIX</param-name>
       <param-value>rfRes/</param-value>
       </context-param>
      - <filter>
       <display-name>Ajax4jsf Filter</display-name>
       <filter-name>ajax4jsf</filter-name>
       <filter-class>org.ajax4jsf.Filter</filter-class>
      - <init-param>
       <param-name>enable-cache</param-name>
       <param-value>true</param-value>
       </init-param>
      - <init-param>
       <param-name>forceparser</param-name>
       <param-value>false</param-value>
       </init-param>
       </filter>
      - <filter-mapping>
       <filter-name>ajax4jsf</filter-name>
       <servlet-name>FacesServlet</servlet-name>
       <dispatcher>FORWARD</dispatcher>
       <dispatcher>REQUEST</dispatcher>
       <dispatcher>INCLUDE</dispatcher>
       </filter-mapping>
      - <context-param>
       <param-name>org.richfaces.LoadScriptStrategy</param-name>
       <param-value>NONE</param-value>
       </context-param>
      - <context-param>
       <param-name>org.richfaces.LoadStyleStrategy</param-name>
       <param-value>NONE</param-value>
       </context-param>
      


      My faces-config.xml includes

      <view-handler>org.jboss.portletbridge.application.PortletViewHandler</view-handler>
       <state-manager>org.jboss.portletbridge.application.PortletStateManager</state-manager>
       </application>
      - <factory>
       <faces-context-factory>org.jboss.portletbridge.context.FacesContextFactoryImpl</faces-context-factory>
       </factory>
      


      and my jboss-portlet.xml includes

      <portlet>
       <portlet-name>ajaxPortlet</portlet-name>
       <remotable>false</remotable>
      - <header-content>
       <script src="/faces/rfRes//org/ajax4jsf/framework.pack.js" type="text/javascript" />
       <script src="/faces/rfRes//org/richfaces/ui.pack.js" type="text/javascript" />
       <link rel="stylesheet" type="text/css" href="/faces/rfRes//org/richfaces/skin.xcss" />
       </header-content>
       </portlet>