[CONF] Apache Tapestry Exploring the Project

2014-01-19 Thread Bob Harner (Confluence)














  


Bob Harner edited the page:
 


Exploring the Project   




 Comment: Made images big enough to see 


...
Make sure you save changes; then click the refresh link in the web browser:
 Image RemovedImage Added 



 Wiki Markup




 {float:right|width=30%}
{note}
If Live Class Reloading isn't working for you, check the Troubleshooting section at [Class Reloading].
{note}
{float} 



...
But ... what if you make a mistake? What if you got the name in the template wrong. Give it a try; in the template, change ${currentTime} to, say, ${currenTime}, and see what you get:
 Image RemovedImage Added 
This is Tapestry's exception report page. It's quite detailed. It clearly identifies what Tapestry was doing, and relates the problem to a specific line in the template, which is shown in context. Tapestry always expands out the entire stack of exceptions, because it is so common for exceptions to be thrown, caught, and re-thrown inside other exceptions. In fact, if we scroll down just a little bit, we see more detail about this exception, plus a little bit of help:
 Image RemovedImage Added 
This is part of Tapestry's way: it not only spells out exactly what it was doing and what went wrong, but it even helps you find a solution; here it tells you the names of properties you could have used.
...






 View Online   Like   View Changes  
 Stop watching space   Manage Notifications  


 


 


  This message was sent by Atlassian Confluence 5.0.3, Team Collaboration Software  






[CONF] Apache Tapestry Using BeanEditForm To Create User Forms

2014-01-19 Thread Bob Harner (Confluence)














  


Bob Harner edited the page:
 


Using BeanEditForm To Create User Forms   




 Comment: Made images big enough to see 


...



 Code Block








title
src/main/java/com/example/tutorial/entities/Address.java


language
java


 




 package com.example.tutorial.entities;

import com.example.tutorial.data.Honorific;

public class Address
{
  public Honorific honorific;
   public String firstName;
   public String lastName;
   public String street1;
   public String street2;
   public String city;
   public String state;
   public String zip;
   public String email;
   public String phone;
}
 



We also need to define the enum type, Honorific:
...
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 (com.example.tutorial.pages.address.CreateAddress) and just stripped out the redundant suffix
...
 . Tapestry also checks for redundant prefixes. In addition, the long name, address/CreateAddress  
...
 . 
  
 would also work. 
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. You could have a bunch of different classes all named Create spread across a number of different packages. That's legal Java, but it isn't ideal. You may find yourself 

svn commit: r894787 - in /websites/production/tapestry/content: cache/main.pageCache exploring-the-project.html using-beaneditform-to-create-user-forms.html

2014-01-19 Thread buildbot
Author: buildbot
Date: Sun Jan 19 22:20:55 2014
New Revision: 894787

Log:
Production update by buildbot for tapestry

Modified:
websites/production/tapestry/content/cache/main.pageCache
websites/production/tapestry/content/exploring-the-project.html

websites/production/tapestry/content/using-beaneditform-to-create-user-forms.html

Modified: websites/production/tapestry/content/cache/main.pageCache
==
Binary files - no diff available.

Modified: websites/production/tapestry/content/exploring-the-project.html
==
--- websites/production/tapestry/content/exploring-the-project.html (original)
+++ websites/production/tapestry/content/exploring-the-project.html Sun Jan 19 
22:20:55 2014
@@ -364,7 +364,7 @@ var footnoteMarkerHighlight = function(i
 
 
 
-span class=gliffy-container id=gliffy-container-24346949-4298 
data-fullwidth=913 data-ceoid=24188263 data-filename=Templates and 
Parameters
+span class=gliffy-container id=gliffy-container-24346949-3268 
data-fullwidth=913 data-ceoid=24188263 data-filename=Templates and 
Parameters
 
 
 span class=gliffy-chrome-container
@@ -384,11 +384,11 @@ var footnoteMarkerHighlight = function(i
 /span
 /span
 
-map id=gliffy-map-24346949-5266 name=gliffy-map-24346949-5266/map
+map id=gliffy-map-24346949-1156 name=gliffy-map-24346949-1156/map
 
-img class=gliffy-image gliffy-image-border 
id=gliffy-image-24346949-4298 width=304 height=300 data-full-width=913 
data-full-height=901 
src=https://cwiki.apache.org/confluence/download/attachments/24188263/Templates%20and%20Parameters.png?version=2amp;modificationDate=1371888025000amp;api=v2;
 usemap=#gliffy-map-24346949-5266
+img class=gliffy-image gliffy-image-border 
id=gliffy-image-24346949-3268 width=304 height=300 data-full-width=913 
data-full-height=901 
src=https://cwiki.apache.org/confluence/download/attachments/24188263/Templates%20and%20Parameters.png?version=2amp;modificationDate=1371888025000amp;api=v2;
 usemap=#gliffy-map-24346949-1156
 
-map class=gliffy-dynamic id=gliffy-dynamic-map-24346949-4298 
name=gliffy-dynamic-map-24346949-4298/map
+map class=gliffy-dynamic id=gliffy-dynamic-map-24346949-3268 
name=gliffy-dynamic-map-24346949-3268/map
 /span
 
 
@@ -401,7 +401,7 @@ var footnoteMarkerHighlight = function(i
 return quot;A great day to learn Tapestryquot;;
   }
 ]]/script
-/div/divpMake sure you save changes; then click the refresh link in the 
web browser:/ppimg class=confluence-embedded-image confluence-thumbnail 
src=exploring-the-project.thumbs/app-live-reload.png 
data-image-src=/confluence/download/attachments/24188263/app-live-reload.png?version=2amp;modificationDate=1321974913000amp;api=v2/pdiv
 class=navmenu style=float:right; width:30%; background:white; margin:3px; 
padding:3px
+/div/divpMake sure you save changes; then click the refresh link in the 
web browser:/ppimg class=confluence-embedded-image width=700 
src=https://cwiki.apache.org/confluence/download/attachments/24188263/app-live-reload.png?version=2amp;modificationDate=1321974913000amp;api=v2;
 
data-image-src=/confluence/download/attachments/24188263/app-live-reload.png?version=2amp;modificationDate=1321974913000amp;api=v2/pdiv
 class=navmenu style=float:right; width:30%; background:white; margin:3px; 
padding:3px
 div class=aui-message warning shadowed information-macro
 span class=aui-icon icon-warningIcon/span
 div class=message-content
@@ -409,7 +409,7 @@ var footnoteMarkerHighlight = function(i
 pIf Live Class Reloading isn't working for you, check the Troubleshooting 
section at a shape=rect href=class-reloading.html title=Class 
ReloadingClass Reloading/a./p
 /div
 /div
-/divpThis is one of Tapestry's early emwow factor/em features: changes 
to your component classes are picked up immediately (a feature we call Live 
Class Reloading). No restart. No re-deploy. Make the changes and see them 
emnow/em. Nothing should slow you down or get in the way of you getting 
your job done./ppBut ... what if you make a mistake? What if you got the 
name in the template wrong. Give it a try; in the template, change 
${currentTime} to, say, ${currenTime}, and see what you get:/ppimg 
class=confluence-embedded-image confluence-thumbnail 
src=exploring-the-project.thumbs/app-error-1.png 
data-image-src=/confluence/download/attachments/24188263/app-error-1.png?version=1amp;modificationDate=1291068475000amp;api=v2/ppThis
 is Tapestry's exception report page. It's quite detailed. It clearly 
identifies what Tapestry was doing, and relates the problem to a specific line 
in the template, which is shown in context. Tapestry always expands out the ent
 ire stack of exceptions, because it is so common for exceptions to be thrown, 
caught, and re-thrown inside other 

[CONF] Apache Tapestry Creating The Skeleton Application

2014-01-19 Thread Bob Harner (Confluence)














  


Bob Harner edited the page:
 


Creating The Skeleton Application   




 Comment: Made images big enough to see 


...
Our final command line is:
 



 Code Block








language
text


 




 mvn archetype:generate -DarchetypeCatalog=http://tapestry.apache.org
 



It will then prompt you to pick the archetype - choose the latest Tapestry 5.X Quickstart Project, enter the group id, artifact id, version and package when prompted.



 No Format




 

$ mvn archetype:generate -DarchetypeCatalog=http://tapestry.apache.org
[INFO] Scanning for projects...
[INFO]
[INFO] 
[INFO] Building Maven Stub Project (No POM) 1
[INFO] 
[INFO]
[INFO]  maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom 
[INFO]
[INFO]  maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom 
[INFO]
[INFO] --- maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
[INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
Choose archetype:
1: http://tapestry.apache.org - org.apache.tapestry:quickstart (Tapestry 5 Quickstart Project)
2: http://tapestry.apache.org - org.apache.tapestry:tapestry-archetype (Tapestry 4.1.6 Archetype)
Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 1
Choose version:
1: 5.0.19
2: 5.1.0.5
3: 5.2.6
4: 5.3.7
Choose a number: 4: 4
Define value for property 

svn commit: r894793 - in /websites/production/tapestry/content: cache/main.pageCache creating-the-skeleton-application.html

2014-01-19 Thread buildbot
Author: buildbot
Date: Sun Jan 19 23:20:51 2014
New Revision: 894793

Log:
Production update by buildbot for tapestry

Modified:
websites/production/tapestry/content/cache/main.pageCache
websites/production/tapestry/content/creating-the-skeleton-application.html

Modified: websites/production/tapestry/content/cache/main.pageCache
==
Binary files - no diff available.

Modified: 
websites/production/tapestry/content/creating-the-skeleton-application.html
==
--- websites/production/tapestry/content/creating-the-skeleton-application.html 
(original)
+++ websites/production/tapestry/content/creating-the-skeleton-application.html 
Sun Jan 19 23:20:51 2014
@@ -29,6 +29,8 @@
   link 
href='http://cxf.apache.org/resources/highlighter/styles/shThemeCXF.css' 
rel='stylesheet' type='text/css' /
   script src='http://cxf.apache.org/resources/highlighter/scripts/shCore.js' 
type='text/javascript'/script
   script 
src='http://cxf.apache.org/resources/highlighter/scripts/shBrushJava.js' 
type='text/javascript'/script
+  script 
src='http://cxf.apache.org/resources/highlighter/scripts/shBrushXml.js' 
type='text/javascript'/script
+  script 
src='http://cxf.apache.org/resources/highlighter/scripts/shBrushPlain.js' 
type='text/javascript'/script
   script type=text/javascript
   SyntaxHighlighter.defaults['toolbar'] = false;
   SyntaxHighlighter.all();
@@ -77,35 +79,10 @@ table.ScrollbarTable td.ScrollbarParent 
 table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
 table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 
16px;border: none;}
 
-/*]]*//stylediv class=Scrollbartable class=ScrollbarTabletrtd 
colspan=1 rowspan=1 class=ScrollbarPrevIcona shape=rect 
href=dependencies-tools-and-plugins.htmlimg align=middle border=0 
src=https://cwiki.apache.org/confluence/images/icons/back_16.gif; width=16 
height=16/a/tdtd colspan=1 rowspan=1 class=ScrollbarPrevName 
width=33%a shape=rect 
href=dependencies-tools-and-plugins.htmlDependencies, Tools and 
Plugins/a#160;/tdtd colspan=1 rowspan=1 class=ScrollbarParent 
width=33%supa shape=rect href=tapestry-tutorial.htmlimg 
align=middle border=0 
src=https://cwiki.apache.org/confluence/images/icons/up_16.gif; width=8 
height=8/a/supa shape=rect href=tapestry-tutorial.htmlTapestry 
Tutorial/a/tdtd colspan=1 rowspan=1 class=ScrollbarNextName 
width=33%#160;a shape=rect 
href=loading-the-project-into-eclipse.htmlLoading the Project Into 
Eclipse/a/tdtd colspan=1 rowspan
 =1 class=ScrollbarNextIcona shape=rect 
href=loading-the-project-into-eclipse.htmlimg align=middle border=0 
src=https://cwiki.apache.org/confluence/images/icons/forwd_16.gif; width=16 
height=16/a/td/tr/table/div
-
-pBefore we can get down to the fun, we have to create an empty application. 
Tapestry uses a feature of Maven to do this: strongarchetypes/strong (a 
too-clever way of saying project templates)./p
-
-pWhat we'll do is create an empty shell application using Maven, then import 
the application into Eclipse to do the rest of the work./p
-
-pFor the tutorial, we're using a fresh install of Eclipse and an empty 
workspace at code/Users/joeuser/workspace/code.  You may need to adjust a 
few things for other operating systems or local paths./p
-
-h2 id=CreatingTheSkeletonApplication-UsingtheQuickstartArchetypeUsing the 
Quickstart Archetype/h2
-
-pFrom our workspace directory, we'll use Maven to create a skeleton Tapestry 
project. /p
-
-pBefore proceeding, we have to decide on four things: A Maven emgroup 
id/em and emartifact id/em for our project, a emversion/em, and a 
embase package name/em./p
-
-pMaven 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./p
-
-pFor this example, we'll use the group id strongcom.example/strong, 
artifact id strongtutorial1/strong, version strong1.0-SNAPSHOT/strong 
and we'll use strongcom.example.tutorial/strong as the base package./p
-
-pOur final command line is:/p
-
-div class=code panel pdl style=border-width: 1px;div class=codeContent 
panelContent pdl
-script class=theme: Default; brush: java; gutter: false 
type=syntaxhighlighter![CDATA[
-mvn archetype:generate -DarchetypeCatalog=http://tapestry.apache.org
+/*]]*//stylediv class=Scrollbartable class=ScrollbarTabletrtd 
colspan=1 rowspan=1 class=ScrollbarPrevIcona shape=rect 
href=dependencies-tools-and-plugins.htmlimg align=middle border=0 
src=https://cwiki.apache.org/confluence/images/icons/back_16.gif; width=16 
height=16/a/tdtd colspan=1 rowspan=1 class=ScrollbarPrevName 
width=33%a shape=rect 
href=dependencies-tools-and-plugins.htmlDependencies, Tools and 
Plugins/a#160;/tdtd colspan=1 rowspan=1 class=ScrollbarParent 
width=33%supa shape=rect href=tapestry-tutorial.htmlimg 
align=middle