You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/08/16 01:42:05 UTC

svn commit: r232907 - in /beehive/trunk/docs/forrest/release/src/documentation: content/xdocs/pageflow/ resources/images/netui/ resources/images/netui/datagrid/

Author: ekoneil
Date: Mon Aug 15 16:41:55 2005
New Revision: 232907

URL: http://svn.apache.org/viewcvs?rev=232907&view=rev
Log:
Additional data grid doc work.

BB: self
DRT: build.release pass


Added:
    beehive/trunk/docs/forrest/release/src/documentation/resources/images/netui/
    beehive/trunk/docs/forrest/release/src/documentation/resources/images/netui/datagrid/
    beehive/trunk/docs/forrest/release/src/documentation/resources/images/netui/datagrid/datagridSimple.png   (with props)
    beehive/trunk/docs/forrest/release/src/documentation/resources/images/netui/datagrid/datagridSimpleWithAnchor.png   (with props)
    beehive/trunk/docs/forrest/release/src/documentation/resources/images/netui/datagrid/datagridSimpleWithFormatter.png   (with props)
    beehive/trunk/docs/forrest/release/src/documentation/resources/images/netui/datagrid/datagridSimpleWithHeader.png   (with props)
Modified:
    beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/pageflow_datagrid.xml

Modified: beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/pageflow_datagrid.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/pageflow_datagrid.xml?rev=232907&r1=232906&r2=232907&view=diff
==============================================================================
--- beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/pageflow_datagrid.xml (original)
+++ beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/pageflow_datagrid.xml Mon Aug 15 16:41:55 2005
@@ -34,10 +34,46 @@
 This data grid binds to a List of PetBean objects stored in the PageContext's attribute map and renders an HTML table
 that is four cells wide (ie four columns) containing the petId, name, description, and price fields.  The rendered table
 would appear as:
+  <br/>
+    <img src="images/netui/datagrid/datagridSimple.png" alt="Simple data grid"/>
+  <br/>
 </p>
+<!--
 <source>
-        <strong>TODO</strong>
+&lt;table class="datagrid">
+  &lt;tr class="datagrid-even">
+    &lt;td class="datagrid">&lt;span>dog1&lt;/span>&lt;/td>
+    &lt;td class="datagrid">&lt;span>Golden Retriever&lt;/span>&lt;/td>
+    &lt;td class="datagrid">&lt;span>Dog&lt;/span>&lt;/td>
+    &lt;td class="datagrid">&lt;span>99.99&lt;/span>&lt;/td>
+  &lt;/tr>
+  &lt;tr class="datagrid-odd">
+    &lt;td class="datagrid">&lt;span>dog2&lt;/span>&lt;/td>
+    &lt;td class="datagrid">&lt;span>Cocker spaniel&lt;/span>&lt;/td>
+    &lt;td class="datagrid">&lt;span>Cocker spaniel&lt;/span>&lt;/td>
+    &lt;td class="datagrid">&lt;span>89.99&lt;/span>&lt;/td>
+  &lt;/tr>
+  &lt;tr class="datagrid-even">
+    &lt;td class="datagrid">&lt;span>dog3&lt;/span>&lt;/td>
+    &lt;td class="datagrid">&lt;span>Labrador Retriever&lt;/span>&lt;/td>
+    &lt;td class="datagrid">&lt;span>Black Labrador dog&lt;/span>&lt;/td>
+    &lt;td class="datagrid">&lt;span>79.99&lt;/span>&lt;/td>
+  &lt;/tr>
+  &lt;tr class="datagrid-odd">
+    &lt;td class="datagrid">&lt;span>fish1&lt;/span>&lt;/td>
+    &lt;td class="datagrid">&lt;span>Koi&lt;/span>&lt;/td>
+    &lt;td class="datagrid">&lt;span>Fish&lt;/span>&lt;/td>
+    &lt;td class="datagrid">&lt;span>199.99&lt;/span>&lt;/td>
+  &lt;/tr>
+  &lt;tr class="datagrid-even">
+    &lt;td class="datagrid">&lt;span>fish2&lt;/span>&lt;/td>
+    &lt;td class="datagrid">&lt;span>Barracuda&lt;/span>&lt;/td>
+    &lt;td class="datagrid">&lt;span>Fish&lt;/span>&lt;/td>
+    &lt;td class="datagrid">&lt;span>199.99&lt;/span>&lt;/td>
+  &lt;/tr>
+&lt;/table>
 </source>
+-->
 <p>
 The values for the cells are specified with a JSP 2.0 expression and can reference any implicit object.  In this case, an
 expression like <code>${container.item.petId}</code> references an implicit object called <code>container</code> that the
@@ -64,18 +100,22 @@
 <source>
     &lt;netui-data:dataGrid dataSource="pageScope.pets" name="petGrid">
         &lt;netui-data:rows>
-            &lt;netui-data:spanCell value="${container.item.petId}"/>
             &lt;netui-data:spanCell value="${container.item.name}"/>
             &lt;netui-data:spanCell value="${container.item.description}"/>
             &lt;netui-data:spanCell value="${container.item.price}"/>
+            &lt;netui-data:anchorCell value="Details" action="details">
+                &lt;netui:parameter name="id" value="${container.item.petId}"/>
+            &lt;/netui-data:anchorCell>
         &lt;/netui-data:rows>
     &lt;/netui-data:dataGrid>
 </source>
 <p>
-This data grid displays <strong>TODO</strong>.
+This data grid displays three columns of text with a fourth column containing HTML anchors. 
+Though it's not visible in the image, each anchor contains an HTTP request parameter
+with name <code>id</code> and value <code>${container.item.petId}</code>.
 <br/>
 <br/>
-  <strong>TODO</strong>
+    <img alt="Data Grid with Anchor" src="images/netui/datagrid/datagridSimpleWithAnchor.png"/>
 <br/>
 <br/>
 </p>
@@ -104,21 +144,52 @@
 <p>
 The data grid rendered here will have a single HTML table row that contains header cells
 with titles for the data columns.  This table might appear as:
-<br/>
-<br/>
-  <strong>TODO</strong>
-<br/>
-<br/>
+  <br/>
+    <img alt="Data Grid with Header" src="images/netui/datagrid/datagridSimpleWithHeader.png"/>
+  <br/>
 </p>
     </section>
     <section id="datagrid-cell-formatting">
         <title>Formatting Cells</title>
-        <p><strong>TODO</strong></p>
+        <p>
+The NetUI formatter tags can also be applied to data grid cells.  For example, a cell containing
+a Date object could be formatted using:
+        </p>
+<source>
+    &lt;netui-data:dataGrid dataSource="pageScope.pets" name="pets">
+        &lt;netui-data:header>
+            &lt;netui-data:headerCell headerText="Name"/>
+            &lt;netui-data:headerCell headerText="Invoice Date"/>
+        &lt;/netui-data:header>
+        &lt;netui-data:rows>
+            &lt;netui-data:spanCell value="${container.item.name}"/>
+            &lt;netui-data:spanCell value="${container.item.invoiceDate}">
+                &lt;netui:formatDate pattern="M/dd/yy"/>
+            &lt;/netui-data:spanCell>
+        &lt;/netui-data:rows>
+    &lt;/netui-data:dataGrid>
+</source>
+<p>
+which would render a data grid where the formatted column has dates in M/dd/yy format:
+  <br/>
+    <img alt="Data Grid with Formatter" src="images/netui/datagrid/datagridSimpleWithFormatter.png"/>
+  <br/>
+</p>
     </section>
 </section>
 <section id="datagrid-styles-support">
     <title>Adding Styles to the Data Grid</title>
-    <p><strong>TODO</strong></p>
+    <p>
+The data grid has three ways to apply styles to the rendered HTML elements including table rows, 
+cells, captions, and the HTML table itself.  By default, the data grid renders a set of HTML 
+style class names which can be used in conjunction with a user-provided CSS file to automatically
+apply styles to the grid.  The default CSS names for various data grid regions are as follows:
+
+In addition, the style information can be customized by the page author in two ways via the 
+<code>style</code> and <code>styleClass</code> attributes.  Many of the data grid tags provide
+these attributes and set the HTML <code>style</code> and <code>class</code> attributes on 
+rendered HTML elements.
+    </p>
     <section id="datagrid-style">
         <title>Style Attributes</title>
         <p><strong>TODO</strong></p>

Added: beehive/trunk/docs/forrest/release/src/documentation/resources/images/netui/datagrid/datagridSimple.png
URL: http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/resources/images/netui/datagrid/datagridSimple.png?rev=232907&view=auto
==============================================================================
Binary file - no diff available.

Propchange: beehive/trunk/docs/forrest/release/src/documentation/resources/images/netui/datagrid/datagridSimple.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: beehive/trunk/docs/forrest/release/src/documentation/resources/images/netui/datagrid/datagridSimpleWithAnchor.png
URL: http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/resources/images/netui/datagrid/datagridSimpleWithAnchor.png?rev=232907&view=auto
==============================================================================
Binary file - no diff available.

Propchange: beehive/trunk/docs/forrest/release/src/documentation/resources/images/netui/datagrid/datagridSimpleWithAnchor.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: beehive/trunk/docs/forrest/release/src/documentation/resources/images/netui/datagrid/datagridSimpleWithFormatter.png
URL: http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/resources/images/netui/datagrid/datagridSimpleWithFormatter.png?rev=232907&view=auto
==============================================================================
Binary file - no diff available.

Propchange: beehive/trunk/docs/forrest/release/src/documentation/resources/images/netui/datagrid/datagridSimpleWithFormatter.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: beehive/trunk/docs/forrest/release/src/documentation/resources/images/netui/datagrid/datagridSimpleWithHeader.png
URL: http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/resources/images/netui/datagrid/datagridSimpleWithHeader.png?rev=232907&view=auto
==============================================================================
Binary file - no diff available.

Propchange: beehive/trunk/docs/forrest/release/src/documentation/resources/images/netui/datagrid/datagridSimpleWithHeader.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream