You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by cr...@apache.org on 2007/02/27 23:41:06 UTC
svn commit: r512464 - in
/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags:
html/HtmlBaseTag.java html/RadioButtonGroup.java html/Select.java
javascript/ScriptContainer.java
Author: crogers
Date: Tue Feb 27 14:41:02 2007
New Revision: 512464
URL: http://svn.apache.org/viewvc?view=rev&rev=512464
Log:
Fixed up some Javadoc and a couple inline comments in the code.
Modified:
beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/HtmlBaseTag.java
beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/RadioButtonGroup.java
beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Select.java
beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/javascript/ScriptContainer.java
Modified: beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/HtmlBaseTag.java
URL: http://svn.apache.org/viewvc/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/HtmlBaseTag.java?view=diff&rev=512464&r1=512463&r2=512464
==============================================================================
--- beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/HtmlBaseTag.java (original)
+++ beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/HtmlBaseTag.java Tue Feb 27 14:41:02 2007
@@ -18,6 +18,9 @@
*/
package org.apache.beehive.netui.tags.html;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+
import org.apache.beehive.netui.tags.AbstractClassicTag;
import org.apache.beehive.netui.tags.IAttributeConsumer;
import org.apache.beehive.netui.tags.IHtmlAttrs;
@@ -27,10 +30,6 @@
import org.apache.beehive.netui.tags.rendering.AbstractHtmlState;
import org.apache.beehive.netui.util.Bundle;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.tagext.Tag;
-
/**
* [Base] Anchor, Form, Image, ImageAnchor (Image), Label, SelectOption
* [FocusBase] Button, CheckBoxOption, ImageButton, RadioButtonOption
@@ -89,10 +88,11 @@
/**
* Set the ID of the tag.
* @param tagId the tagId. A value is required.
- * @jsptagref.attributedescription <p>String value. Sets the <code>id</code> (or <code>name</code>) attribute of the rendered HTML tag.
+ * @jsptagref.attributedescription <p>String value. Sets the <code>id</code>
+ * (or <code>name</code>) attribute of the rendered HTML tag.
* Note that the real id attribute rendered in the browser may be
- * changed by the application container (for example, Portal containers may change
- * the rendered id value to ensure the uniqueness of
+ * changed by the application container (for example, Portal containers may
+ * change the rendered id value to ensure the uniqueness of
* id's on the page). In this case, the real id rendered
* in the browser may be looked up
* through the JavaScript function <code>lookupIdByTagId( tagId, tag )</code>.
@@ -105,7 +105,7 @@
*
* <pre> lookupIdByTagId( "foo", this )</pre>
*
- * <p>To get a <netui:form> element and all of its children elements in JavaScript, use
+ * <p>To get a <netui:form> element and all of its child elements in JavaScript, use
* the same JavaScript function <code>lookupIdByTagId( tagId, tag )</code>. For example,
* assume that there is a <netui:form> whose
* tagId attribute is set to <code>bar</code>.
@@ -434,7 +434,7 @@
* Assumptions:
* <ul>
* <li>The state.name must be fully formed or the "real name" of the form.</li>
- * <li>The state.id is the tagId value set on the tag and <b>has not</b> be rewritten yet to form the "real id"</li>
+ * <li>The state.id is the tagId value set on the tag and <b>has not</b> been rewritten yet to form the "real id"</li>
* </ul>
* @param state
* @param parentForm
Modified: beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/RadioButtonGroup.java
URL: http://svn.apache.org/viewvc/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/RadioButtonGroup.java?view=diff&rev=512464&r1=512463&r2=512464
==============================================================================
--- beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/RadioButtonGroup.java (original)
+++ beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/RadioButtonGroup.java Tue Feb 27 14:41:02 2007
@@ -253,11 +253,13 @@
*/
public boolean isMatched(String value, Boolean defaultValue)
{
- // @todo: there isn't a defaultValue for radio button, what should we do here?
if (value == null)
return false;
if (_match != null)
return value.equals(_match);
+
+ // There isn't a defaultValue for radioButtonOption to override.
+ // Just use the one set on the group.
if (_defaultRadio != null)
return value.equals(_defaultRadio);
@@ -319,8 +321,8 @@
DataAccessProviderStack.addDataAccessProvider(this, pageContext);
}
- //write(results.toString());
- // This is basically this is if enough for 5 options
+
+ // This is basically long enough for 5 options
_saveBody = new InternalStringBuilder(640);
return EVAL_BODY_INCLUDE;
}
@@ -381,7 +383,6 @@
if (_cr == null)
_cr = TagRenderingBase.Factory.getConstantRendering(req);
- //InternalStringBuilder results = new InternalStringBuilder(128);
if (_saveBody != null)
write(_saveBody.toString());
@@ -394,7 +395,6 @@
if (idScript != null)
write(idScript);
- //write(results.toString());
localRelease();
return EVAL_PAGE;
}
@@ -461,7 +461,6 @@
if (idScript != null)
write(idScript);
- //write(results.toString());
localRelease();
return EVAL_PAGE;
}
Modified: beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Select.java
URL: http://svn.apache.org/viewvc/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Select.java?view=diff&rev=512464&r1=512463&r2=512464
==============================================================================
--- beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Select.java (original)
+++ beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Select.java Tue Feb 27 14:41:02 2007
@@ -564,12 +564,12 @@
* Set whether a null option is desired.
* @param nullable the nullable value
* @jsptagref.attributedescription Boolean.
- * Whether a option with the value null should be added to the bottom of the list.
+ * Whether an option with the value null should be added to the bottom of the list.
* If <select> has the multiple <code>attribute</code> set to true, the null option won't be shown.
* @jsptagref.databindable false
* @jsptagref.attributesyntaxvalue <i>boolean_nullable</i>
* @netui:attribute required="false" rtexprvalue="true" type="boolean"
- * description="Whether a option with the value null should be added to the bottom of the list.
+ * description="Whether an option with the value null should be added to the bottom of the list.
* If <select> has the multiple attribute set to true, the null option won't be shown."
*/
public void setNullable(boolean nullable)
Modified: beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/javascript/ScriptContainer.java
URL: http://svn.apache.org/viewvc/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/javascript/ScriptContainer.java?view=diff&rev=512464&r1=512463&r2=512464
==============================================================================
--- beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/javascript/ScriptContainer.java (original)
+++ beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/javascript/ScriptContainer.java Tue Feb 27 14:41:02 2007
@@ -18,26 +18,25 @@
*/
package org.apache.beehive.netui.tags.javascript;
-import org.apache.beehive.netui.util.internal.InternalStringBuilder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import javax.servlet.ServletRequest;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.SimpleTagSupport;
+import javax.servlet.jsp.tagext.Tag;
+import org.apache.beehive.netui.pageflow.scoping.ScopedRequest;
+import org.apache.beehive.netui.pageflow.scoping.ScopedServletUtils;
import org.apache.beehive.netui.tags.AbstractClassicTag;
-import org.apache.beehive.netui.tags.TagConfig;
import org.apache.beehive.netui.tags.RequestUtils;
+import org.apache.beehive.netui.tags.TagConfig;
import org.apache.beehive.netui.tags.rendering.AbstractRenderAppender;
import org.apache.beehive.netui.tags.rendering.ScriptTag;
import org.apache.beehive.netui.tags.rendering.TagRenderingBase;
import org.apache.beehive.netui.tags.rendering.WriteRenderAppender;
-import org.apache.beehive.netui.pageflow.scoping.ScopedRequest;
-import org.apache.beehive.netui.pageflow.scoping.ScopedServletUtils;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.tagext.SimpleTagSupport;
-import javax.servlet.jsp.tagext.Tag;
-import javax.servlet.ServletRequest;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
+import org.apache.beehive.netui.util.internal.InternalStringBuilder;
/**
* Acts as a container that will bundle up JavaScript created by other NetUI tags,
@@ -135,9 +134,10 @@
}
/**
- * Adds a tagID and tagName to the Html's getId javascript function.
- * @param tagId the id of a child tag.
- * @param tagName the name of a child tag.
+ * Adds a tagID and tagName to the map for the legacy get tag name
+ * javascript function.
+ * @param tagId the tagId of a tag.
+ * @param tagName the real name of tag.
*/
public void addLegacyTagIdMappings(String tagId, String tagName)
{
@@ -153,10 +153,11 @@
}
/**
- * This will add the mapping between the tagId and the real name to the NameMap hashmap.
- * @param tagId
- * @param realId
- * @param realName
+ * This will add the mapping between the tagId and the real name to the
+ * NameMap hashmap.
+ * @param tagId the tagId of a tag.
+ * @param realId the real tag id.
+ * @param realName the real name of tag.
*/
public void addTagIdMappings(String tagId, String realId, String realName)
{