[jira] [Closed] (TAP5-1451) Form component should indicate that a form submission was canceled on the client side

2011-07-05 Thread Howard M. Lewis Ship (JIRA)

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

Howard M. Lewis Ship closed TAP5-1451.
--

   Resolution: Fixed
Fix Version/s: 5.3

> Form component should indicate that a form submission was canceled on the 
> client side
> -
>
> Key: TAP5-1451
> URL: https://issues.apache.org/jira/browse/TAP5-1451
> Project: Tapestry 5
>  Issue Type: Improvement
>  Components: tapestry-core
>Affects Versions: 5.2.4
>Reporter: Howard M. Lewis Ship
>Assignee: Howard M. Lewis Ship
> Fix For: 5.3
>
>
> Although it is possible to determine that a form has been cancelled by 
> providing a listener to the appropriate Submit/LinkSubmit component, that 
> will often occur after other parts of the form have resulted in updates to 
> server-side properties. That may be valid is some circumstances, but it would 
> be nice if there was an early event notification from the Form that indicated 
> a client-side cancel so that the processing of the form's data could be 
> avoided entirely. That is the more general case: no updates to anything on 
> the server side when a client-side form is canceled ... but there is not 
> currently a simple way to determine this.
> What's needed is a special parameter included in the form submission to 
> indicate that the form was cancelled.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (TAP5-1451) Form component should indicate that a form submission was canceled on the client side

2011-07-05 Thread Hudson (JIRA)

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

Hudson commented on TAP5-1451:
--

Integrated in tapestry-trunk-freestyle #410 (See 
[https://builds.apache.org/job/tapestry-trunk-freestyle/410/])
TAP5-1451: Form component should indicate that a form submission was 
canceled on the client side

hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1143161
Files : 
* 
/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Form.java
* 
/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/corelib/components/SubmitTest.java
* 
/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/LinkSubmit.java
* 
/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/EventConstants.java
* 
/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
* 
/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/SubmitMode.java
* 
/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditForm.java
* 
/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/InternalConstants.java
* 
/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/BeanEditForm.tml
* 
/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Submit.java
* 
/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java


> Form component should indicate that a form submission was canceled on the 
> client side
> -
>
> Key: TAP5-1451
> URL: https://issues.apache.org/jira/browse/TAP5-1451
> Project: Tapestry 5
>  Issue Type: Improvement
>  Components: tapestry-core
>Affects Versions: 5.2.4
>Reporter: Howard M. Lewis Ship
>Assignee: Howard M. Lewis Ship
>
> Although it is possible to determine that a form has been cancelled by 
> providing a listener to the appropriate Submit/LinkSubmit component, that 
> will often occur after other parts of the form have resulted in updates to 
> server-side properties. That may be valid is some circumstances, but it would 
> be nice if there was an early event notification from the Form that indicated 
> a client-side cancel so that the processing of the form's data could be 
> avoided entirely. That is the more general case: no updates to anything on 
> the server side when a client-side form is canceled ... but there is not 
> currently a simple way to determine this.
> What's needed is a special parameter included in the form submission to 
> indicate that the form was cancelled.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r1143171 - /tapestry/tapestry5/trunk/build.gradle

2011-07-05 Thread hlship
Author: hlship
Date: Tue Jul  5 19:00:24 2011
New Revision: 1143171

URL: http://svn.apache.org/viewvc?rev=1143171&view=rev
Log:
Roll version number forward to 5.3-alpha-3

Modified:
tapestry/tapestry5/trunk/build.gradle

Modified: tapestry/tapestry5/trunk/build.gradle
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/build.gradle?rev=1143171&r1=1143170&r2=1143171&view=diff
==
--- tapestry/tapestry5/trunk/build.gradle (original)
+++ tapestry/tapestry5/trunk/build.gradle Tue Jul  5 19:00:24 2011
@@ -6,7 +6,7 @@ testngVersion = '5.14.9'
 easymockVersion = '3.0'
 servletAPIVersion = '2.4'
 
-version = '5.3-alpha-2'
+version = '5.3-alpha-3'
 
 doSign = !project.hasProperty('noSign') && project.hasProperty("signing.keyId")
 




svn commit: r1143170 - /tapestry/tapestry5/tags/5.3-alpha-2/

2011-07-05 Thread hlship
Author: hlship
Date: Tue Jul  5 18:58:13 2011
New Revision: 1143170

URL: http://svn.apache.org/viewvc?rev=1143170&view=rev
Log:
Create tag for 5.3-alpha-2 preview package

Added:
tapestry/tapestry5/tags/5.3-alpha-2/   (props changed)
  - copied from r1143169, tapestry/tapestry5/trunk/

Propchange: tapestry/tapestry5/tags/5.3-alpha-2/
--
--- svn:ignore (added)
+++ svn:ignore Tue Jul  5 18:58:13 2011
@@ -0,0 +1,20 @@
+*.idea
+*.iml
+*.ipr
+*.iws
+.classpath
+.externalToolBuilders
+.gradle
+.project
+.settings
+bin
+bin-test
+build
+conf
+db
+hooks
+locks
+out
+target
+temp-testng-customsuite.xml
+test-output

Propchange: tapestry/tapestry5/tags/5.3-alpha-2/
--
--- svn:mergeinfo (added)
+++ svn:mergeinfo Tue Jul  5 18:58:13 2011
@@ -0,0 +1,4 @@
+/tapestry/tapestry5/branches/5.0:717929-719744,723395-728733
+/tapestry/tapestry5/branches/hlship-5.0-perf:726734-728728
+/tapestry/tapestry5/tags/releases/5.0.17:719745
+/tapestry/tapestry5/tags/releases/hlship-5.0-perf:726733




svn commit: r1143167 - in /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services: ClusteredSessionImpl.java SessionFactory.java SessionFactoryImpl.java

2011-07-05 Thread hlship
Author: hlship
Date: Tue Jul  5 18:53:07 2011
New Revision: 1143167

URL: http://svn.apache.org/viewvc?rev=1143167&view=rev
Log:
Update some comments on new code

Modified:

tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ClusteredSessionImpl.java

tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionFactory.java

tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionFactoryImpl.java

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ClusteredSessionImpl.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ClusteredSessionImpl.java?rev=1143167&r1=1143166&r2=1143167&view=diff
==
--- 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ClusteredSessionImpl.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ClusteredSessionImpl.java
 Tue Jul  5 18:53:07 2011
@@ -23,6 +23,8 @@ import java.util.Map;
 
 /**
  * A thin wrapper around {@link javax.servlet.http.HttpSession}.
+ *
+ * @since 5.3
  */
 public class ClusteredSessionImpl extends SessionImpl
 {

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionFactory.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionFactory.java?rev=1143167&r1=1143166&r2=1143167&view=diff
==
--- 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionFactory.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionFactory.java
 Tue Jul  5 18:53:07 2011
@@ -16,6 +16,13 @@ package org.apache.tapestry5.internal.se
 
 import org.apache.tapestry5.services.Session;
 
+/**
+ * Encapsulates logic for accessing the {@link Session} (a wrapper around the 
{@link javax.servlet.http.HttpSession}).
+ *
+ * @since 5.3
+ * @see SessionImpl
+ * @see ClusteredSessionImpl
+ */
 public interface SessionFactory
 {
 Session getSession(boolean create);

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionFactoryImpl.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionFactoryImpl.java?rev=1143167&r1=1143166&r2=1143167&view=diff
==
--- 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionFactoryImpl.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionFactoryImpl.java
 Tue Jul  5 18:53:07 2011
@@ -22,10 +22,6 @@ import org.apache.tapestry5.services.Ses
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;
 
-/**
- * User: josh_canfield
- * Date: 6/25/11
- */
 public class SessionFactoryImpl implements SessionFactory
 {
 private boolean clustered;
@@ -47,7 +43,10 @@ public class SessionFactoryImpl implemen
 {
 final HttpSession httpSession = request.getSession(create);
 
-if (httpSession == null ) return null;
+if (httpSession == null)
+{
+return null;
+}
 
 if (clustered)
 {




svn commit: r1143161 - in /tapestry/tapestry5/trunk/tapestry-core/src: main/java/org/apache/tapestry5/ main/java/org/apache/tapestry5/corelib/ main/java/org/apache/tapestry5/corelib/components/ main/j

2011-07-05 Thread hlship
Author: hlship
Date: Tue Jul  5 18:30:49 2011
New Revision: 1143161

URL: http://svn.apache.org/viewvc?rev=1143161&view=rev
Log:
TAP5-1451: Form component should indicate that a form submission was canceled 
on the client side

Modified:

tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/EventConstants.java

tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/SubmitMode.java

tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditForm.java

tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Form.java

tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/LinkSubmit.java

tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Submit.java

tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/InternalConstants.java

tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java

tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/BeanEditForm.tml

tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js

tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/corelib/components/SubmitTest.java

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/EventConstants.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/EventConstants.java?rev=1143161&r1=1143160&r2=1143161&view=diff
==
--- 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/EventConstants.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/EventConstants.java
 Tue Jul  5 18:30:49 2011
@@ -48,14 +48,14 @@ public class EventConstants
 
 /**
  * Invoked before {@link #PREPARE} when rendering out the form.
- * 
+ *
  * @see org.apache.tapestry5.corelib.components.Form
  */
 public static final String PREPARE_FOR_RENDER = "prepareForRender";
 
 /**
  * Invoked before {@link #PREPARE} when the form is submitted.
- * 
+ *
  * @see org.apache.tapestry5.corelib.components.Form
  */
 public static final String PREPARE_FOR_SUBMIT = "prepareForSubmit";
@@ -63,7 +63,7 @@ public class EventConstants
 /**
  * Invoked to let the containing component(s) prepare for the form 
rendering or the form
  * submission.
- * 
+ *
  * @see org.apache.tapestry5.corelib.components.Form
  */
 public static final String PREPARE = "prepare";
@@ -72,14 +72,17 @@ public class EventConstants
  * Event type for a notification after the form has submitted. This event 
notification occurs on
  * any form submit,
  * without respect to "success" or "failure".
- * 
+ *
  * @see org.apache.tapestry5.corelib.components.Form
  */
 public static final String SUBMIT = "submit";
 
 /**
- * Event type associated with clicking the cancel button inside a {@link 
BeanEditForm}.
- * 
+ * Event triggered when a client-side form is canceled. This occurs after 
page activation, and after
+ * the prepare events for the form, but before any stored {@link 
ComponentAction}s for the form are triggered.
+ *
+ * @see org.apache.tapestry5.corelib.SubmitMode#CANCEL
+ *
  * @since 5.2.0
  */
 public static final String CANCELED = "canceled";
@@ -88,7 +91,7 @@ public class EventConstants
  * Event type for a notification after the form has submitted, when there 
are no errors in the
  * validation tracker.
  * This occurs before the {@link #SUBMIT} event.
- * 
+ *
  * @see org.apache.tapestry5.corelib.components.Form
  */
 public static final String SUCCESS = "success";
@@ -148,7 +151,7 @@ public class EventConstants
  * all the values that were supplied from the client during a form 
submission. The event handler
  * method should have
  * a single parameter, of type Object[] or type List, to receive the 
values.
- * 
+ *
  * @since 5.1.0.0
  */
 public static final String SYNCHRONIZE_VALUES = "synchronizeValues";
@@ -158,7 +161,7 @@ public class EventConstants
  * container of what context (if any) is available. The event handler may 
return a renderable
  * object or null. If
  * null is returned, the component renders its own body as the partial 
markup response.
- * 
+ *
  * @since 5.1.0.1
  */
 public static final String PROGRESSIVE_DISPLAY = "progressiveDisplay";
@@ -167,7 +170,7 @@ public class EventConstants
  * Event triggered by an {@link 
org.apache.tapestry5.corelib.mixins.Autocomplete}

svn commit: r1143160 [2/2] - in /tapestry/tapestry5/trunk: quickstart/src/main/resources/archetype-resources/ tapestry-core/src/main/java/org/apache/tapestry5/ tapestry-core/src/main/java/org/apache/t

2011-07-05 Thread hlship
Modified: 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java?rev=1143160&r1=1143159&r2=1143160&view=diff
==
--- 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java
 Tue Jul  5 18:30:38 2011
@@ -111,7 +111,7 @@ public class InternalUtils
 private static final Pattern NAME_PATTERN = 
Pattern.compile("^[_|$]*([\\p{javaJavaIdentifierPart}]+?)[_|$]*$",
 Pattern.CASE_INSENSITIVE);
 
-/** @since 5.3.0 */
+/** @since 5.3 */
 public static AnnotationProvider NULL_ANNOTATION_PROVIDER = new 
NullAnnotationProvider();
 
 /**
@@ -890,7 +890,7 @@ public class InternalUtils
 constructor));
 }
 
-/** @since 5.3.0 */
+/** @since 5.3 */
 public static final Mapper CLASS_TO_AP_MAPPER = 
new Mapper()
 {
 public AnnotationProvider map(final Class element)
@@ -900,7 +900,7 @@ public class InternalUtils
 
 };
 
-/** @since 5.3.0 */
+/** @since 5.3 */
 public static AnnotationProvider toAnnotationProvider(final Class element)
 {
 return new AnnotationProvider()
@@ -912,7 +912,7 @@ public class InternalUtils
 };
 };
 
-/** @since 5.3.0 */
+/** @since 5.3 */
 public static final Mapper METHOD_TO_AP_MAPPER 
= new Mapper()
 {
 public AnnotationProvider map(final Method element)
@@ -940,7 +940,7 @@ public class InternalUtils
 }
 }
 
-/** @since 5.3.0 */
+/** @since 5.3 */
 public static ServiceDef3 toServiceDef3(ServiceDef sd)
 {
 if (sd instanceof ServiceDef3)
@@ -1335,7 +1335,7 @@ public class InternalUtils
  * 
  * @param annotated
  *annotated element to get annotations from
- * @since 5.3.0
+ * @since 5.3
  */
 public static String getServiceId(AnnotatedElement annotated)
 {

Modified: 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/ClassFab.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/ClassFab.java?rev=1143160&r1=1143159&r2=1143160&view=diff
==
--- 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/ClassFab.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/ClassFab.java
 Tue Jul  5 18:30:38 2011
@@ -40,7 +40,7 @@ package org.apache.tapestry5.ioc.service
  * 
  * ClassFab instances are created by a {@link 
org.apache.tapestry5.ioc.services.ClassFactory}.
  * 
- * @deprecated In 5.3.0, use {@link PlasticProxyFactory} instead
+ * @deprecated In 5.3, use {@link PlasticProxyFactory} instead
  */
 public interface ClassFab
 {

Modified: 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/ClassFactory.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/ClassFactory.java?rev=1143160&r1=1143159&r2=1143160&view=diff
==
--- 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/ClassFactory.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/ClassFactory.java
 Tue Jul  5 18:30:38 2011
@@ -23,7 +23,7 @@ import java.lang.reflect.Method;
 /**
  * Service used when dynamically creating new classes.
  * 
- * @deprecated In 5.3.0, use {@link PlasticProxyFactory} instead
+ * @deprecated In 5.3, use {@link PlasticProxyFactory} instead
  */
 public interface ClassFactory
 {

Modified: 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/FieldValueConduit.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/FieldValueConduit.java?rev=1143160&r1=1143159&r2=1143160&view=diff
==
--- 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/FieldValueConduit.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/FieldValueConduit.java
 Tue Jul  5 18:30:38 2011
@@ -21,7 +21,7 @@ import org.apache.tapestry5.plastic.Plas
  * Used as a replacement for a field.
  * 
  * @since 5.2.0
- * @deprecated Deprecated in 5.3.0, using Plastic equivalents
+ * @deprecated 

[CONF] Apache Tapestry > Ajax Components FAQ

2011-07-05 Thread confluence







Ajax Components FAQ
Page edited by Howard M. Lewis Ship


 Changes (2)
 




...
Instead, Tapestry creates a random-ish unique id suffix, such as "12a820cc40e" in the example; this suffix is appended to all allocated ids to ensure that they do not conflict with previously rendered ids.  
h3. Why do I sometimes get the exception "The rendered content did not include any elements that allow for the positioning of the hidden form field's element." when rendering an empty Zone? 
 
As part of Tapestry's form processing, it must write a hidden input element with information needed when the form is submitted. Since the content of a Zone may be changed or removed, a hidden field is created just for the Zone, separate from the rest of the enclosing form.At the same time, Tapestry wants to position the  field in a valid location, and HTML defines some constraints for that; an input field must appear inside a  or  element. In your empty Zone, there's no place to put the hidden element.  The solution is to add the following to the body of your Zone:  {code}  {code}  This ensures that there's a place for the hidden input field. The "t-invisible" CSS class ensures that the  does not display or otherwise affect layout.   
{scrollbar} 


Full Content

_javascript_ FAQ Frequently Asked Questions Injection FAQ

Ajax Components

Main article: Ajax and Zones

Do I have to specify both id and t:id for Zone components?

The examples for the Zone component (in the Component Reference) consistently specify both id and t:id and this is probably a good idea.

Generally speaking, if you don't specify the client-side id (the id attribute), it will be the same as the Tapestry component id (t:id).

However, there are any number of exceptions to this rule. The Zone may be rendering inside a Loop (in which case, each rendering will have a unique client side id). The Zone may be rendering as part of a partial page render, in which case, a random unique id is inserted into the id. There are other examples where Tapestry component ids in nested components may also clash.

The point is, to be sure, specify the exact client id.  This will be the value for the zone parameter of the triggering component (such as a Form, PageLink, ActionLink, etc.).

How do I update the content of a Zone from an event handler method?

When a client-side link or form triggers an update, the return value from the event handler method is used to construct a partial page response; this partial page response includes markup content that is used to update the Zone's client-side  element.

Where does that content come from?  You inject it into your page.



"search" t:id="searchZone">
  "searchForm" zone="searchZone">
"query" size="20"/>
"submit" value="Search"/>
  


"searchResults">
  
"loop" source="searchHits" value="searchHit">${searchHit}
  






  @Inject
  private Block searchResults;

  Object onSuccessFromSearchForm()
  {
searchHits = searchService.performSearch(query);

return searchResults;
  }



So, when the search form is submitted, the resulting search hits are collected.  In the same request, the searchResults block is rendered, package, and sent to the client.  The form inside the client-side Zone  is replaced with the list of hits.

In many cases, you just want to re-render the Zone itself, to display updated content.  In that case, you don't need a separate , instead you can use @InjectComponent to inject the Zone object itself, and return the Zone's body:



  @InjectComponent
  private Zone statusZone;

  Object onActionFromUpdateStatus()
  {
return statusZone.getBody();
  }



How to I update multiple zones in a single event handler?

To do this, you must know, on the server, the client ids of each Zone. That's one of the reasons that you will generally set the Zone's client id (via the Zone's id parameter), rather than let Tapestry assign a client id for you.

From the event handler method, instead of returning a Block or a Component, return a multi-zone update:



  @Inject
  private Block searchResults;

  @Inject
  private Block statusBlock;

  Object onSuccessFromSearchForm()
  {
searchHits = searchService.performSearch(query);

message = String.format("Found %,d matching documents", searchHits.size());

return new MultiZoneUpdate("results", searchResults).add("status", statusBlock);
  }



What's that weird number in the middle of the client ids after a Zone is updated?

You might start with markup in your template for a component such as a TextField:



  "firstName"/>



When the component initially renders as part of a full page render, you get a sensible bit of markup:



  "firstName" name="firstName" type="text">



But when the

[jira] [Commented] (TAP5-746) Zone should include an option to periodically update itself

2011-07-05 Thread JIRA

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

François Facon commented on TAP5-746:
-

I guess that soon Tapestry components will use an agnostic js layer. The 
current implementation depend on prototype.
for the timer, test on ajax call, dom manipulation. So I let this jira  open in 
order change the implementation in the future.

Next step will be the use of  pubsub pattern. 
It would be nice  to connect this component to a push channel (WS, RTMPT 
(Flash), comet, polling). If we define a startegie based on both client and 
server capabilities, the frequency parameter make sense only on polling. Also 
in polling mode, server must be able to regulate the client call frequency when 
facing heavy charge, session get invalidate, or nothing to update...
So I feel that it would be better to replace this parameter by an ordered Array 
of JSON object get from the server and define a way to let the server regulate 
the pooling frequency if needed.  

In pooling mode, I guess that a single timer or executor or worker is needed. 
It would be in charge of :
- registering the subscription on a channel from any zone 
- getting data related to channel from the server
- dispatching data to any listener.

But perhaps it's to much.  

 


 

> Zone should include an option to periodically update itself
> ---
>
> Key: TAP5-746
> URL: https://issues.apache.org/jira/browse/TAP5-746
> Project: Tapestry 5
>  Issue Type: Improvement
>  Components: tapestry-core
>Affects Versions: 5.1.0.5
>Reporter: Howard M. Lewis Ship
> Attachments: zone-refresh.patch, zone-refresh.patch, 
> zone-refresh.patch
>
>
> By default, it should re-render its own body, unless some other renderable 
> result is return by event handlers for the update event it will trigger.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[CONF] Apache Tapestry > Version Numbers

2011-07-05 Thread confluence







Version Numbers
Page edited by Ulrich Stärk


Comment:
Let's stick with Apache nomenclature


 Changes (4)
 




...
"rc" versions are "release candidates"; the functionality should be solid; the point of a release candidate is to get wide exposure to the new codebase to ensure that the final release is free of bugs.  
h1. Preview Releases Packages 
 
A preview release package may be created at any time. A tag is created in Subversion to label the exact source from which the preview release package is generated.  The preview release package is built and uploaded to the Apache Nexus. Once uploaded, the master version number (in trunk) should be advanced to the next index number within the same stability series (example: "5.3-alpha-2" to "5.3-alpha-3"). 
 
The Apache Nexus URL for the preview release package may be distributed on the Tapestry user mailing list. However, preview releases packages are deleted, not released. This is important ... preview releases packages are never released to the   Maven Central repository, only final releases are distributed via Maven Central. 
 
A stability vote may follow a preview release. package. This is to vote the code base up to the next level of stability (to "beta", then "rc", then "stable"). This a lazy consensus vote. 
 h1. Stable Releases 
...


Full Content



Added in 5.3

Tapestry version numbering was change starting in release 5.3.  Tapestry 5.2 and earlier used a different numbering scheme whose primary failing was that, from the version number, it was not obvious what the stability of the version was.


This document describes Tapestry's version numbering system. This is important, as version numbers relate both to artifacts available for download, or from a Maven repository, and also to bugs recorded in the issue tracking system.

Tapestry Release Numbers

Tapestry release numbers consist of a product version number, and release index number, seperated by periods, for example "5.3".  The product version number, 5, is unlikely to change any time soon (it would indicate a non-backwards compatible rewrite of the framework, and we've had enough of that, thank you very much). 

Tapestry Stable Release Versions

Tapestry stable releases use the name version number as the release number.

A bug fix release follows a stable release, when necessary. Bug fix releases add a sequence number to the product release number. Thus, the first bug fix release for Tapestry 5.3 will be version 5.3.1, then 5.3.2, as necessary.

A bug fix release replaces the previous stable release. 

Preview Versions

During the course of development of a release, there will be preview releases of non-final versions.  A preview version consists of the product version, a stability term, and an index number, separated by dashes. The stability term is "alpha", "beta", or "rc".

The index number starts at 1.  A preview version number might be "5.3-alpha-2", or "5.3-beta-1", for example. The index number resets back to one when the stability itself is upgraded.

"alpha" versions are not stable; the represent functionality in flux; classes and methods may be renamed or otherwise refactored between releases.

"beta" versions occur once main functionality is complete; they exist to fix bugs in both old and new functionality, and fill any gaps in functionality.

"rc" versions are "release candidates"; the functionality should be solid; the point of a release candidate is to get wide exposure to the new codebase to ensure that the final release is free of bugs.

Preview Packages

A preview package may be created at any time. A tag is created in Subversion to label the exact source from which the preview package is generated.  The preview package is built and uploaded to the Apache Nexus. Once uploaded, the master version number (in trunk) should be advanced to the next index number within the same stability series (example: "5.3-alpha-2" to "5.3-alpha-3").

The Apache Nexus URL for the preview package may be distributed on the Tapestry user mailing list. However, preview packages are deleted, not released. This is important ... preview packages are never released to the Maven Central repository, only final releases are distributed via Maven Central.

A stability vote may follow a preview package. This is to vote the code base up to the next level of stability (to "beta", then "rc", then "stable"). This a lazy consensus vote.

Stable Releases

Once a version has been voted "stable", a  release may be built and uploaded to the Apache Nexus. A stable release also includes additional non-Maven artifacts containing the project's source code, and additiona