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 2005/08/17 00:40:28 UTC

svn commit: r233070 - /beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tagsJavascript.xml

Author: dolander
Date: Tue Aug 16 15:40:26 2005
New Revision: 233070

URL: http://svn.apache.org/viewcvs?rev=233070&view=rev
Log:
Update to the JavaScript/Tag doc...


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

Modified: beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tagsJavascript.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tagsJavascript.xml?rev=233070&r1=233069&r2=233070&view=diff
==============================================================================
--- beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tagsJavascript.xml (original)
+++ beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tagsJavascript.xml Tue Aug 16 15:40:26 2005
@@ -35,14 +35,12 @@
                 JavaScript to be written as if the page was a simple page and for it to become part of a composite
                 page without modification.
             </p>
-            <p>The primary </p>
-
         </section>
         <section>
             <title>JSP Tags and Attribute</title>
             <p>This section describes the primary NetUI JSP tags and attributes used to support JavaScript.</p>
             <section id="tagId">
-                <title>TagId</title>
+                <title>tagId</title>
                 <p>The NetUI tags usually do not allow setting the
                     <strong>id</strong> attribute directly.  Instead,
                 the generated HTML elements are given "local" names using the
@@ -59,7 +57,7 @@
                     <strong>id</strong> attributes is done through the
                     <strong>ScriptContainer</strong> tags.  A ScriptContainer can provide either
                 an explicit or a unique implicit name all of the tagId values found in it's
-                decendents.
+                decedents.
                 </p>
                 <p> There are two NetUI JSP tags that are ScriptContainers, &lt;netui:scriptContainer> and
                     &lt;netui:html>.  The ScriptContainer tag represents the basic features.  The Html
@@ -74,9 +72,31 @@
                     for the generated scope.  The <strong>generateIdScope</strong>, when <strong>true</strong>,
                     will cause a unique id scope name to be generated.  This value is unique for the request.
                 </p>
-                <p><strong>Note:</strong> the generated id scope may not be the same from request to request on the same page.</p>
-
+                <p>The NetUI tags dynamically generate JavaScript in certain situations.  One of the tasks of
+                    the ScriptContainer is to gather up the generated JavaScript then render it into the HTML
+                    document.  There isn't a requirement to have a ScriptContainer for most of the JavaScript
+                    enabled features; this includes the lookup methods.  If the ScriptContainer is not present,
+                    the generated
+                    JavaScript will be output inline with the tags.  The result is duplicate JavaScript will be
+                    rendered throughout the page for features like setting <strong>tagId</strong> or image
+                    rollovers.  The advantages of using a ScriptContainer is this JavaScript is not duplicated
+                    and will be written out in a single script block in the generated HTML file.
+                </p>
+                 <p><strong>Note:</strong> the generated id scope may not be the same from request to request on
+                    the same page.  It may change if content preceding the JSP page changes from request to
+                    request, or some conditional logic on the page, such as JSTL, changes the number or order
+                    of ScriptContainers.
+                </p>
             </section>
+            <section id="ScriptBlock">
+                <title>ScriptBlock</title>
+                <p>
+                    The &lt;netui:scriptBlock> tag is used to position user provided JavaScript in relationship
+                    to the framework generated JavaScript.  The tag supports inserting JavaScript before or after
+                    the framework generated JavaScript.  When you want to create valid XHTML or HTML this tag is
+                    required.  [See the HTML Structure and Valid HTML for further explanation.
+                </p>
+           </section>
         </section>
         <section id="simple_example">
             <title>Simple Example</title>
@@ -157,6 +177,19 @@
                 </p>
                 <source>
 &lt;netui:html <strong>generateIdScope="true"</strong>>
+                </source>
+                <p>The source JavaScript in the page is found inside of a ScriptBlock.  The reason for using
+                    a ScriptBlock is to control the placement of the script in relationship to the framework
+                    generated lookup functions.
+                </p>
+                <source>
+&lt;netui:scriptBlock placement="after">
+                </source>
+                <source>
+var form = document.getElementById(lookupIdByTagId("form",scope));
+</source>
+<source>
+check = form[lookupNameByTagId("check",scope)];
                 </source>
             </section>
             <section id="simple_controller">