[jboss-cvs] jboss-seam/examples/seamdiscs/resources/WEB-INF ...

Peter Muir peter at bleepbleep.org.uk
Sat Jul 14 19:48:41 EDT 2007


  User: pmuir   
  Date: 07/07/14 19:48:41

  Added:       examples/seamdiscs/resources/WEB-INF       web.xml
                        faces-config.xml components.xml trinidad-config.xml
                        trinidad-skins.xml pages.xml
  Log:
  Move seamdiscs example, upgrade it to Trinidad 1.2.1
  
  Revision  Changes    Path
  1.4       +18 -38    jboss-seam/examples/seamdiscs/resources/WEB-INF/web.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: web.xml
  ===================================================================
  RCS file: web.xml
  diff -N web.xml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ web.xml	14 Jul 2007 23:48:41 -0000	1.4
  @@ -0,0 +1,110 @@
  +<?xml version="1.0" ?>
  +<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
  +         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  +         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
  +         version="2.4">
  +
  +   <!-- Ajax4jsf -->
  +
  +   <!-- Don't need to declare Ajax4jsf filter, Seam Filter installs it for us -->
  +   
  +    <!-- Not used, as we've integrated Trinidad -->
  +    <!-- <context-param>
  +        <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
  +        <param-value>com.sun.facelets.FaceletViewHandler</param-value>
  +    </context-param>-->
  +    
  +    <context-param>
  +        <param-name>org.ajax4jsf.SKIN</param-name>
  +        <param-value>blueSky</param-value>
  +    </context-param>
  + 
  +   <!-- Seam -->
  +    
  +   <listener>
  +      <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
  +   </listener>
  +    
  +    <filter>
  +        <filter-name>Seam Filter</filter-name>
  +        <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
  +    </filter>
  +
  +    <filter-mapping>
  +        <filter-name>Seam Filter</filter-name>
  +        <url-pattern>/*</url-pattern>
  +    </filter-mapping>
  +        
  +   <servlet>
  +      <servlet-name>Seam Resource Servlet</servlet-name>
  +      <servlet-class>org.jboss.seam.servlet.ResourceServlet</servlet-class>
  +   </servlet>
  +    
  +   <servlet-mapping>
  +      <servlet-name>Seam Resource Servlet</servlet-name>
  +      <url-pattern>/seam/resource/*</url-pattern>
  +   </servlet-mapping>
  +   
  +   <!-- Facelets development mode (disable in production) -->
  +   
  +   <context-param>
  +      <param-name>facelets.DEVELOPMENT</param-name>
  +      <param-value>true</param-value>
  +   </context-param>
  +    
  +   <!-- JSF -->
  +    
  +   <context-param>
  +      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
  +      <param-value>.xhtml</param-value>
  +   </context-param>
  +
  +   <servlet>
  +      <servlet-name>Faces Servlet</servlet-name>
  +      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
  +      <load-on-startup>1</load-on-startup>
  +   </servlet>
  +    
  +   <servlet-mapping>
  +      <servlet-name>Faces Servlet</servlet-name>
  +      <url-pattern>*.seam</url-pattern>
  +   </servlet-mapping>
  +   
  +   <!-- Trinidad - as suggested by a4j-trinidad example-->
  +   
  +   <context-param>
  +      <param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>
  +      <param-value>com.sun.facelets.FaceletViewHandler</param-value>
  +	</context-param> 
  +	
  +    <filter>
  +        <filter-name>Trinidad</filter-name>
  +        <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
  +    </filter>
  +    
  +    <filter-mapping>
  +        <filter-name>Trinidad</filter-name>
  +        <url-pattern>*.seam</url-pattern>
  +        <dispatcher>REQUEST</dispatcher>
  +		<dispatcher>FORWARD</dispatcher>
  +		<dispatcher>INCLUDE</dispatcher>
  +    </filter-mapping>
  +    
  +    <context-param>
  +		<param-name>
  +			org.apache.myfaces.trinidad.CACHE_VIEW_ROOT
  +		</param-name>
  +		<param-value>false</param-value>
  +	</context-param>
  +    
  +    <servlet>
  +        <servlet-name>Trinidad Resources</servlet-name>
  +        <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
  +    </servlet>
  +    
  +    <servlet-mapping>
  +        <servlet-name>Trinidad Resources</servlet-name>
  +        <url-pattern>/adf/*</url-pattern>
  +    </servlet-mapping>
  +   
  +</web-app>
  
  
  
  1.3       +5 -18     jboss-seam/examples/seamdiscs/resources/WEB-INF/faces-config.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: faces-config.xml
  ===================================================================
  RCS file: faces-config.xml
  diff -N faces-config.xml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ faces-config.xml	14 Jul 2007 23:48:41 -0000	1.3
  @@ -0,0 +1,17 @@
  +<?xml version='1.0' encoding='UTF-8'?>
  +<faces-config version="1.2"
  +              xmlns="http://java.sun.com/xml/ns/javaee"
  +              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  +              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
  +
  +   <application>
  +      <message-bundle>messages</message-bundle>
  +      <!-- Disabled when using Ajax4JSF -->
  +      <!--
  +      <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
  +      -->
  +      <!-- Enable Trinidad renderkit -->
  +      <default-render-kit-id>org.apache.myfaces.trinidad.core</default-render-kit-id>
  +   </application>
  +
  +</faces-config>
  
  
  
  1.4       +26 -40    jboss-seam/examples/seamdiscs/resources/WEB-INF/components.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: components.xml
  ===================================================================
  RCS file: components.xml
  diff -N components.xml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ components.xml	14 Jul 2007 23:48:41 -0000	1.4
  @@ -0,0 +1,50 @@
  +<?xml version="1.0" encoding="UTF-8"?>
  +<components xmlns="http://jboss.com/products/seam/components"
  +	xmlns:core="http://jboss.com/products/seam/core"
  +	xmlns:security="http://jboss.com/products/seam/security"
  +	xmlns:persistence="http://jboss.com/products/seam/persistence"
  +	xmlns:web="http://jboss.com/products/seam/web"
  +	xmlns:framework="http://jboss.com/products/seam/framework"
  +	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  +	xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd 
  +                 http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
  +                 http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd
  +                 http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd 
  +                 http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.0.xsd 
  +                 http://jboss.com/products/seam/framework http://jboss.com/products/seam/framework-2.0.xsd">
  +
  +	<core:init debug="@debug@" jndi-pattern="@jndiPattern@" />
  +
  +	<core:manager concurrent-request-timeout="500"
  +		conversation-timeout="120000" 
  +		conversation-id-parameter="cid"/>
  +
  +	<persistence:managed-persistence-context name="entityManager"
  +		auto-create="true"
  +		persistence-unit-jndi-name="java:/seamdiscsEntityManagerFactory" />
  +
  +	<security:identity
  +		authenticate-method="#{authenticator.authenticate}" />
  +
  +    <event type="org.jboss.seam.notLoggedIn">
  +        <action expression="#{redirect.captureCurrentView}"/>
  +    </event>
  +    
  +    <event type="org.jboss.seam.postAuthenticate">
  +        <action expression="#{redirect.returnToCapturedView}"/>
  +    </event>   
  +    
  +    <!-- Work around a bug in ajax4jsf-trindiad integration -->
  +	<web:ajax4jsf-filter enable-cache="false" />
  +	
  +	<framework:entity-query name="discs" ejbql="select disc from Disc disc" order="disc.name ASC" max-results="5"/>
  +	
  +	<framework:entity-query name="artists" ejbql="select artist from Artist artist" order="artist.name DESC" max-results="5"/>
  +	
  +	<framework:entity-query name="allArtists" ejbql="select artist from Artist artist" order="artist.name"/>
  +	
  +	<framework:entity-home entity-class="org.jboss.seam.example.seamdiscs.model.Disc" name="discHome"/>
  +	
  +	<factory name="disc" value="#{discHome.instance}"/>
  +
  +</components>
  
  
  
  1.1      date: 2007/07/14 23:48:41;  author: pmuir;  state: Exp;jboss-seam/examples/seamdiscs/resources/WEB-INF/trinidad-config.xml
  
  Index: trinidad-config.xml
  ===================================================================
  <?xml version="1.0"?>
  <trinidad-config xmlns="http://myfaces.apache.org/trinidad/config">
    <!-- Disable client validation, I don't like it -->
    <client-validation-disabled>true</client-validation-disabled>
    <!-- Use our own skin, vaguely like the a4j blueSky skin -->
    <skin-family>seamdiscs</skin-family>
    <!-- Enable debug output here -->
    <debug-output>false</debug-output>
    <!-- Improve a4j compatibility -->
    <accessibility-mode>inaccessible</accessibility-mode>  
  </trinidad-config>
  
  
  1.1      date: 2007/07/14 23:48:41;  author: pmuir;  state: Exp;jboss-seam/examples/seamdiscs/resources/WEB-INF/trinidad-skins.xml
  
  Index: trinidad-skins.xml
  ===================================================================
  <skins xmlns="http://myfaces.apache.org/trinidad/skin">
  	<skin>
  		<id>seamdiscs.desktop</id>
  		<family>seamdiscs</family>
  		<render-kit-id>org.apache.myfaces.trinidad.desktop</render-kit-id>
  		<style-sheet-name>stylesheet/skin.css</style-sheet-name>
  		<bundle-name>messages</bundle-name>
  		
  	</skin>
  </skins>
  
  
  1.3       +7 -6      jboss-seam/examples/seamdiscs/resources/WEB-INF/pages.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: pages.xml
  ===================================================================
  RCS file: pages.xml
  diff -N pages.xml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ pages.xml	14 Jul 2007 23:48:41 -0000	1.3
  @@ -0,0 +1,54 @@
  +<?xml version="1.0" encoding="UTF-8"?>
  +<pages xmlns="http://jboss.com/products/seam/pages"
  +       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  +       xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd"
  +
  +       no-conversation-view-id="/home.xhtml"
  +       login-view-id="/login.xhtml">
  +
  +    <page view-id="*">
  +        <navigation>
  +            <rule if-outcome="home">
  +                <redirect view-id="/home.xhtml"/>
  +            </rule>
  +        </navigation>
  +    </page>
  +
  +    <exception class="org.jboss.seam.framework.EntityNotFoundException">
  +        <redirect view-id="/error.xhtml">
  +            <message>Not found</message>
  +        </redirect>
  +    </exception>
  +    
  +    <exception class="javax.persistence.EntityNotFoundException">
  +        <redirect view-id="/error.xhtml">
  +            <message>Not found</message>
  +        </redirect>
  +    </exception>
  +    
  +    <exception class="javax.persistence.OptimisticLockException">
  +        <end-conversation/>
  +        <redirect view-id="/error.xhtml">
  +            <message>Another user changed the same data, please try again</message>
  +        </redirect>
  +    </exception>
  +    
  +    <exception class="org.jboss.seam.security.AuthorizationException">
  +        <redirect>
  +            <message>You don't have permission to do this</message>
  +        </redirect>
  +    </exception>
  +    
  +    <exception class="org.jboss.seam.security.NotLoggedInException">
  +        <redirect view-id="/login.xhtml">
  +            <message>Please log in first</message>
  +        </redirect>
  +    </exception>
  +     
  +    <exception>
  +        <redirect view-id="/error.xhtml">
  +            <message>Unexpected error, please try again</message>
  +        </redirect>
  +    </exception>
  +    
  +</pages>
  
  
  



More information about the jboss-cvs-commits mailing list