You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by do...@apache.org on 2006/01/27 22:43:49 UTC
svn commit: r372993 -
/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/pageFlowControlContainer.xml
Author: dolander
Date: Fri Jan 27 13:43:46 2006
New Revision: 372993
URL: http://svn.apache.org/viewcvs?rev=372993&view=rev
Log:
Finish out the section on programmatic creation of the ControlBeanContext
Modified:
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/pageFlowControlContainer.xml
Modified: beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/pageFlowControlContainer.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/pageFlowControlContainer.xml?rev=372993&r1=372992&r2=372993&view=diff
==============================================================================
--- beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/pageFlowControlContainer.xml (original)
+++ beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/pageFlowControlContainer.xml Fri Jan 27 13:43:46 2006
@@ -11,7 +11,7 @@
controls. Controls run within a runtime container which provides services to controls. Within the page flow
runtime, the <a href="../apidocs/classref_controls/org/apache/beehive/controls/api/context/ControlBeanContext.html">
org.apache.beehive.controls.api.context.ControlBeanContext</a> is the base class that provides the extended
- services to contained controls. This object is managed by the page flow runtime. This document describes the
+ services to contained controls. The container is managed by the page flow runtime. This document describes the
details of the contract that is maintained for controls hosted in page flows by the implementation.
</p>
</section>
@@ -22,13 +22,13 @@
<section>
<title>Scope of the Control</title>
<p> There are three scopes that the control container implementation provides for controls. The first is
- at the page flow level. Each page flow, <code>PageFlowController</code>, provides it's own
+ at the page flow level. Each page flow, <code>PageFlowController</code>, provides its own
<code>ControlBeanContext</code> to the controls which are defined within the scope of that page flow. The
second scope is the shared flows, <code>SharedFlowController</code>. All shared flows and the
- <code>GlobalApp</code> share a single <code>ControlBeanContext</code>. The final scope, is for JSF Backing
+ <code>GlobalApp</code> share a single <code>ControlBeanContext</code>. The final scope is for JSF Backing
Beans, <code>FacesBackingBean</code>. Just as with page flows, faces backing beans have a
<code>ControlBeanContext</code> that is scoped to their life time. The result is that the
- <code>ControlBeanContext</code> that contains controls has the same lifetime as the object that defines
+ <code>ControlBeanContext</code> containing controls has the same lifetime as the object that defines
and uses the control instances.
</p>
</section>
@@ -37,7 +37,8 @@
<p> There are three places in the handling of a request where page flow code provides synchronization of multiple
threads. Page flows and shared flows are scoped into a <code>ServletSession</code>. It is possible to have
multiple threads running. This can happen if you have multiple browser windows sharing a session, or if you have
- multiple requests from a single page. Multiple requests can be generated through HTML frames or AJAX calls. The
+ multiple requests from a single page containing frames.
+ Multiple requests can be generated through HTML frames or AJAX calls. The
page flow runtime insures that multiple threads are not executing code inside of a page flow. A shared flow can
potentially have multiple threads running through it which will be described below.
</p>
@@ -74,7 +75,14 @@
</section>
<section>
<title>Programatic Creation of Controls</title>
- <p>
+ <p> The ControlBeanContext is lazily created when possible. When a page flow is created, the page flow is searched
+ for fields with <code>@control</code> annotations. If any of these are found, the <code>ControlBeanContext</code>
+ is created. The shared flow <code>ControlBeanContext</code> is created when the first shared flow containing a
+ control annotation is created.
+ </p>
+ <p> For page flows that want to create a control programmatically using <code>java.beans.Beans.instantiate</code>,
+ you must ensure that the context has been created. The following two lines of code will create the
+ <code>ControlBeanContext</code> and make sure the <code>beginContext</code> method is called correctly.
</p>
<source>
PageFlowControlContainer pfcc =