Author: mlusetti
Date: Thu Oct 13 13:26:09 2011
New Revision: 1182843

URL: http://svn.apache.org/viewvc?rev=1182843&view=rev
Log:
TAP5-1677 Zone show and update defaults

Modified:
    
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/ComponentsParametersConstants.java
    
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Zone.java
    
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/ComponentsParametersConstants.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/ComponentsParametersConstants.java?rev=1182843&r1=1182842&r2=1182843&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/ComponentsParametersConstants.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/ComponentsParametersConstants.java
 Thu Oct 13 13:26:09 2011
@@ -89,4 +89,18 @@ public class ComponentsParametersConstan
      */
     public static final String PALETTE_ROWS_SIZE = 
"tapestry.components.palette_rows_size";
 
+    /**
+     * The default name of a JS function attached to Tapestry.ElementEffect 
object to use for the initial
+     * visualization of a {@link org.apache.tapestry5.corelib.components.Zone}.
+     * Defaults to "show"
+     */
+    public static final String ZONE_SHOW_METHOD = 
"tapestry.components.zone_show_method";
+
+    /**
+     * The default name of a JS function attached to Tapestry.ElementEffect 
object to point out an
+     * update on a {@link org.apache.tapestry5.corelib.components.Zone}.
+     * Defaults to "highlight"
+     */
+    public static final String ZONE_UPDATE_METHOD = 
"tapestry.components.zone_update_method";
+
 }

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Zone.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Zone.java?rev=1182843&r1=1182842&r2=1182843&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Zone.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Zone.java
 Thu Oct 13 13:26:09 2011
@@ -20,6 +20,7 @@ import org.apache.tapestry5.CSSClassCons
 import org.apache.tapestry5.ClientBodyElement;
 import org.apache.tapestry5.ComponentAction;
 import org.apache.tapestry5.ComponentResources;
+import org.apache.tapestry5.ComponentsParametersConstants;
 import org.apache.tapestry5.MarkupWriter;
 import org.apache.tapestry5.QueryParameterConstants;
 import org.apache.tapestry5.annotations.BeginRender;
@@ -90,7 +91,8 @@ public class Zone implements ClientBodyE
      * Name of a function on the client-side Tapestry.ElementEffect object 
that is invoked to make the Zone's
      * <div> visible before being updated. If not specified, then the 
basic "show" method is used.
      */
-    @Parameter(defaultPrefix = BindingConstants.LITERAL)
+    @Parameter(defaultPrefix = BindingConstants.LITERAL,
+        value = BindingConstants.SYMBOL + ":" + 
ComponentsParametersConstants.ZONE_SHOW_METHOD)
     private String show;
 
     /**
@@ -98,7 +100,8 @@ public class Zone implements ClientBodyE
      * been updated. If not specified, then the basic "highlight" method is 
used, which performs a classic "yellow fade"
      * to indicate to the user that and update has taken place.
      */
-    @Parameter(defaultPrefix = BindingConstants.LITERAL)
+    @Parameter(defaultPrefix = BindingConstants.LITERAL,
+        value = BindingConstants.SYMBOL + ":" + 
ComponentsParametersConstants.ZONE_UPDATE_METHOD)
     private String update;
 
     /**

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java?rev=1182843&r1=1182842&r2=1182843&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
 Thu Oct 13 13:26:09 2011
@@ -2373,6 +2373,10 @@ public final class TapestryModule
 
         // Palette component parameters defaults
         configuration.add(ComponentsParametersConstants.PALETTE_ROWS_SIZE, 10);
+
+        // Zone component parameters defaults
+        configuration.add(ComponentsParametersConstants.ZONE_SHOW_METHOD, 
"show");
+        configuration.add(ComponentsParametersConstants.ZONE_UPDATE_METHOD, 
"highlight");
     }
 
     /**


Reply via email to