[jboss-cvs] jboss-seam/examples/registration/resources/WEB-INF ...
Gavin King
gavin.king at jboss.com
Wed Sep 27 00:09:02 EDT 2006
User: gavin
Date: 06/09/27 00:09:02
Modified: examples/registration/resources/WEB-INF components.xml
faces-config.xml web.xml
Log:
major work on crud example
Revision Changes Path
1.2 +35 -0 jboss-seam/examples/registration/resources/WEB-INF/components.xml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: components.xml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/registration/resources/WEB-INF/components.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- components.xml 10 Jun 2006 07:29:59 -0000 1.1
+++ components.xml 27 Sep 2006 04:09:02 -0000 1.2
@@ -1,5 +1,40 @@
<components>
+ <component name="contacts"
+ class="org.jboss.seam.framework.Query">
+ <property name="ejbql">from Contact</property>
+ <property name="restrictions">
+ <value>lower(firstName) like lower( #{exampleContact.firstName} + '%' )</value>
+ <value>lower(lastName) like lower( #{exampleContact.lastName} + '%' )</value>
+ </property>
+ <property name="maxResults">20</property>
+ <property name="entityManager">#{entityManager}</property>
+ </component>
+
+ <component name="contact"
+ class="org.jboss.seam.framework.ManagedEntity">
+ <property name="id">#{param.contactId}</property>
+ <property name="idClass">java.lang.Long</property>
+ <property name="entityClass">org.jboss.seam.example.crud.Contact</property>
+ <property name="entityManager">#{entityManager}</property>
+ </component>
+
+ <component name="exampleContact"
+ class="org.jboss.seam.framework.ManagedEntity">
+ <property name="entityClass">org.jboss.seam.example.crud.Contact</property>
+ </component>
+
+ <component name="contactActions"
+ class="org.jboss.seam.framework.EntityActions">
+ <property name="entityManager">#{entityManager}</property>
+ <property name="entity">#{contact}</property>
+ </component>
+
+ <component name="entityManager"
+ class="org.jboss.seam.core.ManagedPersistenceContext">
+ <property name="persistenceUnitJndiName">java:/crudEntityManagerFactory</property>
+ </component>
+
<component name="org.jboss.seam.core.init">
<property name="myFacesLifecycleBug">@myFacesLifecycleBug@</property>
<property name="jndiPattern">@jndiPattern@</property>
1.15 +7 -1 jboss-seam/examples/registration/resources/WEB-INF/faces-config.xml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: faces-config.xml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/registration/resources/WEB-INF/faces-config.xml,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- faces-config.xml 19 May 2006 23:07:33 -0000 1.14
+++ faces-config.xml 27 Sep 2006 04:09:02 -0000 1.15
@@ -4,10 +4,16 @@
"http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
<faces-config>
+ <!-- Facelets support -->
+
+ <application>
+ <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+ </application>
+
<!-- Phase listener needed for all Seam applications -->
<lifecycle>
- <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
+ <phase-listener>org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener</phase-listener>
</lifecycle>
</faces-config>
1.17 +14 -10 jboss-seam/examples/registration/resources/WEB-INF/web.xml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: web.xml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/registration/resources/WEB-INF/web.xml,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- web.xml 14 Jul 2006 03:06:41 -0000 1.16
+++ web.xml 27 Sep 2006 04:09:02 -0000 1.17
@@ -10,6 +10,18 @@
<listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
</listener>
+ <!-- Facelets -->
+
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
<!-- MyFaces -->
<listener>
@@ -18,7 +30,7 @@
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
- <param-value>client</param-value>
+ <param-value>server</param-value>
</context-param>
<servlet>
@@ -33,12 +45,4 @@
<url-pattern>*.seam</url-pattern>
</servlet-mapping>
- <!-- JSP -->
- <jsp-config>
- <jsp-property-group>
- <url-pattern>*.jsp</url-pattern>
- <is-xml>true</is-xml>
- </jsp-property-group>
- </jsp-config>
-
</web-app>
More information about the jboss-cvs-commits
mailing list