You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2008/05/20 21:15:32 UTC

svn commit: r658398 [4/4] - in /tapestry/tapestry5/trunk: ./ quickstart/src/main/resources/META-INF/ quickstart/src/main/resources/archetype-resources/src/main/java/pages/ quickstart/src/main/resources/archetype-resources/src/main/java/services/ quicks...

Modified: tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/first.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/first.apt?rev=658398&r1=658397&r2=658398&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/first.apt (original)
+++ tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/first.apt Tue May 20 12:14:45 2008
@@ -12,7 +12,7 @@
   
   Maven uses the group id and artifact id to provide a unique identity for the application, and Tapestry needs to have a base package name so it knows where to look for pages and components.
   
-  For this example, we'll use the group id <<org.apache.tapestry>> and the artifact id <<tapestry-tutorial1>>, and we'll use <<org.apache.tapestry.tutorial>> as the base package.
+  For this example, we'll use the group id <<org.apache.tapestry>> and the artifact id <<tapestry-tutorial1>>, and we'll use <<org.apache.tapestry5.tutorial>> as the base package.
   
   Our final command line is thus:
 
@@ -22,7 +22,7 @@
   -DarchetypeArtifactId=quickstart
   -DgroupId=org.apache.tapestry
   -DartifactId=tutorial1
-  -DpackageName=org.apache.tapestry.tutorial
+  -DpackageName=org.apache.tapestry5.tutorial
 ----
 
   We've shown this as several lines, but it would normally be entered as a single long line.
@@ -126,11 +126,11 @@
               <!-- The only significant configuration for Tapestry 5, this informs Tapestry
                    of where to look for pages, components and mixins. -->
               <param-name>tapestry.app-package</param-name>
-              <param-value>org.apache.tapestry.tutorial</param-value>
+              <param-value>org.apache.tapestry5.tutorial</param-value>
           </context-param>
           <filter>
               <filter-name>app</filter-name>
-              <filter-class>org.apache.tapestry.TapestryFilter</filter-class>
+              <filter-class>org.apache.tapestry5.TapestryFilter</filter-class>
           </filter>
           <filter-mapping>
               <filter-name>app</filter-name>
@@ -216,12 +216,12 @@
   re-used to generate the HTML sent to the browser, which results in the updated time showing up in the web browser.
   
   The final piece of the puzzle is the Java class for the page.  Tapestry has very specific rules for where page classes go.  Remember the package name (configured inside web.xml)?  Tapestry adds a
-  sub-package, "pages", to it and the Java class goes there. Thus the full Java class name is org.apache.tapestry.tutorial.pages.Index.
+  sub-package, "pages", to it and the Java class goes there. Thus the full Java class name is org.apache.tapestry5.tutorial.pages.Index.
   
-  <<src/main/java/org/apache/tapestry/tutorial/pages/Index.java>>
+  <<src/main/java/org/apache/tapestry5/tutorial/pages/Index.java>>
 
 ---
-package org.apache.tapestry.tutorial.pages;
+package org.apache.tapestry5.tutorial.pages;
 
 import java.util.Date;
 
@@ -240,7 +240,7 @@
   That's pretty darn simple: No classes to extend, no interfaces to implement, just a very pure POJO (Plain Old Java Object). You do have to meet the Tapestry framework
   halfway:
   
-  * You need to put the Java class in the expected package, org.apache.tapestry.tutorial.pages
+  * You need to put the Java class in the expected package, org.apache.tapestry5.tutorial.pages
   
   * The class must be public
   

Modified: tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/forms.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/forms.apt?rev=658398&r1=658397&r2=658398&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/forms.apt (original)
+++ tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/forms.apt Tue May 20 12:14:45 2008
@@ -15,12 +15,12 @@
   as we'll see shortly, a handy one).
   
   
-  <<src/main/java/org/apache/tapestry/tutorial/entities/Address.java:>>
+  <<src/main/java/org/apache/tapestry5/tutorial/entities/Address.java:>>
   
 ----
-package org.apache.tapestry.tutorial.entities;
+package org.apache.tapestry5.tutorial.entities;
 
-import org.apache.tapestry.tutorial.data.Honorific;
+import org.apache.tapestry5.tutorial.data.Honorific;
 
 public class Address
 {
@@ -148,10 +148,10 @@
 
   It's just a collection of getter and setter methods.  We also need to define the enum type, Honorific:
   
-  <<src/main/java/org/apache/tapestry/tutorial/data/Honorific.java:>>
+  <<src/main/java/org/apache/tapestry5/tutorial/data/Honorific.java:>>
   
 ---
-package org.apache.tapestry.tutorial.data;
+package org.apache.tapestry5.tutorial.data;
 
 public enum Honorific
 {
@@ -198,10 +198,10 @@
 
   And the corresponding class:
   
-  <<src/main/java/org/apache/tapestry/tutorial1/pages/address/CreateAddress.java:>>
+  <<src/main/java/org/apache/tapestry5/tutorial1/pages/address/CreateAddress.java:>>
   
 ----
-package org.apache.tapestry.tutorial.pages.address;
+package org.apache.tapestry5.tutorial.pages.address;
 
 public class CreateAddress
 {
@@ -211,7 +211,7 @@
    
    So ... why is the class named "CreateAddress" and not simply "Create"?  Actually, we could have named it "Create", and 
    the application would still work, but the longer <class> name is equally valid.  Tapestry noticed the redundancy in the
-   class name:  <<<org.apache.tapestry.tutorial.pages.>>><address><<<.Create>>><Address> and just stripped it out.
+   class name:  <<<org.apache.tapestry5.tutorial.pages.>>><address><<<.Create>>><Address> and just stripped it out.
    
    Eventually, your application will probably have more entities:  perhaps you'll have a "user/Create" page and a "payment/Create" page and an "account/Create" page.
    Now, you <could> have a bunch of different classes named <<<Create>>> spread across a number of different packages.  That's legal Java, but it isn't ideal.  You may find yourself
@@ -220,7 +220,7 @@
    Tapestry is encouraging you to use a more descriptive name: <<<Create>>><Address> not just <<<Create>>>, but it isn't making you pay the cost (in terms of longer,
    uglier URLs).  The URL to access the page will still be http://localhost:8080/tutorial1/address/create.
 
-   Another note:  Index pages work in folders as well.  A class named org.apache.tapestry.tutorial.pages.address.AddressIndex would be given the name
+   Another note:  Index pages work in folders as well.  A class named org.apache.tapestry5.tutorial.pages.address.AddressIndex would be given the name
    "address/Index".  However, Tapestry has special rules for pages named "Index" and the render URL would be
    http://localhost:8080/tutorial1/address/ .  In other words, you can place Index pages in any folder and Tapestry will
    build a short URL for that page ... and you <don't> have to keep naming the classes Index (it's confusing to have many classes with the same
@@ -308,7 +308,7 @@
   
   All it takes is to create a message entry with a particular name:  the name of the property suffixed with "-label". As elsewhere, Tapestry is forgiving of case.
   
-  <<src/main/resources/org/apache/tapestry/tutorial/pages/address/CreateAddress.properties:>>
+  <<src/main/resources/org/apache/tapestry5/tutorial/pages/address/CreateAddress.properties:>>
   
 ----
 street1-label=Street 1
@@ -381,7 +381,7 @@
   Before we worry about storing the Address object, we should make sure that the user provides reasonable values. For example,several of the fields should be required,
   and phone numbers and email address have specific formats.
   
-  The BeanEditForm checks for a Tapestry-specific annotation, @org.apache.tapestry.beaneditor.Validate, on the getter <or> setter method of each property.   
+  The BeanEditForm checks for a Tapestry-specific annotation, @org.apache.tapestry5.beaneditor.Validate, on the getter <or> setter method of each property.
 
   Update the getter methods for the lastName, firstName, street1, city, state and zip fields, 
   adding a @Validate annotation to each:

Modified: tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/forms2.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/forms2.apt?rev=658398&r1=658397&r2=658398&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/forms2.apt (original)
+++ tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/forms2.apt Tue May 20 12:14:45 2008
@@ -166,14 +166,14 @@
   annotations can be applied to fields or to accessor methods, but the Tapestry annotations we use below
   are for methods only.
 
-  <<src/main/java/org/apache/tapestry/tutorial/entities/Address.java:>>
+  <<src/main/java/org/apache/tapestry5/tutorial/entities/Address.java:>>
 
 ----
-package org.apache.tapestry.tutorial.entities;
+package org.apache.tapestry5.tutorial.entities;
 
-import org.apache.tapestry.beaneditor.NonVisual;
-import org.apache.tapestry.beaneditor.Validate;
-import org.apache.tapestry.tutorial.data.Honorific;
+import org.apache.tapestry5.beaneditor.NonVisual;
+import org.apache.tapestry5.beaneditor.Validate;
+import org.apache.tapestry5.tutorial.data.Honorific;
 
 import javax.persistence.Entity;
 import javax.persistence.GeneratedValue;
@@ -345,17 +345,17 @@
 
   []
 
-  <<src/main/java/org/apache/tapestry/tutorial/pages/address/CreateAddress.java:>>
+  <<src/main/java/org/apache/tapestry5/tutorial/pages/address/CreateAddress.java:>>
 
 ----
-package org.apache.tapestry.tutorial.pages.address;
+package org.apache.tapestry5.tutorial.pages.address;
 
-import org.apache.tapestry.annotation.InjectPage;
-import org.apache.tapestry.annotation.Property;
-import org.apache.tapestry.hibernate.annotations.CommitAfter;
-import org.apache.tapestry.ioc.annotation.Inject;
-import org.apache.tapestry.tutorial.entities.Address;
-import org.apache.tapestry.tutorial.pages.Index;
+import org.apache.tapestry5.annotations.InjectPage;
+import org.apache.tapestry5.annotations.Property;
+import org.apache.tapestry5.hibernate.annotations.CommitAfter;
+import org.apache.tapestry5.ioc.annotations.Inject;
+import org.apache.tapestry5.tutorial.entities.Address;
+import org.apache.tapestry5.tutorial.pages.Index;
 import org.hibernate.Session;
 
 public class CreateAddress
@@ -379,7 +379,7 @@
 }
 ----
 
-  The {{{../apidocs/org/apache/tapestry/ioc/annotations/Inject.html}Inject}} annotation tells Tapestry to inject a service into the
+  The {{{../apidocs/org/apache/tapestry5/ioc/annotations/Inject.html}Inject}} annotation tells Tapestry to inject a service into the
   annotated field; 
   Tapestry includes a sophisticated
   Inversion of Control container (similar in many ways to Spring) that is very good at locating available services
@@ -390,7 +390,7 @@
   of the request.  If we make changes to persistent objects, such as adding a new Address object,
   then it is necessary to commit the transaction.
 
-  The {{{../apidocs/org/apache/tapestry/hibernate/annotations/CommitAfter.html}CommitAfter}} annotation can be applied to any component method; if the method completes normally, the transaction
+  The {{{../apidocs/org/apache/tapestry5/hibernate/annotations/CommitAfter.html}CommitAfter}} annotation can be applied to any component method; if the method completes normally, the transaction
   will be committed (and a new transaction started to replace the committed transaction).
 
   After persisting the new address, we return to the main Index page of the application.
@@ -407,7 +407,7 @@
 [index-grid-v1.png] Adding the Grid to the Index page
 
   So, how is this implemented?  Primarily, its accomplished by the
-  {{{../tapestry-core/ref/org/apache/tapestry/corelib/components/Grid.html}Grid}} component.
+  {{{../tapestry-core/ref/org/apache/tapestry5/corelib/components/Grid.html}Grid}} component.
 
   The Grid component is based on the same concepts as the BeanEditForm component; it can pull apart
   a bean into columns. The columns are sortable, and when there are more entries than will fit on a single
@@ -423,7 +423,7 @@
 
   And all we have to do is supply the addresses property in the Java code:
 
-  <<src/main/java/org/apache/tapestry/tutorial/pages/Index.java (partial):>>
+  <<src/main/java/org/apache/tapestry5/tutorial/pages/Index.java (partial):>>
 
 ----
     @Inject

Modified: tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/hilo.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/hilo.apt?rev=658398&r1=658397&r2=658398&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/hilo.apt (original)
+++ tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/hilo.apt Tue May 20 12:14:45 2008
@@ -73,7 +73,7 @@
   On the Java side, the Guess page needs to have a target property:
   
 ----
-package org.apache.tapestry.tutorial.pages;
+package org.apache.tapestry5.tutorial.pages;
 
 public class Guess
 {
@@ -101,14 +101,14 @@
   
   Let's start with the code, and break it down:
   
-  <<src/main/java/org/apache/tapestry/tutorial/pages/Index.java>>
+  <<src/main/java/org/apache/tapestry5/tutorial/pages/Index.java>>
 
 ----
-package org.apache.tapestry.tutorial.pages;
+package org.apache.tapestry5.tutorial.pages;
 
 import java.util.Random;
 
-import org.apache.tapestry.annotation.InjectPage;
+import org.apache.tapestry5.annotations.InjectPage;
 
 public class Start
 {
@@ -134,7 +134,7 @@
   The Tapestry way is very object oriented: everything is done in terms of objects and methods and properties of those objects.
   
   This communication starts with the connection between the two pages:  in this case, the
-  {{{../apidocs/org/apache/tapestry/annotations/InjectPage.html}InjectPage}} annotation allows another page in the application
+  {{{../apidocs/org/apache/tapestry5/annotations/InjectPage.html}InjectPage}} annotation allows another page in the application
   to be injected into the Index page.
 
   Injection can be a somewhat nebulous concept.  In terms of Tapestry, it means that some cooperating object needed by one class is provided to it.  The other
@@ -249,7 +249,7 @@
   at the end of that request, the value was lost, and in the subsequent render request for the Guess page,
   the value was zero.
   
-  Fortunately, it is very easy to transcend this behavior.  We'll use an annotation, {{{../apidocs/org/apache/tapestry/annotations/Persist.html}Persist}},
+  Fortunately, it is very easy to transcend this behavior.  We'll use an annotation, {{{../apidocs/org/apache/tapestry5/annotations/Persist.html}Persist}},
   on the instance variable:
   
 ----
@@ -393,10 +393,10 @@
 </html>
 ---
 
-  <<src/main/java/org/apache/tapestry/tutorial/pages/GameOver.java:>>
+  <<src/main/java/org/apache/tapestry5/tutorial/pages/GameOver.java:>>
 
 ---
-package org.apache.tapestry.tutorial.pages;
+package org.apache.tapestry5.tutorial.pages;
 
 public class GameOver
 {
@@ -459,13 +459,13 @@
   
   Lastly, we need to make some changes to the GameOver class.
   
-  <<src/main/java/org/apache/tapestry/tutorial/GameOver.java:>>
+  <<src/main/java/org/apache/tapestry5/tutorial/GameOver.java:>>
   
 ---
-package org.apache.tapestry.tutorial.pages;
+package org.apache.tapestry5.tutorial.pages;
 
-import org.apache.tapestry.annotation.Persist;
-import org.apache.tapestry.annotation.Property;
+import org.apache.tapestry5.annotations.Persist;
+import org.apache.tapestry5.annotations.Property;
 
 public class GameOver
 {

Modified: tapestry/tapestry5/trunk/tapestry-tutorial1/src/test/conf/testng.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/src/test/conf/testng.xml?rev=658398&r1=658397&r2=658398&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-tutorial1/src/test/conf/testng.xml (original)
+++ tapestry/tapestry5/trunk/tapestry-tutorial1/src/test/conf/testng.xml Tue May 20 12:14:45 2008
@@ -18,7 +18,7 @@
 <suite name="Tapestry Tutorial #1" annotations="1.5" verbose="2">
     <test name="Services">
         <packages>
-            <package name="org.apache.tapestry.tutorial.services"/>
+            <package name="org.apache.tapestry5.tutorial.services"/>
         </packages>
     </test>
 </suite>

Modified: tapestry/tapestry5/trunk/tapestry-upload/pom.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-upload/pom.xml?rev=658398&r1=658397&r2=658398&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-upload/pom.xml (original)
+++ tapestry/tapestry5/trunk/tapestry-upload/pom.xml Tue May 20 12:14:45 2008
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.apache.tapestry</groupId>
     <artifactId>tapestry-upload</artifactId>
@@ -85,7 +86,7 @@
                     <archive>
                         <manifestEntries>
                             <Tapestry-Module-Classes>
-                                org.apache.tapestry.upload.services.UploadModule
+                                org.apache.tapestry5.upload.services.UploadModule
                             </Tapestry-Module-Classes>
                         </manifestEntries>
                     </archive>
@@ -117,7 +118,7 @@
                 <artifactId>tapestry-component-report</artifactId>
                 <version>${project.version}</version>
                 <configuration>
-                    <rootPackage>org.apache.tapestry.upload</rootPackage>
+                    <rootPackage>org.apache.tapestry5.upload</rootPackage>
                     <apidocs>../apidocs</apidocs>
                 </configuration>
             </plugin>

Modified: tapestry/tapestry5/trunk/tapestry-upload/src/test/conf/testng.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-upload/src/test/conf/testng.xml?rev=658398&r1=658397&r2=658398&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-upload/src/test/conf/testng.xml (original)
+++ tapestry/tapestry5/trunk/tapestry-upload/src/test/conf/testng.xml Tue May 20 12:14:45 2008
@@ -19,10 +19,10 @@
     <test name="Tapesty Upload Component">
         <parameter name="tapestry.integration-webapp" value="src/test/webapp"/>
         <packages>
-            <package name="org.apache.tapestry.upload.components"/>
-            <package name="org.apache.tapestry.upload.internal.services"/>
+            <package name="org.apache.tapestry5.upload.components"/>
+            <package name="org.apache.tapestry5.upload.internal.services"/>
             <!-- One day might be able to run this too -->
-            <!--package name="org.apache.tapestry.upload.integration"/-->
+            <!--package name="org.apache.tapestry5.upload.integration"/-->
         </packages>
     </test>
 </suite>

Modified: tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/example/upload/pages/Start.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/example/upload/pages/Start.java?rev=658398&r1=658397&r2=658398&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/example/upload/pages/Start.java (original)
+++ tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/example/upload/pages/Start.java Tue May 20 12:14:45 2008
@@ -14,8 +14,8 @@
 
 package org.example.upload.pages;
 
-import org.apache.tapestry.annotation.Persist;
-import org.apache.tapestry.upload.services.UploadedFile;
+import org.apache.tapestry5.annotations.Persist;
+import org.apache.tapestry5.upload.services.UploadedFile;
 
 import java.io.File;
 

Modified: tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/example/upload/services/AppModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/example/upload/services/AppModule.java?rev=658398&r1=658397&r2=658398&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/example/upload/services/AppModule.java (original)
+++ tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/example/upload/services/AppModule.java Tue May 20 12:14:45 2008
@@ -14,8 +14,8 @@
 
 package org.example.upload.services;
 
-import org.apache.tapestry.ioc.annotation.SubModule;
-import org.apache.tapestry.upload.services.UploadModule;
+import org.apache.tapestry5.ioc.annotations.SubModule;
+import org.apache.tapestry5.upload.services.UploadModule;
 
 /**
  * The SubModule is not normally needed, except that during tests of tapestry-upload, the necessary JAR Manifest does

Modified: tapestry/tapestry5/trunk/tapestry-upload/src/test/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-upload/src/test/webapp/WEB-INF/web.xml?rev=658398&r1=658397&r2=658398&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-upload/src/test/webapp/WEB-INF/web.xml (original)
+++ tapestry/tapestry5/trunk/tapestry-upload/src/test/webapp/WEB-INF/web.xml Tue May 20 12:14:45 2008
@@ -26,7 +26,7 @@
     </context-param>
     <filter>
         <filter-name>app</filter-name>
-        <filter-class>org.apache.tapestry.TapestryFilter</filter-class>
+        <filter-class>org.apache.tapestry5.TapestryFilter</filter-class>
     </filter>
     <filter-mapping>
         <filter-name>app</filter-name>