[seam-commits] Seam SVN: r7175 - in trunk/examples/seamspace: resources/WEB-INF and 2 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Jan 22 00:30:17 EST 2008


Author: shane.bryzak at jboss.com
Date: 2008-01-22 00:30:17 -0500 (Tue, 22 Jan 2008)
New Revision: 7175

Modified:
   trunk/examples/seamspace/
   trunk/examples/seamspace/resources/WEB-INF/pages.xml
   trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/BlogAction.java
   trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/test/BlogTest.java
Log:
use page params instead of request params


Property changes on: trunk/examples/seamspace
___________________________________________________________________
Name: svn:ignore
   - build
dist
exploded-archives

   + build
dist
exploded-archives
test-build


Modified: trunk/examples/seamspace/resources/WEB-INF/pages.xml
===================================================================
--- trunk/examples/seamspace/resources/WEB-INF/pages.xml	2008-01-22 05:19:57 UTC (rev 7174)
+++ trunk/examples/seamspace/resources/WEB-INF/pages.xml	2008-01-22 05:30:17 UTC (rev 7175)
@@ -2,7 +2,6 @@
 <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"
-
        login-view-id="/home.xhtml">
 
     <page view-id="/home.xhtml">

Modified: trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/BlogAction.java
===================================================================
--- trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/BlogAction.java	2008-01-22 05:19:57 UTC (rev 7174)
+++ trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/BlogAction.java	2008-01-22 05:30:17 UTC (rev 7175)
@@ -57,6 +57,8 @@
    @Factory("comment") @Restrict @Begin(join = true)
    public void createComment()
    {      
+      System.out.println("Params - blogId: " + blogId + " name: " + name);
+      
       comment = new BlogComment();
       comment.setCommentor(authenticatedMember);
       

Modified: trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/test/BlogTest.java
===================================================================
--- trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/test/BlogTest.java	2008-01-22 05:19:57 UTC (rev 7174)
+++ trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/test/BlogTest.java	2008-01-22 05:30:17 UTC (rev 7175)
@@ -4,7 +4,7 @@
 import org.testng.annotations.Test;
 
 public class BlogTest extends SeamTest
-{
+{   
    @Test
    public void testCreateBlog() throws Exception
    {
@@ -86,13 +86,18 @@
          }
       }.run();   
       
-      String cid = new FacesRequest()
+      String cid = new FacesRequest("/comment.xhtml")
       {
          @Override
+         protected void beforeRequest()
+         {
+            setPageParameter("name", "Mr_Smiley");
+            setPageParameter("blogId", "1");
+         }         
+         
+         @Override
          protected void invokeApplication() throws Exception
          {
-            setParameter("name", "Mr_Smiley");
-            setParameter("blogId", "1");
             assert invokeAction("#{blog.createComment}") == null;
             
             assert getValue("#{comment}") != null;




More information about the seam-commits mailing list