0 Replies Latest reply on Sep 10, 2010 11:09 AM by simafe_2000

    Customizing the response

    simafe_2000

      Hello all.

       

         Because my apllication will be hosted on a portal, I need to replace the links of richfaces resouces (js and css files).

       

      An example:

      On my page I have an select component that updates a text field component based on the selected value. Whenever I change the value of the select component an Ajax request is launched and the updated page contains:

       

      <script src="/spld/RichResources//org/ajax4jsf/framework.pack.js.faces" type="text/javascript"></script>
                  <script src="/spld/RichResources//org/richfaces/ui.pack.js.faces" type="text/javascript"></script>
                  <link class="component" href="/spld/RichResources/org/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.faces" rel="stylesheet" type="text/css" />
      ...

       

      in the head tag.

       

      I need to replace the strings in red.

      I have created a filter that extends the org.ajax4jsf.Filter, as explained in here: http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Servlets8.html and added it in the web.xml.

        The problem is that when I intercept the response, I don't see those resources included on the page, which means another filter adds them AFTER my filter is called, later in the filter's chain. I have put my filter after the richfaces's filter in the web.xml, hoping to be called the last, but it seems the richfaces filter is called the last anyway. In the web.xml I have only these two filter (mine and richfaces'filter).

       

      Any ideea of how to solve this problem?

       

      Thanks in advance.

       

      Best regards,
      Felix