Author: ekoneil
Date: Thu Aug 25 09:50:54 2005
New Revision: 240100

URL: http://svn.apache.org/viewcvs?rev=240100&view=rev
Log:
Checkpoint new databinding doc.  

BB: self
DRT: build.release pass


Modified:
    
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/databinding.xml

Modified: 
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/databinding.xml
URL: 
http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/databinding.xml?rev=240100&r1=240099&r2=240100&view=diff
==============================================================================
--- 
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/databinding.xml
 (original)
+++ 
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/databinding.xml
 Thu Aug 25 09:50:54 2005
@@ -60,6 +60,169 @@
             only a few NetUI implicit objects should be used in read/write 
expressions.  These include <code>pageFlow</code>, <code>sharedFlow</code>, 
             and <code>actionForm</code>.
             </note>
+            <p>
+            </p>
+        </section>
+        <section id="implicit-objects-jsp">
+            <title>JSP Implicit Objects</title>
+            <p>
+            A JSP 2.0+ container exposes a set of implicit objects for use by 
JSP authors.  These implicit objects are documented
+            <a href="site:jspel">here</a>.  These can be used on any of the 
NetUI JSP tag attributes that accept runtime expressions.
+            For example, in a webapp called <code>foo</code> the following JSP 
snippet uses the <code>pageContext</code> implicit object
+            which exposes the JSP's <code>javax.servlet.jsp.PageContext</code> 
to the page as a JavaBean:
+            </p>
+            <source><![CDATA[
+               <netui:image 
value="${pageContext.request.contextPath}/images/banner.png"/>
+            ]]></source>
+            <p>
+            will display HTML markup:
+            </p>
+            <source><![CDATA[
+               <img source="/foo/images/banner.png"/>
+            ]]></source>
+            <p>
+            The JSP container also makes implicit objects available that 
provide access to The attribute maps for the page context, 
+            request, session, and servlet context   By adding attributes to 
the page context, request, and session, webapp 
+            developers can add their own implicit objects.  In the following 
example, a JavaBean of type <code>Widget</code> is
+            added to the request in a Page Flow action:
+            </p>
+            <source>
+                getRequest().setAttribute("widget", fooWidget");
+            </source>
+            <p>
+            Then, this JSP snippet uses the expression language to data bind 
to the Widget's <code>density</code> property:
+            </p>
+            <source>
+                The density is: ${widget.density}
+            </source>
+            <p>
+            This is effectively the same as writing code that does:
+            </p>
+            <source><![CDATA[
+                The density is: <%= 
((Widget)request.getAttribute("widget")).getDensity() %>
+            ]]></source>
+        </section>
+        <section id="implicit-objects-netui">
+            <title>NetUI Implicit Objects</title>
+            <p>
+            In addition to the implicit objects that the JSP container 
provides, the NetUI runtime provides an additional set 
+            of objects that are available when using certain NetUI and Page 
Flow features.  Not all of the implicit objects are 
+            always available -- for example, the <code>actionForm</code> 
implicit object is only available when used inside of
+            a <code>&lt;netui:form</code> tag for accessing the form's 
associated form bean.
+            </p>
+            <p>
+            A summary of the NetUI implicit objects is shown in the table 
below; details are avaialble further down this document.
+            </p>
+            <table>
+            <tr><th>Implicit 
Object</th><th>Context</th><th>Description</th></tr>
+            <tr>
+                <td><code>actionForm</code></td>
+                <td>Within tde <code>&lt;netui:form></code> tag</td>
+                <td>Provides access to the properties of a JavaBean used as 
tde form bean for an HTML form.</td>
+            </tr>
+            <tr>
+                <td><code>bundle</code></td>
+                <td>Inside of a JSP where the 
+                    <a 
href="../apidocs/classref_pageflows/org/apache/beehive/netui/tags/databinding/bundle/DeclareBundle.html">
+                    <code>&lt;netui-data:declareBundle></code></a>
+                    tag is used to refer to a resource bundle or where a JSP 
is part of a Page Flow that has 
+                    resource bundles declared witd tde 
+                    <a 
href="../apidocs/classref_pageflows/org/apache/beehive/netui/pageflow/annotations/Controller.html">
+                    <code>@Jpf.MessageBundle</code></a> 
+                    annotation.</td>
+                <td>Provides access to message strings contained in a Java 
properties file.  Strings are referred to by name in tde expression.</td>
+            </tr>
+            <tr>
+                <td><code>container</code></td>
+                <td>The <code>container</code> implicit object is available 
inside of several NetUI JSP tags that "repeat" over data sets 
+                    including the 
+                    <a 
href="../apidocs/classref_pageflows/org/apache/beehive/netui/tags/databinding/datagrid/DataGrid.html">
+                    <code>&lt;netui-data:dataGrid</code></a>, 
+                    <a 
href="../apidocs/classref_pageflows/org/apache/beehive/netui/tags/databinding/repeater/Repeater.html">
+                    <code>&lt;netui-data:repeater</code></a>, and
+                    <a 
href="../apidocs/classref_pageflows/org/apache/beehive/netui/tags/databinding/cellrepeater/CellRepeater.html">
+                    <code>&lt;netui-data:cellRepeater</code></a>.
+                </td>
+                <td>Provides access to the JavaBean properties exposed by the 
+                    <a 
href="../apidocs/classref_pageflows/org/apache/beehive/netui/script/common/IDataAccessProvider.html">
+                    <code>IDataAccessProvider</code></a> interface.  
Implementations
+                    of this interface are made available to the PageContext 
during rendering so that tag bodies can access information about 
+                    the current data item, the item's index, and so on.
+                </td>                    
+            </tr>
+            <tr>
+                <td><code>pageFlow</code></td>
+                <td>Available to any JSP that is part of a Page Flow.</td>
+                <td>The <code>pageFlow</code> implicit object provides access 
to the 
+                    current Page Flow instance as a JavaBean.  This allows a 
JPF to expose properties to JSP pages.
+                </td>
+            </tr>
+            <tr>
+                <td><code>pageInput</code></td>
+                <td>
+                Available to any JSP that was reached by a Page Flow 
+                <a 
href="../apidocs/classref_pageflows/org/apache/beehive/netui/pageflow/Forward.html">Forward</a>
 
+                object that had <em>page inputs</em> attached to the Forward.
+                </td>
+                <td>
+                Page Flows allow <em>page inputs</em> to be attached to 
Forward objects as a way to provide a data contract between a Page Flow action 
+                and a JSP page.  This ensures that all actions that forward to 
JSPs provide the JSP the appropriate data and that all JSPs receive
+                the correct data.  This data contract is validated at both the 
action and at the JSP page when using the 
+                <a 
href="../apidocs/classref_pageflows/org/apache/beehive/netui/tags/databinding/pageinput/DeclarePageInput.html">
+                <code>&lt;netui-data:declarePageInput></code></a>.
+                tag.
+                </td>
+            </tr>
+            <tr>
+                <td><code>sharedFlow</code></td>
+                <td>Available to any JSP that is part of a 
+                    <a 
href="../apidocs/classref_pageflows/org/apache/beehive/netui/pageflow/PageFlowController.html">
+                    Page Flow</a> which references 
+                    <a 
href="../apidocs/classref_pageflows/org/apache/beehive/netui/pageflow/SharedFlowController.html">
+                    Shared Flows</a>.</td>
+                <td>The <code>sharedflow</code> implicit object provides 
access any JavaBean properties on Shared Flows assocaited 
+                    with the current Page Flow.  This allows Shared Flows to 
expose properties to JSPs.
+                </td>
+            </tr>
+            </table>
+            <section>
+            <title>NetUI Implicit Object Details</title>
+            <p>
+            </p>
+            </section>
+            <section id="implicit-objects-netui-actionForm">
+            <title>actionForm</title>
+            <p>
+            </p>
+            </section>
+            <section id="implicit-objects-netui-bundle">
+            <title>bundle</title>
+            <p>
+            </p>
+            </section>
+            <section id="implicit-objects-netui-container">
+            <title>container</title>
+            <p>
+            </p>
+            </section>
+            <section id="implicit-objects-netui-pageFlow">
+            <title>pageFlow</title>
+            <p>
+            </p>
+            </section>
+            <section id="implicit-objects-netui-pageInput">
+            <title>pageInput</title>
+            <p>
+            </p>
+            </section>
+            <section id="implicit-objects-netui-sharedFlow">
+            <title>sharedFlow</title>
+            <p>
+            </p>
+            </section>
+        </section>
+        <section>
+            <title></title>
             <p>The one-way, read-only contexts are: requestScope, param, 
sessionScope, container, pageScope, bundle, pageInput, applicationScope</p>
             <p>The two-way, read-write contexts are:  pageFlow, sharedFlow, 
actionForm</p>
         </section>
@@ -82,14 +245,6 @@
                 </tr>
                 <tr>
                     <td>
-                        <code>applicationScope</code>
-                    </td>
-                    <td>an attribute map on the application object (a JSP 2.0 
implicit object)</td>
-                    <td>An implicit JSP object.  Attributes of this object are 
available across the web
-                        app.</td>
-                </tr>
-                <tr>
-                    <td>
                         <code>bundle</code>
                     </td>
                     <td>Properties defined in a message resource file</td>
@@ -150,27 +305,6 @@
                 </tr>
                 <tr>
                     <td>
-                        <code>pageScope</code>
-                    </td>
-                    <td>An attribute map on the current JSP page (a JSP 2.0 
implicit object)</td>
-                    <td>An implicit JSP object.  Attributes of this object are 
available on the current JSP page.</td>
-                </tr>
-                <tr>
-                    <td>
-                        <code>requestScope</code>
-                    </td>
-                    <td>An attribute map on the request object (a JSP 2.0 
implicit object)</td>
-                    <td>An implicit JSP object.  Attributes of this object are 
available for the life of the current request.</td>
-                </tr>
-                <tr>
-                    <td>
-                        <code>sessionScope</code>
-                    </td>
-                    <td>An attribute map on the session object (a JSP 2.0 
implicit object)</td>
-                    <td>An implicit JSP object.  Attributes of this object are 
available for the life of the user session.</td>
-                </tr>
-                <tr>
-                    <td>
                         <code>sharedFlow</code>
                     </td>
                     <td>Attribute map of all of the shared flows in the web 
application</td>
@@ -190,13 +324,6 @@
 ]]></source>
                 </td>
                 </tr>                
-                <tr>
-                    <td>
-                        <code>param</code>
-                    </td>
-                    <td>Query parameters on the current JSP's URL.</td>
-                    <td>Query parameters that are part of the URL can be 
referenced. Values are read only.</td>
-                </tr>
             </table>
         </section>
         <section id="individual_binding_contexts">


Reply via email to