[jira] [Closed] (TAP5-2150) dom.triggerReflow() returns a function that triggers a reflow event instead of triggering the event itself

2013-10-14 Thread Jochen Kemnade (JIRA)

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

Jochen Kemnade closed TAP5-2150.


Resolution: Invalid

Obsolete as of 5140d1b4f9c51ef170c2550b2d3811a7e8f29707.

 dom.triggerReflow() returns a function that triggers a reflow event instead 
 of triggering the event itself
 --

 Key: TAP5-2150
 URL: https://issues.apache.org/jira/browse/TAP5-2150
 Project: Tapestry 5
  Issue Type: Bug
  Components: tapestry-core
Affects Versions: 5.4
Reporter: Jochen Kemnade
  Labels: javascript, patch, regression

 the dom.triggerReflow function should trigger reflow event, instead it 
 returns a function.
 The problem was introduced in 430b1a7a34a9f2d00e82c5c41c6ac7dbcfdbf3b2



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[CONF] Apache Tapestry Component Events

2013-10-14 Thread Bob Harner (Confluence)







Component Events
Page edited by Bob Harner


Comment:
"then then" fixed per M. MGelbana


 Changes (1)
 




...
In the above example, the navigational response is the page itself.  
If there is no exception event handler, or the exception event handler returns null (or is void), then then the exception will be passed to the [RequestExceptionHandler|http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/RequestExceptionHandler.html] service, which (in default configuration) will be render the exception page. 


Full Content

Component Events


Related Articles


 Page:
 Request Processing





 Page:
 Component Events





 Page:
 Component Rendering





 Page:
 Page Life Cycle





 Page:
 Page Navigation





 Page:
 Component Events FAQ






Component events are Tapestry's way of conveying a user's interactions with the web page, such as clicking links and submitting forms, to designated methods in your page and component classes.  When a component event occurs, Tapestry calls the event handler method you've provided, if any, in the containing component's class.

Let's review a simple example. Here's a portion of the template for a page (let's call it "Chooser") that lets the user choose a number between 1 and 10:



p Choose a number from 1 to 10:

t:count end="10" value="index"
a t:id="select" t:type="actionlink" context="index"${index}/t:comp
/t:count
/p



Notice that Chooser.tml contains an ActionLink component. When rendered on the page, the ActionLink component creates a component event request URL, with the event type set to "action". In this case the URL might look like http://localhost:8080/chooser.select/3

This URL identifies the page that contains the component ("chooser"), the type of event (unless it is "action", the default and most common event type), the id of the component within the page ("select"), plus the additional context value ("3"). Additional context values, if any, are appended to the path.

There's no direct mapping from URL to a piece of code. Instead, when the user clicks on the link, the ActionLink component emits events. And then Tapestry ensures that the correct bit of code (your event handler method, see below) gets invoked for those events.

This demonstrates a critical difference between Tapestry and a more traditional, action oriented framework. The URL doesn't say what happens when the link is clicked, it identifies which component is responsible when the link is clicked.

Often, a navigation request (originating with the user) will spawn a number of flow-of-control requests. For example, an action event will trigger a form component, which will then emit notification events to announce when the form submission is about to be processed, and whether it was successful or not, and those event could be further handled by the page component.

Event Handler Methods

When a component event occurs, Tapestry invokes any event handler methods that you have identified for that event. You can identify your event handler methods via a naming convention (see Method Naming Convention below), or via the @OnEvent annotation.



  @OnEvent(component = "select")
  void valueChosen(int value)
  {
this.value = value;
  }



Tapestry does two things here:


	Because of the annotation, it identifies method valueChosen() as the method to invoke.
	When the link is clicked, it converts the context value from a string to an integer and passes it into the method.





Added in 5.3

Starting in release 5.3, Tapestry will validate that the component, if any, identified for the event handler method actually exists in the containing component's template. This helps with typos in annotations (or in the naming conventions identified below).


In the above example, the valueChosen() method will be invoked when the default 

svn commit: r882514 - in /websites/production/tapestry/content: cache/main.pageCache component-events.html

2013-10-14 Thread buildbot
Author: buildbot
Date: Mon Oct 14 11:20:37 2013
New Revision: 882514

Log:
Production update by buildbot for tapestry

Modified:
websites/production/tapestry/content/cache/main.pageCache
websites/production/tapestry/content/component-events.html

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

Modified: websites/production/tapestry/content/component-events.html
==
--- websites/production/tapestry/content/component-events.html (original)
+++ websites/production/tapestry/content/component-events.html Mon Oct 14 
11:20:37 2013
@@ -76,10 +76,6 @@
 
 /td/trtrtd colspan=1 
rowspan=1
  span class=icon icon-page 
title=PagePage:/span
- a shape=rect 
href=component-events.htmlComponent Events/a
-
-/td/trtrtd colspan=1 
rowspan=1
- span class=icon icon-page 
title=PagePage:/span
  a shape=rect 
href=component-rendering.htmlComponent Rendering/a
 
 /td/trtrtd colspan=1 
rowspan=1
@@ -94,6 +90,10 @@
  span class=icon icon-page 
title=PagePage:/span
  a shape=rect 
href=component-events-faq.htmlComponent Events FAQ/a
 
+/td/trtrtd colspan=1 
rowspan=1
+ span class=icon icon-page 
title=PagePage:/span
+ a shape=rect 
href=component-events.htmlComponent Events/a
+
 /td/tr/table
 /div
 
@@ -323,7 +323,7 @@
 
 pIn the above example, the navigational response is the page itself./p
 
-pIf there is no exception event handler, or the exception event handler 
returns null (or is void), then then the exception will be passed to the a 
shape=rect class=external-link 
href=http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/RequestExceptionHandler.html;RequestExceptionHandler/a
 service, which (in default configuration) will be render the exception 
page./p
+pIf there is no exception event handler, or the exception event handler 
returns null (or is void), then the exception will be passed to the a 
shape=rect class=external-link 
href=http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/RequestExceptionHandler.html;RequestExceptionHandler/a
 service, which (in default configuration) will be render the exception 
page./p
 /div
 /div
 




[CONF] Apache Tapestry Component Events

2013-10-14 Thread Bob Harner (Confluence)







Component Events
Page edited by Bob Harner


Comment:
Another typo


 Changes (1)
 




...
In the above example, the navigational response is the page itself.  
If there is no exception event handler, or the exception event handler returns null (or is void), then the exception will be passed to the [RequestExceptionHandler|http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/RequestExceptionHandler.html] service, which (in default configuration) will be render the exception page. 


Full Content

Component Events


Related Articles


 Page:
 Request Processing





 Page:
 Component Rendering





 Page:
 Page Life Cycle





 Page:
 Page Navigation





 Page:
 Component Events FAQ





 Page:
 Component Events






Component events are Tapestry's way of conveying a user's interactions with the web page, such as clicking links and submitting forms, to designated methods in your page and component classes.  When a component event occurs, Tapestry calls the event handler method you've provided, if any, in the containing component's class.

Let's review a simple example. Here's a portion of the template for a page (let's call it "Chooser") that lets the user choose a number between 1 and 10:



p Choose a number from 1 to 10:

t:count end="10" value="index"
a t:id="select" t:type="actionlink" context="index"${index}/t:comp
/t:count
/p



Notice that Chooser.tml contains an ActionLink component. When rendered on the page, the ActionLink component creates a component event request URL, with the event type set to "action". In this case the URL might look like http://localhost:8080/chooser.select/3

This URL identifies the page that contains the component ("chooser"), the type of event (unless it is "action", the default and most common event type), the id of the component within the page ("select"), plus the additional context value ("3"). Additional context values, if any, are appended to the path.

There's no direct mapping from URL to a piece of code. Instead, when the user clicks on the link, the ActionLink component emits events. And then Tapestry ensures that the correct bit of code (your event handler method, see below) gets invoked for those events.

This demonstrates a critical difference between Tapestry and a more traditional, action oriented framework. The URL doesn't say what happens when the link is clicked, it identifies which component is responsible when the link is clicked.

Often, a navigation request (originating with the user) will spawn a number of flow-of-control requests. For example, an action event will trigger a form component, which will then emit notification events to announce when the form submission is about to be processed, and whether it was successful or not, and those event could be further handled by the page component.

Event Handler Methods

When a component event occurs, Tapestry invokes any event handler methods that you have identified for that event. You can identify your event handler methods via a naming convention (see Method Naming Convention below), or via the @OnEvent annotation.



  @OnEvent(component = "select")
  void valueChosen(int value)
  {
this.value = value;
  }



Tapestry does two things here:


	Because of the annotation, it identifies method valueChosen() as the method to invoke.
	When the link is clicked, it converts the context value from a string to an integer and passes it into the method.





Added in 5.3

Starting in release 5.3, Tapestry will validate that the component, if any, identified for the event handler method actually exists in the containing component's template. This helps with typos in annotations (or in the naming conventions identified below).


In the above example, the valueChosen() method will be invoked when the default event, "action", occurs 

[CONF] Apache Tapestry Component Events FAQ

2013-10-14 Thread Bob Harner (Confluence)







Component Events FAQ
Page edited by Bob Harner


Comment:
"redirect-after-post" renamed to Post/Redirect/Get


 Changes (1)
 




...
h3. Why does Tapestry send a redirect after a form is submitted?  
This is an extension of the [redirect after post|http://en.wikipedia.org/wiki/Post/Redirect/Get] [Post/Redirect/Get|http://en.wikipedia.org/wiki/Post/Redirect/Get] approach. It ensures that after an operation that updates server-side state, such as a form submission, if the user resubmits the resulting page, the operation is *not* performed a second time; instead just the results of the operation, reflecting the changed server-side state, is re-rendered. 
 This has the unwanted requirement that any data needed to render the response must persist between the event request (the form submission) and the render request; this often means that fields must be annotated with @[Persist|http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Persist.html]. 
...


Full Content

Link Components FAQFrequently Asked Questions_javascript_ FAQ 

Component Events 

Why does Tapestry send a redirect after a form is submitted?

This is an extension of the Post/Redirect/Get approach. It ensures that after an operation that updates server-side state, such as a form submission, if the user resubmits the resulting page, the operation is not performed a second time; instead just the results of the operation, reflecting the changed server-side state, is re-rendered.

This has the unwanted requirement that any data needed to render the response must persist between the event request (the form submission) and the render request; this often means that fields must be annotated with @Persist.



Added in 5.2

If you want to short-circuit this behavior and render a response directly, your component event handle method may return an instance of StreamPageContent. Tapestry will render the page as part of the event request and stream its content back to the client web browser, rather than sending the normal redirect.




Added in 5.4

Starting in release 5.4, Forms (by default) will NOT redirect after post if there are validation errors. This makes it possible to re-render the page, with error decorations, without requiring that the validation errors be stored in the session between requests ... and that means that the application can remain stateless much longer.


I specified a zone in my ActionLink/EventLink, so why doesn't my event fire via ajax (request.isXHR() is false)?

Check your browser's _javascript_ console for errors. It's likely that a _javascript_ error has prevented Tapestry from transforming your ActionLink/EventLink from a page render action to an ajax action.

Link Components FAQFrequently Asked Questions_javascript_ FAQ



Stop watching space
|
Change email notification preferences

View Online
|
View Changes









svn commit: r882526 - in /websites/production/tapestry/content: cache/main.pageCache component-events-faq.html component-events.html implementing-the-hi-lo-guessing-game.html

2013-10-14 Thread buildbot
Author: buildbot
Date: Mon Oct 14 12:20:40 2013
New Revision: 882526

Log:
Production update by buildbot for tapestry

Modified:
websites/production/tapestry/content/cache/main.pageCache
websites/production/tapestry/content/component-events-faq.html
websites/production/tapestry/content/component-events.html

websites/production/tapestry/content/implementing-the-hi-lo-guessing-game.html

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

Modified: websites/production/tapestry/content/component-events-faq.html
==
--- websites/production/tapestry/content/component-events-faq.html (original)
+++ websites/production/tapestry/content/component-events-faq.html Mon Oct 14 
12:20:40 2013
@@ -73,7 +73,7 @@ table.ScrollbarTable td.ScrollbarNextIco
 
 h3a shape=rect 
name=ComponentEventsFAQ-WhydoesTapestrysendaredirectafteraformissubmitted%3F/aWhy
 does Tapestry send a redirect after a form is submitted?/h3
 
-pThis is an extension of the a shape=rect class=external-link 
href=http://en.wikipedia.org/wiki/Post/Redirect/Get; redirect after post/a 
approach. It ensures that after an operation that updates server-side state, 
such as a form submission, if the user resubmits the resulting page, the 
operation is bnot/b performed a second time; instead just the results of 
the operation, reflecting the changed server-side state, is re-rendered./p
+pThis is an extension of the a shape=rect class=external-link 
href=http://en.wikipedia.org/wiki/Post/Redirect/Get; Post/Redirect/Get/a 
approach. It ensures that after an operation that updates server-side state, 
such as a form submission, if the user resubmits the resulting page, the 
operation is bnot/b performed a second time; instead just the results of 
the operation, reflecting the changed server-side state, is re-rendered./p
 
 pThis has the unwanted requirement that any data needed to render the 
response must persist between the event request (the form submission) and the 
render request; this often means that fields must be annotated with @a 
shape=rect class=external-link 
href=http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Persist.html;Persist/a./p
 

Modified: websites/production/tapestry/content/component-events.html
==
--- websites/production/tapestry/content/component-events.html (original)
+++ websites/production/tapestry/content/component-events.html Mon Oct 14 
12:20:40 2013
@@ -88,11 +88,11 @@
 
 /td/trtrtd colspan=1 
rowspan=1
  span class=icon icon-page 
title=PagePage:/span
- a shape=rect 
href=component-events-faq.htmlComponent Events FAQ/a
+ a shape=rect 
href=component-events.htmlComponent Events/a
 
 /td/trtrtd colspan=1 
rowspan=1
  span class=icon icon-page 
title=PagePage:/span
- a shape=rect 
href=component-events.htmlComponent Events/a
+ a shape=rect 
href=component-events-faq.htmlComponent Events FAQ/a
 
 /td/tr/table
 /div
@@ -323,7 +323,7 @@
 
 pIn the above example, the navigational response is the page itself./p
 
-pIf there is no exception event handler, or the exception event handler 
returns null (or is void), then the exception will be passed to the a 
shape=rect class=external-link 
href=http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/RequestExceptionHandler.html;RequestExceptionHandler/a
 service, which (in default configuration) will be render the exception 
page./p
+pIf there is no exception event handler, or the exception event handler 
returns null (or is void), then the exception will be passed to the a 
shape=rect class=external-link 
href=http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/RequestExceptionHandler.html;RequestExceptionHandler/a
 service, which (in the default configuration) will render the exception 
page./p
 /div
 /div
 

Modified: 
websites/production/tapestry/content/implementing-the-hi-lo-guessing-game.html
==
--- 
websites/production/tapestry/content/implementing-the-hi-lo-guessing-game.html 
(original)
+++ 
websites/production/tapestry/content/implementing-the-hi-lo-guessing-game.html 
Mon Oct 14 12:20:40 2013
@@ -174,7 +174,7 @@ public class Index
 
 pNote that the event handler method does not have to be public; it can be 
protected, private, or package private (as in this example). By convention, 
such methods are package private, if for no other 

[CONF] Apache Tapestry Component Rendering

2013-10-14 Thread Bob Harner (Confluence)







Component Rendering
Page edited by Bob Harner


Comment:
Added table of render phases


 Changes (3)
 




...
These methods are *optional*, a default behavior is associated with each phase.  
The large number of phases reflects the use of [component mixins|Component Mixins] which also plug into the render phases. Several of the phases exist almost exclusively for mixins. 
|| Annotation || Method Name || When Called | | | *[@SetupRender|http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/SetupRender.html]* | setupRender()  | When initial setup actions, if any, are needed | | *[@BeginRender|http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/BeginRender]* | beginRender() | When Tapestry is ready for the components start tag, if any, to be rendered | | [@BeforeRenderTemplate|http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/BeforeRenderTemplate] | beforeRenderTemplate() | Before Tapestry renders the components template, if any | | [@BeforeRenderBody|http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/BeforeRenderBody] | beforeRenderBody() | Before Tapestry renders the body of the component, if any | | [@AfterRenderBody|http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/AfterRenderBody] | afterRenderBody() | After Tapestry renders the body of the component, if any, but before the rest of the components template is rendered | | [@AfterRenderTemplate|http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/AfterRenderTemplate] | afterRenderTemplate() | After Tapestry finishes rendering the components template, if any | | *[@AfterRender|http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/AfterRender]* | afterRender() | After Tapestry has finished rendering both the template and body of the component | | *[@CleanupRender|http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/CleanupRender]* | cleanupRender() | When final cleanup actions, if any, are needed | 
 
The large number of phases reflects the need for precise control of components from [component mixins|Component Mixins]. Several of the phases exist almost exclusively for mixins.  
Generally, your code will use the SetupRender, BeginRender, AfterRender and CleanupRender phases ... often just one or two of those.  
...


Full Content

Component Rendering


Related Articles


 Page:
 Request Processing





 Page:
 Component Rendering





 Page:
 Content Type and Markup





 Page:
 Page Life Cycle





 Page:
 Page Navigation





 Page:
 Component Events





 Page:
 Component Events FAQ




 

Rendering of components in Tapestry 5 is based on a state machine and a queue (instead of the tail recursion used in Tapestry 4). This breaks the rendering process up into tiny pieces that can easily be implemented or overridden. Don't worry, in practice, writing components requires a breathtakingly small amount of code.

Rendering Phases

The rendering of each component is divided into a number of phases, illustrated below.



Each of the orange phases (SetupRender, BeginRender, BeforeRenderBody, etc.) corresponds to an annotation you may place on one or more methods of your class. The annotation directs Tapestry to invoke your method as part of that phase.

Methods marked with these annotations are called render phase methods.

Your methods may be void, or return a boolean value. Returning a value can force phases to be skipped, or even be re-visited. In the diagram, solid lines show the normal processing path. Dashed lines are alternate 

svn commit: r882531 - in /websites/production/tapestry/content: cache/main.pageCache component-rendering.html

2013-10-14 Thread buildbot
Author: buildbot
Date: Mon Oct 14 13:20:36 2013
New Revision: 882531

Log:
Production update by buildbot for tapestry

Modified:
websites/production/tapestry/content/cache/main.pageCache
websites/production/tapestry/content/component-rendering.html

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

Modified: websites/production/tapestry/content/component-rendering.html
==
--- websites/production/tapestry/content/component-rendering.html (original)
+++ websites/production/tapestry/content/component-rendering.html Mon Oct 14 
13:20:36 2013
@@ -75,27 +75,27 @@
 
 /td/trtrtd colspan=1 
rowspan=1
  span class=icon icon-page 
title=PagePage:/span
- a shape=rect 
href=component-events.htmlComponent Events/a
+ a shape=rect 
href=content-type-and-markup.htmlContent Type and Markup/a
 
 /td/trtrtd colspan=1 
rowspan=1
  span class=icon icon-page 
title=PagePage:/span
- a shape=rect 
href=component-rendering.htmlComponent Rendering/a
+ a shape=rect href=page-life-cycle.htmlPage Life 
Cycle/a
 
 /td/trtrtd colspan=1 
rowspan=1
  span class=icon icon-page 
title=PagePage:/span
- a shape=rect 
href=content-type-and-markup.htmlContent Type and Markup/a
+ a shape=rect href=page-navigation.htmlPage 
Navigation/a
 
 /td/trtrtd colspan=1 
rowspan=1
  span class=icon icon-page 
title=PagePage:/span
- a shape=rect href=page-life-cycle.htmlPage Life 
Cycle/a
+ a shape=rect 
href=component-events.htmlComponent Events/a
 
 /td/trtrtd colspan=1 
rowspan=1
  span class=icon icon-page 
title=PagePage:/span
- a shape=rect href=page-navigation.htmlPage 
Navigation/a
+ a shape=rect 
href=component-events-faq.htmlComponent Events FAQ/a
 
 /td/trtrtd colspan=1 
rowspan=1
  span class=icon icon-page 
title=PagePage:/span
- a shape=rect 
href=component-events-faq.htmlComponent Events FAQ/a
+ a shape=rect 
href=component-rendering.htmlComponent Rendering/a
 
 /td/tr/table
 /div 
@@ -118,7 +118,12 @@ Each of the orange phases (SetupRender, 
 
 pThese methods are boptional/b, a default behavior is associated with 
each phase./p
 
-pThe large number of phases reflects the use of a shape=rect 
href=component-mixins.html title=Component Mixinscomponent mixins/a 
which also plug into the render phases. Several of the phases exist almost 
exclusively for mixins./p
+div class=table-wrap
+table class=confluenceTabletbodytrth colspan=1 rowspan=1 
class=confluenceTh Annotation /thth colspan=1 rowspan=1 
class=confluenceTh Method Name /thth colspan=1 rowspan=1 
class=confluenceTh When Called /thtd colspan=1 rowspan=1 
class=confluenceTd#160;/td/trtrtd colspan=1 rowspan=1 
class=confluenceTd ba shape=rect class=external-link 
href=http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/SetupRender.html;@SetupRender/a/b
 /tdtd colspan=1 rowspan=1 class=confluenceTd setupRender()  /tdtd 
colspan=1 rowspan=1 class=confluenceTd When initial setup actions, if 
any, are needed /td/trtrtd colspan=1 rowspan=1 class=confluenceTd 
ba shape=rect class=external-link 
href=http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/BeginRender;@BeginRender/a/b
 /tdtd colspan=1 rowspan=1 class=confluenceTd beginRender() /tdtd 
col
 span=1 rowspan=1 class=confluenceTd When Tapestry is ready for the 
component's start tag, if any, to be rendered /td/trtrtd colspan=1 
rowspan=1 class=confluenceTd a shape=rect class=external-link 
href=http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/BeforeRenderTemplate;@BeforeRenderTemplate/a
 /tdtd colspan=1 rowspan=1 class=confluenceTd beforeRenderTemplate() 
/tdtd colspan=1 rowspan=1 class=confluenceTd Before Tapestry renders 
the component's template, if any /td/trtrtd colspan=1 rowspan=1 
class=confluenceTd a shape=rect class=external-link 
href=http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/BeforeRenderBody;@BeforeRenderBody/a
 /tdtd colspan=1 rowspan=1 class=confluenceTd beforeRenderBody() 
/tdtd 

[CONF] Apache Tapestry Component Rendering

2013-10-14 Thread Bob Harner (Confluence)







Component Rendering
Page edited by Bob Harner


Comment:
A clarification on how often SetupRender methods are called


 Changes (4)
 




...
Render phase methods may take no parameters, or may take a parameter of type [MarkupWriter|DOM]. The methods can have any visibility you like ... typically, package private is used, as this visibility makes it possible to unit test your code (from within the same Java package) without making the methods part of the components _public_ API.  
These methods are *optional*, a default behavior is associated with each phase. 
All Render phase methods are _optional_; a default behavior is associated with each phase. 
 
|| Annotation || Method Name || When Called || 
| *[@SetupRender|http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/SetupRender.html]* | setupRender()  | When initial setup actions, if any, are needed | | *[@BeginRender|http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/BeginRender]* | beginRender() | When Tapestry is ready for the components start tag, if any, to be rendered | 
...
Generally, your code will use the SetupRender, BeginRender, AfterRender and CleanupRender phases ... often just one or two of those.  
h2. An Example  
Heres the source for a looping component that counts up or down between two values, renders its body a number of times, and stores the current index value in a parameter:  
...
Whats really mind blowing is that the template and body of a component will often contain ... more components! That means that many different components will be in different phases of their own state machine.  
h2. Render Phases in Detail   {float:right|background="" {note} The SetupRender phase, like all render phases, occurs once for each rendering of the component. If the component is inside a looping component ([Loop|http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Loop.html], [Grid|http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Grid.html], etc.), then the SetupRender method will be called once for _each_ iteration of the loop. {note} {float}  
h3. SetupRender  
...


Full Content

Component Rendering


Related Articles


 Page:
 Request Processing





 Page:
 Content Type and Markup





 Page:
 Page Life Cycle





 Page:
 Page Navigation





 Page:
 Component Events





 Page:
 Component Events FAQ





 Page:
 Component Rendering




 

Rendering of components in Tapestry 5 is based on a state machine and a queue (instead of the tail recursion used in Tapestry 4). This breaks the rendering process up into tiny pieces that can easily be implemented or overridden. Don't worry, in practice, writing components requires a breathtakingly small amount of code.

Rendering Phases

The rendering of each component is divided into a number of phases, illustrated below.



Each of the orange phases (SetupRender, BeginRender, BeforeRenderBody, etc.) corresponds to an annotation you may place on one or more methods of your class. The annotation directs Tapestry to invoke your method as part of that phase.

Methods marked with these annotations are called render phase methods.

Your methods may be void, or return a boolean value. Returning a value can force phases to be skipped, or even be re-visited. In the diagram, solid lines show the normal processing path. Dashed lines are alternate flows that are triggered when your render phase methods return false instead of true (or void).

Render phase methods may take 

svn commit: r882543 - in /websites/production/tapestry/content: cache/main.pageCache component-rendering.html

2013-10-14 Thread buildbot
Author: buildbot
Date: Mon Oct 14 14:20:35 2013
New Revision: 882543

Log:
Production update by buildbot for tapestry

Modified:
websites/production/tapestry/content/cache/main.pageCache
websites/production/tapestry/content/component-rendering.html

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

Modified: websites/production/tapestry/content/component-rendering.html
==
--- websites/production/tapestry/content/component-rendering.html (original)
+++ websites/production/tapestry/content/component-rendering.html Mon Oct 14 
14:20:35 2013
@@ -116,10 +116,10 @@ Each of the orange phases (SetupRender, 
 
 pRender phase methods may take no parameters, or may take a parameter of 
type a shape=rect href=dom.html title=DOMMarkupWriter/a. The methods 
can have any visibility you like ... typically, package private is used, as 
this visibility makes it possible to unit test your code (from within the same 
Java package) without making the methods part of the component's 
empublic/em API./p
 
-pThese methods are boptional/b, a default behavior is associated with 
each phase./p
+pAll Render phase methods are emoptional/em; a default behavior is 
associated with each phase./p
 
 div class=table-wrap
-table class=confluenceTabletbodytrth colspan=1 rowspan=1 
class=confluenceTh Annotation /thth colspan=1 rowspan=1 
class=confluenceTh Method Name /thth colspan=1 rowspan=1 
class=confluenceTh When Called /thtd colspan=1 rowspan=1 
class=confluenceTd#160;/td/trtrtd colspan=1 rowspan=1 
class=confluenceTd ba shape=rect class=external-link 
href=http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/SetupRender.html;@SetupRender/a/b
 /tdtd colspan=1 rowspan=1 class=confluenceTd setupRender()  /tdtd 
colspan=1 rowspan=1 class=confluenceTd When initial setup actions, if 
any, are needed /td/trtrtd colspan=1 rowspan=1 class=confluenceTd 
ba shape=rect class=external-link 
href=http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/BeginRender;@BeginRender/a/b
 /tdtd colspan=1 rowspan=1 class=confluenceTd beginRender() /tdtd 
col
 span=1 rowspan=1 class=confluenceTd When Tapestry is ready for the 
component's start tag, if any, to be rendered /td/trtrtd colspan=1 
rowspan=1 class=confluenceTd a shape=rect class=external-link 
href=http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/BeforeRenderTemplate;@BeforeRenderTemplate/a
 /tdtd colspan=1 rowspan=1 class=confluenceTd beforeRenderTemplate() 
/tdtd colspan=1 rowspan=1 class=confluenceTd Before Tapestry renders 
the component's template, if any /td/trtrtd colspan=1 rowspan=1 
class=confluenceTd a shape=rect class=external-link 
href=http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/BeforeRenderBody;@BeforeRenderBody/a
 /tdtd colspan=1 rowspan=1 class=confluenceTd beforeRenderBody() 
/tdtd colspan=1 rowspan=1 class=confluenceTd Before Tapestry renders 
the body of the component, if any /td/trtrtd colspan=1 rowspan=1 cl
 ass=confluenceTd a shape=rect class=external-link 
href=http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/AfterRenderBody;@AfterRenderBody/a
 /tdtd colspan=1 rowspan=1 class=confluenceTd afterRenderBody() 
/tdtd colspan=1 rowspan=1 class=confluenceTd After Tapestry renders 
the body of the component, if any, but before the rest of the component's 
template is rendered /td/trtrtd colspan=1 rowspan=1 
class=confluenceTd a shape=rect class=external-link 
href=http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/AfterRenderTemplate;@AfterRenderTemplate/a
 /tdtd colspan=1 rowspan=1 class=confluenceTd afterRenderTemplate() 
/tdtd colspan=1 rowspan=1 class=confluenceTd After Tapestry finishes 
rendering the component's template, if any /td/trtrtd colspan=1 
rowspan=1 class=confluenceTd ba shape=rect class=external-link 
href=http://tapestry.apache.org/curren
 t/apidocs/org/apache/tapestry5/annotations/AfterRender@AfterRender/a/b 
/tdtd colspan=1 rowspan=1 class=confluenceTd afterRender() /tdtd 
colspan=1 rowspan=1 class=confluenceTd After Tapestry has finished 
rendering both the template and body of the component /td/trtrtd 
colspan=1 rowspan=1 class=confluenceTd ba shape=rect 
class=external-link 
href=http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/CleanupRender;@CleanupRender/a/b
 /tdtd colspan=1 rowspan=1 class=confluenceTd cleanupRender() 
/tdtd colspan=1 rowspan=1 class=confluenceTd When final cleanup 
actions, if any, are needed /td/tr/tbody/table
+table class=confluenceTabletbodytrth colspan=1 rowspan=1 
class=confluenceTh Annotation /thth colspan=1 rowspan=1 
class=confluenceTh Method Name /thth colspan=1 rowspan=1 
class=confluenceTh When Called /th/trtrtd colspan=1 rowspan=1 

[jira] [Assigned] (TAP5-2202) ElementWrapper:attr() should remove an element when setting its value to null

2013-10-14 Thread Howard M. Lewis Ship (JIRA)

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

Howard M. Lewis Ship reassigned TAP5-2202:
--

Assignee: Howard M. Lewis Ship

 ElementWrapper:attr() should remove an element when setting its value to null
 -

 Key: TAP5-2202
 URL: https://issues.apache.org/jira/browse/TAP5-2202
 Project: Tapestry 5
  Issue Type: Improvement
  Components: tapestry-core
Affects Versions: 5.4
Reporter: Howard M. Lewis Ship
Assignee: Howard M. Lewis Ship
Priority: Minor
  Labels: client-javascript

 Currently, there is not a way to remove an attribute from an element; just 
 query and set its value.
 Setting the value to null or undefined should remove the attribute.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Updated] (TAP5-2202) t5/core/dom:ElementWrapper.attr() should remove an element when setting its value to null

2013-10-14 Thread Howard M. Lewis Ship (JIRA)

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

Howard M. Lewis Ship updated TAP5-2202:
---

Labels: client-javascript  (was: client-javasc)

 t5/core/dom:ElementWrapper.attr() should remove an element when setting its 
 value to null
 -

 Key: TAP5-2202
 URL: https://issues.apache.org/jira/browse/TAP5-2202
 Project: Tapestry 5
  Issue Type: Improvement
  Components: tapestry-core
Affects Versions: 5.4
Reporter: Howard M. Lewis Ship
Assignee: Howard M. Lewis Ship
Priority: Minor
  Labels: client-javascript

 Currently, there is not a way to remove an attribute from an element; just 
 query and set its value.
 Setting the value to null or undefined should remove the attribute.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Created] (TAP5-2202) ElementWrapper:attr() should remove an element when setting its value to null

2013-10-14 Thread Howard M. Lewis Ship (JIRA)
Howard M. Lewis Ship created TAP5-2202:
--

 Summary: ElementWrapper:attr() should remove an element when 
setting its value to null
 Key: TAP5-2202
 URL: https://issues.apache.org/jira/browse/TAP5-2202
 Project: Tapestry 5
  Issue Type: Improvement
  Components: tapestry-core
Affects Versions: 5.4
Reporter: Howard M. Lewis Ship
Priority: Minor


Currently, there is not a way to remove an attribute from an element; just 
query and set its value.

Setting the value to null or undefined should remove the attribute.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[CONF] Apache Tapestry Default Parameter

2013-10-14 Thread Bob Harner (Confluence)







Default Parameter
Page edited by Bob Harner


Comment:
Reordered to define "autoconnect" before using the term.


 Changes (3)
 




...
{code}  
Every component has a unique id; if you dont assign one with the {{t:id}} attribute, Tapestry will assign a less meaningful one. Component ids can end up inside URLs or used as query parameter names, so using meaningful ids helps if you are ever stuck debugging a request. The most common case of using autoconnect is form control components such as TextField and friends ... or this RichTextEditor. 
 
This repetition can be avoided by adding the _autoconnect_ attribute to the @Parameter annotation: 
 {code:java} 
...
{code}  
This can now be written as {{t:richtexteditor t:id=profile/}}. The unwanted repetition is gone: we set the id of the component and the property it edits in a single pass. 
 If there is no matching property, then a runtime exception will be thrown when loading the page because the value parameter is required and not bound. 
 The most common case of using autoconnect is form control components such as TextField and friends ... or this RichTextEditor. 


Full Content

CookbookOverriding Exception Reporting


Default Parameter


Related Articles


 Page:
 Supporting Informal Parameters





 Page:
 Enum Parameter Recipe





 Page:
 Default Parameter





 Page:
 Component Parameters






Many of the components provided with Tapestry share a common behavior: if the component's id matches a property of the container, then some parameter of the component (usually value) defaults to that property.

This is desirable, in terms of not having to specify the component's id and then specify the same value as some other parameter.

Let's say you have created a component, RichTextEditor, which operates like a normal TextArea component, but provides a _javascript_ rich text editor.  You might start with something like:



public class RichTextEditor implements Field
{
  @Property
  @Parameter(required=true)
  private String value;

  . . . // Lots more code not shown here
}



However, the weakness here is when you make use of the component. You template may look like:



t:label for=""/
br/
t:richtexteditor t:id="profile" value="profile"/



Every component has a unique id; if you don't assign one with the t:id attribute, Tapestry will assign a less meaningful one. Component ids can end up inside URLs or used as query parameter names, so using meaningful ids helps if you are ever stuck debugging a request.

This repetition can be avoided by adding the autoconnect attribute to the @Parameter annotation:



  @Property
  @Parameter(required=true, autoconnect=true)
  private String value;



This can now be written as t:richtexteditor t:id="profile"/. The unwanted repetition is gone: we set the id of the component and the property it edits in a single pass.

If there is no matching property, then a runtime exception will be thrown when loading the page because the value parameter is required and not bound.

The most common case of using autoconnect is form control components such as TextField and friends ... or this RichTextEditor.



Stop watching space
|
Change email notification preferences

View Online
|
View Changes









[CONF] Apache Tapestry Confluence Site Setup

2013-10-14 Thread Bob Harner (Confluence)







Confluence Site Setup
Page edited by Bob Harner


Comment:
Minor worsmithing


 Changes (1)
 




...
_For more details see the [SiteExporter README|https://svn.apache.org/repos/asf/tapestry/tapestry-site/trunk/README]._  
SiteExporter is a command-line Java program that is run hourly (currently at 20 minutes after the hour) from Apaches BuildBot. It makes a web service call to Confluence (to its RSS feed, actually) to get a list of each page pages that has have changed since the last run, and the HTML-formatted export of those pages. For each, it post-processes the file (described below). Finally, SiteExporter commits all changed HTML files into Tapestrys part of the Apache Subversion repository, which (nearly instantly) makes it available to the public at http://tapestry.apache.org, and commit emails are sent to Tapestrys commits mailing list. 
 Attachments (to Confluence pages) are exported in roughly the same way. 
...


Full Content


Related Articles


 Page:
 Developer Information





 Page:
 Release Process





 Page:
 Developer Bible





 Page:
 Version Numbers





 Page:
 Building Tapestry from Source





 Page:
 Confluence Site Setup




 

This document describes our web site setup: what is where and how it works.

Overview

Most of the web site and documentation (with the notable exception of the Javadoc API pages) are kept in Confluence.

Since the Confluence instance at https://cwiki.apache.org/confluence/ isn't capable of handling a lot of incoming requests, all wiki spaces are statically exported. The SiteExporter program is responsible for that. Once a page in Confluence changes, that page gets re-exported automatically.

How SiteExporter works

For more details see the SiteExporter README.

SiteExporter is a command-line Java program that is run hourly (currently at 20 minutes after the hour) from Apache's BuildBot. It makes a web service call to Confluence (to its RSS feed, actually) to get a list of pages that have changed since the last run, and the HTML-formatted export of those pages. For each, it post-processes the file (described below). Finally, SiteExporter commits all changed HTML files into Tapestry's part of the Apache Subversion repository, which (nearly instantly) makes it available to the public at http://tapestry.apache.org, and commit emails are sent to Tapestry's "commits" mailing list.

Attachments (to Confluence pages) are exported in roughly the same way.

The time between saving a change in Confluence and seeing the result on the public site is at most 1 hour, depending on when you do it. If you save a change at 19 minutes after the hour you'll see the change in about a minute. If you publish it at 21 minutes after the hour then you'll have to wait almost an hour.




 HTML files in SVN 
 https://svn.apache.org/repos/infra/websites/production/tapestry 


 Cache File 
 https://svn.apache.org/repos/infra/websites/production/tapestry/content/cache/main.pageCache 


 SiteExporter source 
 https://svn.apache.org/repos/asf/tapestry/tapestry-site/trunk 


 Velocity template 
 https://svn.apache.org/repos/asf/tapestry/tapestry-site/trunk/template/template.vm 





Post-processing HTML Pages

HTML pages exported from Confluence are post-processed in several ways before being committed to SVN. Here are just a few of the things going on:


	Tagsoup is used to clean up the HTML.
	The breadcrumb links are updated.
	Empty paragraph (p) tags are removed from the top of the page.
	{code} macro output (code examples) are detected, and SyntaxHighlighter _javascript_ links are added to the page when needed.
	{include} tags (when one Confluence page includes another) are detected, causing the including page to be regenerated autoamtically.
	{children} tags are also detected and handled



Manual Intervention

You can 

svn commit: r882584 - in /websites/production/tapestry/content: cache/main.pageCache confluence-site-setup.html default-parameter.html

2013-10-14 Thread buildbot
Author: buildbot
Date: Mon Oct 14 19:20:44 2013
New Revision: 882584

Log:
Production update by buildbot for tapestry

Modified:
websites/production/tapestry/content/cache/main.pageCache
websites/production/tapestry/content/confluence-site-setup.html
websites/production/tapestry/content/default-parameter.html

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

Modified: websites/production/tapestry/content/confluence-site-setup.html
==
--- websites/production/tapestry/content/confluence-site-setup.html (original)
+++ websites/production/tapestry/content/confluence-site-setup.html Mon Oct 14 
19:20:44 2013
@@ -106,7 +106,7 @@
 
 pemFor more details see the a shape=rect class=external-link 
href=https://svn.apache.org/repos/asf/tapestry/tapestry-site/trunk/README;SiteExporter
 README/a./em/p
 
-pSiteExporter is a command-line Java program that is run hourly (currently 
at 20 minutes after the hour) from Apache's BuildBot. It makes a web service 
call to Confluence (to its RSS feed, actually) to get a list of each page that 
has changed since the last run, and the HTML-formatted export of those pages. 
For each, it post-processes the file (described below). Finally, SiteExporter 
commits all changed HTML files into Tapestry's part of the Apache Subversion 
repository, which (nearly instantly) makes it available to the public at a 
shape=rect class=external-link 
href=http://tapestry.apache.org;http://tapestry.apache.org/a, and commit 
emails are sent to Tapestry's commits mailing list./p
+pSiteExporter is a command-line Java program that is run hourly (currently 
at 20 minutes after the hour) from Apache's BuildBot. It makes a web service 
call to Confluence (to its RSS feed, actually) to get a list of pages that have 
changed since the last run, and the HTML-formatted export of those pages. For 
each, it post-processes the file (described below). Finally, SiteExporter 
commits all changed HTML files into Tapestry's part of the Apache Subversion 
repository, which (nearly instantly) makes it available to the public at a 
shape=rect class=external-link 
href=http://tapestry.apache.org;http://tapestry.apache.org/a, and commit 
emails are sent to Tapestry's commits mailing list./p
 
 pAttachments (to Confluence pages) are exported in roughly the same way./p
 

Modified: websites/production/tapestry/content/default-parameter.html
==
--- websites/production/tapestry/content/default-parameter.html (original)
+++ websites/production/tapestry/content/default-parameter.html Mon Oct 14 
19:20:44 2013
@@ -91,11 +91,11 @@ table.ScrollbarTable td.ScrollbarNextIco
 
 /td/trtrtd colspan=1 
rowspan=1
  span class=icon icon-page 
title=PagePage:/span
- a shape=rect href=default-parameter.htmlDefault 
Parameter/a
+ a shape=rect 
href=component-parameters.htmlComponent Parameters/a
 
 /td/trtrtd colspan=1 
rowspan=1
  span class=icon icon-page 
title=PagePage:/span
- a shape=rect 
href=component-parameters.htmlComponent Parameters/a
+ a shape=rect href=default-parameter.htmlDefault 
Parameter/a
 
 /td/tr/table
 /div
@@ -129,9 +129,9 @@ public class RichTextEditor implements F
 ]]/script
 /div/div
 
-pEvery component has a unique id; if you don't assign one with the 
ttt:id/tt attribute, Tapestry will assign a less meaningful one. Component 
ids can end up inside URLs or used as query parameter names, so using 
meaningful ids helps if you are ever stuck debugging a request. The most common 
case of using autoconnect is form control components such as TextField and 
friends ... or this RichTextEditor./p
+pEvery component has a unique id; if you don't assign one with the 
ttt:id/tt attribute, Tapestry will assign a less meaningful one. Component 
ids can end up inside URLs or used as query parameter names, so using 
meaningful ids helps if you are ever stuck debugging a request./p
 
-pThis repetition can be avoided by adding the autoconnect attribute to the 
@Parameter annotation:/p
+pThis repetition can be avoided by adding the emautoconnect/em attribute 
to the @Parameter annotation:/p
 
 div class=code panel style=border-width: 1px;div class=codeContent 
panelContent
 script class=theme: Default; brush: java; gutter: false 
type=syntaxhighlighter![CDATA[
@@ -141,9 +141,11 @@ public class RichTextEditor implements F
 ]]/script
 /div/div
 
-pThis can now be written as ttlt;t:richtexteditor 
t:id=profile/gt;/tt. The unwanted 

[CONF] Apache Tapestry Page Life Cycle

2013-10-14 Thread Bob Harner (Confluence)







Page Life Cycle
Comment removed by  Bob Harner



I believe this page needs to be rewritten for the new approach in 5.2 of not pooling pages.  This will need to be done by someone with a better understanding of the mechanisms involved than I have.



   
Stop watching space
|
Change email notification preferences










[CONF] Apache Tapestry Forms and Validation

2013-10-14 Thread Bob Harner (Confluence)







Forms and Validation
Page edited by Bob Harner


Comment:
Corrected error in onValidateXXX method example


 Changes (1)
 




...
 * Do the cross-field validation  */ 
void onValidateFromLoginForm() 
{ if (!authenticator.isValid(userName, password)) 
...


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 that doesn't care about success or failure.




 Form Event (in order) 
 Phase 
 When emitted 
 Typical use 


 prepareForRender 
 Render 
 Before rendering the form 
 Load an entity from a database to be edited 


 prepare 
 Render 
 Before rendering the form, but after prepareForRender 



 prepareForSubmit 
 Submit 
 Before the submitted form is processed 



 prepare 
 Submit 
 Before the submitted form is processed, but after prepareForSubmit 



 validate 
 Submit 
 After fields have been populated from submitted values and validated 
 Perform cross-field validation 


 validateForm 
 Submit 
 same as validate 
 deprecated 


 failure 
 Submit 
 After one or more validation 

[jira] [Commented] (TAP5-2182) BeanEditor doesn't look as good in T5.4 as in T5.3

2013-10-14 Thread Lenny Primak (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-2182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13794698#comment-13794698
 ] 

Lenny Primak commented on TAP5-2182:


As pointed in this discussion: 
http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/T5-4-BeanEditor-and-Friends-don-t-look-as-good-as-in-Tap-5-3-td5723435.html

Bootstrap .form-horizontal class should fix the issue, provided Tapestry 
produces the correct markup (which it doesn't at the moment)

Tapestry needs to wrap each field in bootstrap col-xx-x divs
Also, BeanEditor should be enhanced to support form-horizontal and form-inline 
out of the box.

 BeanEditor doesn't look as good in T5.4 as in T5.3
 --

 Key: TAP5-2182
 URL: https://issues.apache.org/jira/browse/TAP5-2182
 Project: Tapestry 5
  Issue Type: Bug
  Components: tapestry-core
Affects Versions: 5.4
Reporter: Lenny Primak

 I noticed something else that's not as pretty out of the box in T5.4 due to 
 bootstrap probably
 In T5.3, beaneditor looks something like this (pretty):
 Label [Input Text/Date/etc]
 Label [Input Text/Date/etc]
 In T5.4, it looks like this (not so pretty or usable):
 Label
 [Input Text/Date/etc  (takes up the whole width of the page)]
 Label
 [Input Text/Date/etc  (takes up the whole width of the page)]
 I think this should be fixed out of the box



--
This message was sent by Atlassian JIRA
(v6.1#6144)


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

2013-10-14 Thread buildbot
Author: buildbot
Date: Tue Oct 15 01:20:53 2013
New Revision: 882645

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 Tue Oct 15 
01:20:53 2013
@@ -168,7 +168,7 @@ public class Login
 /**
  * Do the cross-field validation
  */
-void onValidateFromForm()
+void onValidateFromLoginForm()
 {
 if (!authenticator.isValid(userName, password))
 {




[CONF] Apache Tapestry Component Rendering

2013-10-14 Thread Bob Harner (Confluence)







Component Rendering
File attached by  Bob Harner




tapestry_render_phases.gliffy
(38 kB application/octet-stream)
-
Updated render phase chart (Gliffy source)



   
Stop watching space
|
Change email notification preferences

   View Attachments









[CONF] Apache Tapestry Component Rendering

2013-10-14 Thread Bob Harner (Confluence)







Component Rendering
File attached by  Bob Harner




tapestry_render_phases.png
(50 kB image/png)
-
Updated render phase chart (PNG)



   
Stop watching space
|
Change email notification preferences

   View Attachments









[CONF] Apache Tapestry Component Rendering

2013-10-14 Thread Bob Harner (Confluence)







Component Rendering
File attached by  Bob Harner




component-render-states.png
(86 kB image/png)
-
Older render phase chart



   
Stop watching space
|
Change email notification preferences

   View Attachments









[CONF] Apache Tapestry Component Rendering

2013-10-14 Thread Bob Harner (Confluence)







Component Rendering
File attached by  Bob Harner




tapestry_render_phases.gliffy
(38 kB application/octet-stream)
-
Updated render phase chart (Gliffy source)



   
Stop watching space
|
Change email notification preferences

   View Attachments









[CONF] Apache Tapestry Component Rendering

2013-10-14 Thread Bob Harner (Confluence)







Component Rendering
File attached by  Bob Harner




tapestry_render_phases.png
(49 kB image/png)
-
Updated render phase chart (PNG)



   
Stop watching space
|
Change email notification preferences

   View Attachments









svn commit: r882650 - in /websites/production/tapestry/content: cache/main.pageCache component-rendering.data/tapestry_render_phases.gliffy component-rendering.data/tapestry_render_phases.png componen

2013-10-14 Thread buildbot
Author: buildbot
Date: Tue Oct 15 02:20:48 2013
New Revision: 882650

Log:
Production update by buildbot for tapestry

Added:

websites/production/tapestry/content/component-rendering.data/tapestry_render_phases.gliffy

websites/production/tapestry/content/component-rendering.data/tapestry_render_phases.png
   (with props)
Modified:
websites/production/tapestry/content/cache/main.pageCache
websites/production/tapestry/content/component-rendering.html

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

Added: 
websites/production/tapestry/content/component-rendering.data/tapestry_render_phases.gliffy
==
--- 
websites/production/tapestry/content/component-rendering.data/tapestry_render_phases.gliffy
 (added)
+++ 
websites/production/tapestry/content/component-rendering.data/tapestry_render_phases.gliffy
 Tue Oct 15 02:20:48 2013
@@ -0,0 +1 @@
+{contentType:application/gliffy+json,version:1.2,stage:{background:#FF,width:603,height:850,nodeIndex:81,autoFit:true,exportBorder:false,gridOn:true,snapToGrid:true,drawingGuidesOn:true,pageBreaksOn:false,printGridOn:false,printPaper:LETTER,printShrinkToFit:false,printPortrait:true,maxWidth:5000,maxHeight:5000,themeData:null,objects:[{x:418.0,y:391.0,rotation:0.0,id:61,width:100.0,height:100.0,uid:com.gliffy.shape.basic.basic_v1.default.line,order:43,lockAspectRatio:false,lockShape:false,constraints:{constraints:[],startConstraint:{type:StartPositionConstraint,StartPositionConstraint:{nodeId:13,py:0.5,px:1.0}},endConstraint:{type:EndPositionConstraint,EndPositionConstraint:{nodeId:15,py:0.5,px:1.0}}},graphic:{type:Line,Line:{strokeWidth:2.0,strokeColor:#00,fillColor:none,dashStyle:1.0,1.0,startArrow:0,endArrow:2,startArrowRotation:auto,endArr
 
owRotation:auto,interpolationType:linear,cornerRadius:null,controlPath:[[0.1677901307607499,-1.0],[42.088089614290254,-1.0],[42.088089614290254,149.0],[2.0880896142902543,149.0]],lockSegments:{},ortho:true}},linkMap:[],children:[{x:0.0,y:0.0,rotation:0.0,id:63,width:28.0,height:14.0,uid:null,order:auto,lockAspectRatio:false,lockShape:false,graphic:{type:Text,Text:{overflow:both,paddingTop:2,paddingRight:2,paddingBottom:2,paddingLeft:2,type:fixed,lineTValue:null,linePerpValue:null,cardinalityType:null,html:p
 style=\text-align:center;\span 
style=\font-size:12px;font-family:Arial;font-weight:bold;\false/span/p,tid:null,valign:middle,vposition:none,hposition:none}},children:[]}]},{x:257.03594574203294,y:530.0,rotation:0.0,id:15,width:163.05214387225732,height:20.0,uid:com.gliffy.shape.flowchart.flowchart_v1.default.start_end,order:12,lockAspectRatio:false,lockShape
 
:false,graphic:{type:Shape,Shape:{tid:com.gliffy.stencil.start_end.flowchart_v1,strokeWidth:2.0,strokeColor:#33,fillColor:#e69138,gradient:false,dropShadow:true,state:0,opacity:1.0,shadowX:4.0,shadowY:4.0}},linkMap:[],children:[{x:3.2610428774451456,y:0.0,rotation:0.0,id:16,width:156.53005811736705,height:14.0,uid:null,order:auto,lockAspectRatio:false,lockShape:false,graphic:{type:Text,Text:{overflow:none,paddingTop:2,paddingRight:2,paddingBottom:2,paddingLeft:2,type:fixed,lineTValue:null,linePerpValue:null,cardinalityType:null,html:p
 style=\text-align:center;\span 
style=\font-size:12px;font-family:Arial;text-decoration:none;font-weight:bold;\AfterRenderBody/span/p,tid:null,valign:middle,vposition:none,hposition:none}},children:[]}]},{x:270.28393243165385,y:450.0,rotation:0.0,id:20,width:132.71557152595648,height:30.0,uid:com.gliffy.shape.flow
 
chart.flowchart_v1.default.process,order:16,lockAspectRatio:false,lockShape:false,graphic:{type:Shape,Shape:{tid:com.gliffy.stencil.rectangle.basic_v1,strokeWidth:2.0,strokeColor:#33,fillColor:#1155cc,gradient:false,dropShadow:true,state:0,opacity:1.0,shadowX:4.0,shadowY:4.0}},linkMap:[],children:[{x:1.805654034366755,y:0.0,rotation:0.0,id:21,width:129.10426345722294,height:14.0,uid:null,order:auto,lockAspectRatio:false,lockShape:false,graphic:{type:Text,Text:{overflow:none,paddingTop:2,paddingRight:2,paddingBottom:2,paddingLeft:2,type:fixed,lineTValue:null,linePerpValue:null,cardinalityType:null,html:p
 style=\text-align:center;\span 
style=\font-size:12px;color:#ff;font-family:Arial;text-decoration:none;font-weight:bold;\span
 style=\text-decoration:none;\Render 
Body/span/span/p,tid:null,valign:middle,vposition:none,hposition:none}},children:[