Repository: tapestry-5
Updated Branches:
  refs/heads/master e3c2d044f -> 227bb4ed1


TAP5-2033 Grid and Zone XDOC Documentations - How to set default value
for their parameters

Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/227bb4ed
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/227bb4ed
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/227bb4ed

Branch: refs/heads/master
Commit: 227bb4ed1217cdff316274d32dbaa8d7e2c26c01
Parents: e3c2d04
Author: Emmanuel DEMEY <[email protected]>
Authored: Sun Mar 6 17:42:22 2016 -0500
Committer: Bob Harner <[email protected]>
Committed: Sun Mar 6 17:42:22 2016 -0500

----------------------------------------------------------------------
 .../org/apache/tapestry5/corelib/components/Grid.xdoc | 14 ++++++++++++++
 .../org/apache/tapestry5/corelib/components/Zone.xdoc | 14 +++++++++++++-
 2 files changed, 27 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/227bb4ed/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Grid.xdoc
----------------------------------------------------------------------
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Grid.xdoc 
b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Grid.xdoc
index dc2260f..dd3411b 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Grid.xdoc
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Grid.xdoc
@@ -297,7 +297,21 @@ delete-label=Delete user?]]></source>
                 </p>
 
             </subsection>
+            <subsection name="Configuring the Grid Component in the AppModule 
class">
+                <p>
+                     It is possible to configure the rowsPerPage, 
pagerPosition and tableClass parameters of the Grid component in the AppModule 
class of your application. All your Grid components will use this default 
configuration until you define a value for one of these parameters.
+                </p>
+                <source><![CDATA[
+public static void contributeApplicationDefaults(MappedConfiguration<String, 
String> configuration)
+{
+  configuration.add(GridConstants.ROWS_PER_PAGE, "show");
 
+  configuration.add(GridConstants.PAGER_POSITION, "bottom");
+
+  configuration.add(GridConstants.TABLE_CLASS, "t-data-grid");
+}
+]]></source>
+            </subsection>
         </section>
 
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/227bb4ed/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Zone.xdoc
----------------------------------------------------------------------
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Zone.xdoc 
b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Zone.xdoc
index 10ad805..1bbd1b9 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Zone.xdoc
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Zone.xdoc
@@ -15,7 +15,7 @@
 
 ]]></source>
 
-                <p>It's pretty standard to bind the id parameter of a zone; 
the zone parameter of ActionLink
+                <p> It's pretty standard to bind the id parameter of a zone; 
the zone parameter of ActionLink
                     and Form are the<em>client-side element id</em>, not the 
component id. They are often,
                     but not always, the same. Binding the id parameter ensures 
that a particular, fixed value
                     is used.
@@ -62,7 +62,19 @@ public class ZoneDemo
 
 
             </subsection>
+            <subsection name="Configuring the Zone Component in the AppModule 
class">
+                <p>
+                     It is possible to configure the show and update 
parameters of the Zone component in the AppModule class of your application. 
All your Zone components will use this default configuration until you define a 
value for one of these parameters.
+                </p>
+                <source><![CDATA[
+public static void contributeApplicationDefaults(MappedConfiguration<String, 
String> configuration)
+{
+  configuration.add(ComponentParameterConstants.ZONE_SHOW_METHOD, "show");
 
+  configuration.add(ComponentParameterConstants.ZONE_SHOW_METHOD, "highlight");
+}
+]]></source>
+            </subsection>
 
         </section>
     </body>

Reply via email to