[jira] [Updated] (TAP5-2070) Respond with a HTTP 404 if the page is activated with an activation context not explicitly supported by the page itself

2013-02-10 Thread Massimo Lusetti (JIRA)

 [ 
https://issues.apache.org/jira/browse/TAP5-2070?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Massimo Lusetti updated TAP5-2070:
--

Attachment: 0001-TAP5-2070-Implement-logic-for-recognize-requests-to-.patch

Patch that implement the new behavior but keep it disabled.
It can be enabled by a configuration symbol.

> Respond with a HTTP 404 if the page is activated with an activation context 
> not explicitly supported by the page itself
> ---
>
> Key: TAP5-2070
> URL: https://issues.apache.org/jira/browse/TAP5-2070
> Project: Tapestry 5
>  Issue Type: Improvement
>  Components: tapestry-core
>Reporter: Massimo Lusetti
>Assignee: Massimo Lusetti
> Attachments: 
> 0001-TAP5-2070-Implement-logic-for-recognize-requests-to-.patch
>
>
> The behavior from day one for pages within Tapestry is to being able to serve 
> requests that come with an activation context with more parameters that the 
> ones declared by the page itself.
> This feature lead the framework to serve requests that comes to URL which are 
> not explicitly declared by the pages, for example a page named: Super with an 
> activation event handler method like this one:
> onActivate(String character) { ... }
> will finely serve requests for:
> /super/mario
> /super/luigi
> /super/wario
> /super/waluigi
> but it will also serve requests for:
> /super/mario/luigi/wario/waluigi
> This issue is to change that behavior.
> If the page does declare a specific activation event handler method the 
> corresponding serving URLs should adhere strictly, otherwise a HTTP 404 is 
> raised.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Closed] (TAP5-879) 404 is never raised automatically if the application has an index page.

2013-02-10 Thread Massimo Lusetti (JIRA)

 [ 
https://issues.apache.org/jira/browse/TAP5-879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Massimo Lusetti closed TAP5-879.


Resolution: Won't Fix

A new issue has been created to reflect what I would like to achieve.

Here we are talking only about Index pages and I want all pages to behave the 
same so I ask you to follow TAP5-2070 which will implement this plus more.

I you feel strong about this particular issue, please reopen. 

> 404 is never raised automatically if the application has an index page.
> ---
>
> Key: TAP5-879
> URL: https://issues.apache.org/jira/browse/TAP5-879
> Project: Tapestry 5
>  Issue Type: Bug
>  Components: tapestry-core
>Affects Versions: 5.1.0.5
>Reporter: Christophe Cordenier
>Assignee: Massimo Lusetti
> Attachments: TAP5-879.txt, TAP5-986.txt
>
>
> The default behavior of PageRenderDispatcher when a user access to a URL like 
> 'http://localhost/demo/blah' (where 'demo' is the application context and 
> 'blah' is a page that does not exist) is to translate to 
> 'http://localhost/demo/index/blah' if an index page exists even if it has no 
> activation method.
> It could be a better solution to check if a the index page has an activation 
> method with the corresponding parameter number and type, and automatically 
> raise a http 404 if not.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (TAP5-2070) Respond with a HTTP 404 if the page is activated with an activation context not explicitly supported by the page itself

2013-02-10 Thread Massimo Lusetti (JIRA)
Massimo Lusetti created TAP5-2070:
-

 Summary: Respond with a HTTP 404 if the page is activated with an 
activation context not explicitly supported by the page itself
 Key: TAP5-2070
 URL: https://issues.apache.org/jira/browse/TAP5-2070
 Project: Tapestry 5
  Issue Type: Improvement
  Components: tapestry-core
Reporter: Massimo Lusetti


The behavior from day one for pages within Tapestry is to being able to serve 
requests that come with an activation context with more parameters that the 
ones declared by the page itself.

This feature lead the framework to serve requests that comes to URL which are 
not explicitly declared by the pages, for example a page named: Super with an 
activation event handler method like this one:

onActivate(String character) { ... }

will finely serve requests for:

/super/mario
/super/luigi
/super/wario
/super/waluigi

but it will also serve requests for:

/super/mario/luigi/wario/waluigi

This issue is to change that behavior.
If the page does declare a specific activation event handler method the 
corresponding serving URLs should adhere strictly, otherwise a HTTP 404 is 
raised.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Assigned] (TAP5-2070) Respond with a HTTP 404 if the page is activated with an activation context not explicitly supported by the page itself

2013-02-10 Thread Massimo Lusetti (JIRA)

 [ 
https://issues.apache.org/jira/browse/TAP5-2070?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Massimo Lusetti reassigned TAP5-2070:
-

Assignee: Massimo Lusetti

> Respond with a HTTP 404 if the page is activated with an activation context 
> not explicitly supported by the page itself
> ---
>
> Key: TAP5-2070
> URL: https://issues.apache.org/jira/browse/TAP5-2070
> Project: Tapestry 5
>  Issue Type: Improvement
>  Components: tapestry-core
>Reporter: Massimo Lusetti
>Assignee: Massimo Lusetti
>
> The behavior from day one for pages within Tapestry is to being able to serve 
> requests that come with an activation context with more parameters that the 
> ones declared by the page itself.
> This feature lead the framework to serve requests that comes to URL which are 
> not explicitly declared by the pages, for example a page named: Super with an 
> activation event handler method like this one:
> onActivate(String character) { ... }
> will finely serve requests for:
> /super/mario
> /super/luigi
> /super/wario
> /super/waluigi
> but it will also serve requests for:
> /super/mario/luigi/wario/waluigi
> This issue is to change that behavior.
> If the page does declare a specific activation event handler method the 
> corresponding serving URLs should adhere strictly, otherwise a HTTP 404 is 
> raised.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


svn commit: r850135 - in /websites/production/tapestry/content: cache/main.pageCache forms-and-validation.html

2013-02-10 Thread buildbot
Author: buildbot
Date: Sun Feb 10 16:20:54 2013
New Revision: 850135

Log:
Production update by buildbot for tapestry

Modified:
websites/production/tapestry/content/cache/main.pageCache
websites/production/tapestry/content/forms-and-validation.html

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

Modified: websites/production/tapestry/content/forms-and-validation.html
==
--- websites/production/tapestry/content/forms-and-validation.html (original)
+++ websites/production/tapestry/content/forms-and-validation.html Sun Feb 10 
16:20:54 2013
@@ -269,7 +269,7 @@
 Tapestry provides the following built-in validators:
 
 
- Validator  Constraint Type  Description  Example  email  –   Ensures that the given input is a valid e-mail address 
   max  long  Enforces a maximum integer value    
maxLength  int  Makes sure that a string value 
has a maximum length  
 
 min  long  Enforces a minimum integer value    minLength  int  Does nothing (used to override a @Validate annotation) 
   none 
 –  Makes sure that a string value 
has a minimum length  
 
 regexp  pattern  Makes sure that a string value conforms to a 
given pattern  
  
required  –  
  Makes sure that a string 
value is not null and not the empty string   
+ Validator  Constraint Type  Description  Example  email  –   Ensures that the given input looks like a valid e-mail 
address  
  max  long  Enforces a maximum integer value    maxLength  int  Makes sure that a string value has a maximum length 
   min  long  Enforces a minimum integer value    minLength  int  Makes sure that a string value has a minimum length 
   none  –  Does nothing (used to override a @Validate annotation) 
   regexp  pattern  Makes sure that a string value conforms to a given 
pattern  
  
required  –
 ;   Makes sure that a 
string value is not null and not the empty string   
 
 
 




svn commit: r1444559 - in /tapestry/tapestry-site/trunk: README pom.xml

2013-02-10 Thread bobharner
Author: bobharner
Date: Sun Feb 10 16:10:39 2013
New Revision: 1444559

URL: http://svn.apache.org/r1444559
Log:
Turned off checkstyle, simplifiied building of whole site, tweaked the README 
for how to run the SiteExporer

Modified:
tapestry/tapestry-site/trunk/README
tapestry/tapestry-site/trunk/pom.xml

Modified: tapestry/tapestry-site/trunk/README
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry-site/trunk/README?rev=1444559&r1=1444558&r2=1444559&view=diff
==
--- tapestry/tapestry-site/trunk/README (original)
+++ tapestry/tapestry-site/trunk/README Sun Feb 10 16:10:39 2013
@@ -1,38 +1,49 @@
 
-This is the start of an export utility to export the Tapestry
-confluence spaces to the sites. To run this manually, you need to 
-have a copy of the Tapestry website checked out to a local directory:
+This is SiteExporter utility, used to export (publish) the Tapestry Confluence
+wiki content (pages and their attachments) to static web content directories 
and
+files. To run this manually, you need to have a copy of the Tapestry static
+website checked out to a local directory:
 
-svn checkout 
https://svn.apache.org/repos/infra/websites/production/tapestry/content
+  svn checkout 
https://svn.apache.org/repos/infra/websites/production/tapestry/content
 
-Build:
-mvn install
+To build the SiteExporter Java (command-line) program itself:
 
-You will need to pass credentials for a valid confluence user.  This can be
-done in one of two ways:
+  mvn install
 
-1) Command line:
-   -Dconfluence.user=username -Dconfluence.password=password
+To run the SiteExporter program, you will need to pass credentials for a valid
+Confluence user, and specify the directory where the static content resides.
+This can be done in one of two ways:
+
+1) Add a profile to your .m2/settings.xml file, with your user name, password,
+and content directory:
 
-2) Profile in .m2/settings.xml

 confluence
 
 user
 passwd
+/path/to/content
 
 
 
-To export the space:
-mvn -Pconfluence exec:java -Dcxf.site.output=/path/to/content
-should appear in /path/to/content/
-
-In the confluence profile above, you could add a property like:
-   /path/to/content
-to simplify passing that into the command.
+2) Alternatively, and less conveniently, you can specify the user name, 
password
+and content directory as system properties on mvn command line:
+
+   -Dconfluence.user=username -Dconfluence.password=password 
-Dcxf.site.output=/path/to/content
+
+To export only the changed pages in the wiki space (this is normally only
+run from BuildBot):
+
+  mvn -Pconfluence exec:java
+  
+To export ALL pages in the wiki space (for example, after you have changed
+the Velocity template file:
+
+  mvn -Pconfluence,force exec:java
 
-When you commit any changes in the content directory, the changes 
-should be "live" fairly quickly due to the svnpubsub process.
+After you have updated the static content locally, you'll need to commit any
+changes in the content directory via the usual Subversion commit. The changes
+should be "live" in just a few seconds, due to the svnpubsub process.
 
 
 

Modified: tapestry/tapestry-site/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry-site/trunk/pom.xml?rev=1444559&r1=1444558&r2=1444559&view=diff
==
--- tapestry/tapestry-site/trunk/pom.xml (original)
+++ tapestry/tapestry-site/trunk/pom.xml Sun Feb 10 16:10:39 2013
@@ -39,6 +39,7 @@
 ${basedir}/content
 ${site.output}
 true
+true
 
 
 
@@ -90,7 +91,7 @@
 ${extra.arg}
 ${svn.arg1}
 ${svn.arg2}
-
+${force.arg}
 ${basedir}/template/main.cfg
 
 
@@ -99,8 +100,22 @@
 
 
 
-
 
+
+
+
+force
+
+-force
+
+
+
+
 
 svn
 
@@ -108,5 +123,6 @@
 -commit
 
 
+
 
 




[CONF] Apache Tapestry > Forms and Validation

2013-02-10 Thread confluence







Forms and Validation
Page edited by Bob Harner


Comment:
Fixed mixed up table of available validators


 Changes (4)
 




...
 || Validator || Constraint Type || Description || Example || 
| email | --  | Ensures that the given input is looks like a valid e-mail address | {{}} | 
| max | long | Enforces a maximum integer value | {{}} | | maxLength | int | Makes sure that a string value has a maximum length | {{}} | | min | long | Enforces a minimum integer value | {{}} | 
| minLength | int | Makes sure that a string value has a minimum length | {{}} | 
| minLength none | int -- | Does nothing (used to override a @Validate annotation) | {{}} | 
| none | -- | Makes sure that a string value has a minimum length | {{}} | 
| regexp | pattern | Makes sure that a string value conforms to a given pattern | {{}} | | required | --  | Makes sure that a string value is not null and not the empty string | {{}} | 
...


Full Content


Related Articles


 Page:
 Forms and Validation





 Page:
 Forms and Form Components FAQ





 Page:
 Bean Validation






The life's blood of any application is form input; this is the most effective way to gather significant information from the user. Whether it's a search form, a login screen or a multi-page registration wizard, forms are how the user really expresses themselves to the application.

Tapestry excels at creating forms and validating input. Input validation is declarative, meaning you simply tell Tapestry what validations to apply to a given field, and it takes care of it on the server and (once implemented) on the client as well.

Finally, Tapestry is able to not only present the errors back to the user, but to decorate the fields and the labels for the fields, marking them as containing errors (primarily, using CSS effects).

Contents



The Form Component

Form Events
Tracking Validation Errors
Storing Data Between Requests
Configuring Fields and Labels
Errors and Decorations

Form Validation

Available Validators
Centralizing Validation with @Validate
Customizing Validation Messages

Customizing Validation Messages for BeanEditForm

Configuring Validator Contraints in the Message Catalog
Validation Macros
Overriding the Translator with Events



The Form Component

The core of Tapestry's form support is the Form component. The Form component encloses (wraps around) all the other field components such as TextField, TextArea, Checkbox, etc.

Form Events

The Form component emits a number of component events. You'll need to provide event handler methods for some of these.

When rendering, the Form component emits two notifications: first, "prepareForRender", then "prepare". These allow the Form's container to setup any fields or properties that will be referenced in the form. For example, this is a good place to create a temporary entity object to be rendered, or to load an entity from a database to be edited.

When user submits the form on the client, a series of steps occur on the server.

First, the Form emits a "prepareForSubmit" notification, then a "prepare" notification. These allow the container to ensure that objects are set up and ready to receive information from the form submission.

Next, all the fields inside the form are activated to pull values out of the incoming request, validate them and (if valid) store the changes.

For Tapestry 4 Users: Tapestry 5 does not use the fragile "form rewind" approach from Tapestry 4. Instead, a hidden field generated during the render stores the information needed to process the form submission.

After the fields have done their processing, the Form emits a "validate" event. This is a chance to perform cross-form validation that can't be described declaratively.

Note: For compatibility with release 5.1 and earlier, the Form component also emits a "validateForm" event. (See TAP5-760.)

Next, the Form determines if there have been any validation errors. If there have been, then the submission is considered a failure, and a "failure" event is emitted. If there have been no validation errors, then a "success" event is emitted.

Finally, the Form emits a "submit" event, for logic tha

svn commit: r850115 - in /websites/production/tapestry/content: cache/main.pageCache tapestry-ioc-overview.html

2013-02-10 Thread buildbot
Author: buildbot
Date: Sun Feb 10 11:20:53 2013
New Revision: 850115

Log:
Production update by buildbot for tapestry

Modified:
websites/production/tapestry/content/cache/main.pageCache
websites/production/tapestry/content/tapestry-ioc-overview.html

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

Modified: websites/production/tapestry/content/tapestry-ioc-overview.html
==
--- websites/production/tapestry/content/tapestry-ioc-overview.html (original)
+++ websites/production/tapestry/content/tapestry-ioc-overview.html Sun Feb 10 
11:20:53 2013
@@ -52,6 +52,7 @@
 
   
 Apache Tapestry > Documentation > User Guide > IoC > Tapestry IoC Overview
+https://cwiki.apache.org/confluence/pages/editpage.action?pageId=23338486";>edit
   
 
 
@@ -67,13 +68,13 @@ table.ScrollbarTable td.ScrollbarNextIco
 
 Tapestry IoC Overview
 
-Even today, with the overwhelming success of http://www.springframework.org"; >Spring and the 
rise of smaller, simpler approaches to building application that stand in sharp 
contrast to the ultra-heavyweight EJB approach, many people still have trouble 
wrapping their heads around Inversion of Control.
+Even today, with the overwhelming success of http://www.springframework.org"; >Spring and the 
rise of smaller, simpler approaches to building applications (in contrast to 
the heavyweight EJB approach), many people still have trouble wrapping their 
heads around Inversion of Control.
 
 Really understanding IoC is a new step for many developers. If you can 
remember back to when you made the transition from procedural programming (in 
C, or BASIC) to object oriented programming, you might remember the point where 
you "got it". The point where it made sense to have methods on objects, and 
data inside objects.
 
-Inversion of Control builds upon those ideas. The goal is to make coding 
more robust (that is, with fewer errors), more reusable and to make code much 
easier to test.
+Inversion of Control builds upon those ideas. The goal is to make code more 
robust (that is, with fewer errors), more reusable and much easier to test.
 
-Most developers are used to a more monolithic design, they have a 
few core objects and a main() method somewhere that starts the ball 
rolling. main() instantiates the first couple of classes, and those 
classes end up instantiating and using all the other classes in the system.
+Prior to IoC approaches, most developers were used to a more 
monolithic design, with a few core objects and a main() 
method somewhere that starts the ball rolling. main() instantiates the 
first couple of classes, and those classes end up instantiating and using all 
the other classes in the system.
 
 That's an unmanaged system. Most desktop applications are 
unmanaged, so it's a very familiar pattern, and easy to get your head 
around.
 




[jira] [Comment Edited] (TAP5-2067) Error loading classes with Tomcat 7 parallel deployment

2013-02-10 Thread Pavel (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-2067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13575407#comment-13575407
 ] 

Pavel edited comment on TAP5-2067 at 2/10/13 10:03 AM:
---

I have Debian 5.0 (Kernel 2.6.26-2-686-bigmem, i386) with Tomcat 7.0.33. JVM 
1.6.0_26-b03, Tapestry 5.3.6, application is deployed to root context as 
ROOT##version folder

  was (Author: rodimusprime):
I have Debian 5.0 (x32) with Tomcat 7.0.33. Tapestry 5.3.6, application is 
deployed to root context as ROOT##version folder
  
> Error loading classes with Tomcat 7 parallel deployment
> ---
>
> Key: TAP5-2067
> URL: https://issues.apache.org/jira/browse/TAP5-2067
> Project: Tapestry 5
>  Issue Type: Improvement
>Affects Versions: 5.3.6
>Reporter: Pavel
>
> When trying to deploy tapestry app using tomcat 7 parallel deployment (which 
> demands to name app dir like myapp##version) there is an 
> FileNotFoundException when loading AppModule file. The reason is, that path 
> to app dir gets urlencoded whith those ## looking like %23%23. 
> In PlasticInternalUtils there is already code dealing with urlencoded spaces
> private static InputStream getStreamForPath(
> if (url.getProtocol().equals("file"))
> {
> String urlPath = url.getPath();
> String decoded = urlPath.replaceAll("%20", " ");
> return new FileInputStream(new File(decoded));
> }
> could it be extended (or better generalised) to handle all urlencoded 
> problems? I think it is really easy to fix and is very annoying not being 
> able to use parallel deployment. I could even provide a patch if you think 
> this issue is worth fixing. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Comment Edited] (TAP5-2067) Error loading classes with Tomcat 7 parallel deployment

2013-02-10 Thread Pavel (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-2067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13575407#comment-13575407
 ] 

Pavel edited comment on TAP5-2067 at 2/10/13 10:01 AM:
---

I have Debian 5.0 (x32) with Tomcat 7.0.33. Tapestry 5.3.6, application is 
deployed to root context as ROOT##version folder

  was (Author: rodimusprime):
I have Debian 5.0 (x32) with Tomcat 7.0.33
  
> Error loading classes with Tomcat 7 parallel deployment
> ---
>
> Key: TAP5-2067
> URL: https://issues.apache.org/jira/browse/TAP5-2067
> Project: Tapestry 5
>  Issue Type: Improvement
>Affects Versions: 5.3.6
>Reporter: Pavel
>
> When trying to deploy tapestry app using tomcat 7 parallel deployment (which 
> demands to name app dir like myapp##version) there is an 
> FileNotFoundException when loading AppModule file. The reason is, that path 
> to app dir gets urlencoded whith those ## looking like %23%23. 
> In PlasticInternalUtils there is already code dealing with urlencoded spaces
> private static InputStream getStreamForPath(
> if (url.getProtocol().equals("file"))
> {
> String urlPath = url.getPath();
> String decoded = urlPath.replaceAll("%20", " ");
> return new FileInputStream(new File(decoded));
> }
> could it be extended (or better generalised) to handle all urlencoded 
> problems? I think it is really easy to fix and is very annoying not being 
> able to use parallel deployment. I could even provide a patch if you think 
> this issue is worth fixing. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (TAP5-2067) Error loading classes with Tomcat 7 parallel deployment

2013-02-10 Thread Pavel (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-2067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13575407#comment-13575407
 ] 

Pavel commented on TAP5-2067:
-

I have Debian 5.0 (x32) with Tomcat 7.0.33

> Error loading classes with Tomcat 7 parallel deployment
> ---
>
> Key: TAP5-2067
> URL: https://issues.apache.org/jira/browse/TAP5-2067
> Project: Tapestry 5
>  Issue Type: Improvement
>Affects Versions: 5.3.6
>Reporter: Pavel
>
> When trying to deploy tapestry app using tomcat 7 parallel deployment (which 
> demands to name app dir like myapp##version) there is an 
> FileNotFoundException when loading AppModule file. The reason is, that path 
> to app dir gets urlencoded whith those ## looking like %23%23. 
> In PlasticInternalUtils there is already code dealing with urlencoded spaces
> private static InputStream getStreamForPath(
> if (url.getProtocol().equals("file"))
> {
> String urlPath = url.getPath();
> String decoded = urlPath.replaceAll("%20", " ");
> return new FileInputStream(new File(decoded));
> }
> could it be extended (or better generalised) to handle all urlencoded 
> problems? I think it is really easy to fix and is very annoying not being 
> able to use parallel deployment. I could even provide a patch if you think 
> this issue is worth fixing. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira