myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Myfaces Wiki] Update of "TrinidadSeamAjax4JsfFaceletDetail" by ThomasHamacher
Date Wed, 28 Feb 2007 13:47:53 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

The following page has been changed by ThomasHamacher:
http://wiki.apache.org/myfaces/TrinidadSeamAjax4JsfFaceletDetail

------------------------------------------------------------------------------
  <faces-config>
      
      <!-- Phase listener needed for all Seam applications -->
- 
      <lifecycle>
          <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
      </lifecycle>
@@ -44, +43 @@

  Let´s go over to the `web.xml`. First we have to define a special set of `listeners`. I
don´t think the order is that important in this case, but I started with the
  SeamListener, which is declared as follows:
  
+ {{{    
      <listener>
          <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
      </listener>
+ }}}
      
  
  Afterward you have to define the listener for your JSF-Implementation. I used MyFaces and
therefor used this declaration:
  
+ {{{  
      <listener>
          <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
      </listener>
-     
+ }}}    
  
  But if you´re playing with SUN RI, declare it this way:
  
+ {{{
      <listener>
          <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
      </listener>
-     
+ }}}    
  
  For the most of the libraries you don´t have to set any special context-parameters, but
when it comes to the Trinidad `context-param`s the following declaration is 
  necessary:
  
+ {{{
      <context-param>
          <param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>
-         
          <param-value>com.sun.facelets.FaceletViewHandler</param-value>
      </context-param>  
-     
+ }}}    
  
  When it comes to the `filter-mapping` the order is very important. You have to define the
ajax4jsf-filter-mapping as the very first one, followed by the others.
  This is the sequence I used in my web.xml:
  
+ {{{
      <!-- ************************ AJAX4JSF Filter **************************** -->
      
      <!-- If you have other filters declared in the web.xml, be sure that Ajax4jsf Filter
is declared before the others. -->
@@ -154, +158 @@

         
          <url-pattern>*.seam</url-pattern>
      </filter-mapping>
-     
+ }}}    
  
  
  This is all I did and it works quite nice and smoothly.  

Mime
View raw message