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/10/19 17:31:56 UTC

svn commit: r326581 [6/9] - in /beehive/trunk/netui: ant/ src/bootstrap/org/apache/beehive/netui/tools/tld/xdoclet/ src/jar-assembly/ src/pageflow/org/apache/beehive/netui/pageflow/ src/simple-tags/ src/simple-tags/org/ src/simple-tags/org/apache/ src/...

Added: beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Body.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Body.java?rev=326581&view=auto
==============================================================================
--- beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Body.java (added)
+++ beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Body.java Wed Oct 19 08:29:22 2005
@@ -0,0 +1,175 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package org.apache.beehive.netui.simpletags.jsptags;
+
+import org.apache.beehive.netui.simpletags.appender.Appender;
+import org.apache.beehive.netui.simpletags.appender.ResponseAppender;
+import org.apache.beehive.netui.simpletags.behaviors.BodyBehavior;
+
+import javax.servlet.ServletResponse;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.JspFragment;
+import java.io.IOException;
+
+/**
+ * @jsptagref.tagdescription <p>
+ * Renders an HTML &lt;body> tag with the attributes specified.
+ * </p>
+ * @netui:tag name="body" body-content="scriptless" dynamic-attributes="true" description="Output the &lt;body> container.  This tag allows the NetUI framework to output script and errors before the page is finished rendering."
+ */
+public class Body extends HtmlBaseTag
+{
+    public Body() {
+        _behavior = new BodyBehavior();
+    }
+    
+    /**
+     * Sets the onLoad javascript event.
+     * @param onload the onLoad event.
+     * @jsptagref.attributedescription The onLoad JavaScript event.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_onLoad</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The onLoad JavaScript event."
+     */
+    public void setOnLoad(String onload)
+    {
+        ((BodyBehavior) _behavior).setOnLoad(onload);
+    }
+
+    /**
+     * Sets the onUnload javascript event.
+     * @param onunload the onUnload event.
+     * @jsptagref.attributedescription The onLoad JavaScript event.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_onUnload</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The onLoad JavaScript event."
+     */
+    public void setOnUnload(String onunload)
+    {
+        ((BodyBehavior) _behavior).setOnUnload(onunload);
+    }
+
+    /**
+     * Sets the background image of the page.
+     * @param background the background image of the page.
+     * @jsptagref.attributedescription The background image of the page.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_background</i>
+     * @netui:attribute required="false"  rtexprvalue="true"
+     * description="The background image of the page."
+     */
+    public void setBackground(String background)
+    {
+        ((BodyBehavior) _behavior).setBackground(background);
+    }
+
+    /**
+     * Sets the bgcolor of the page.
+     * @param bgcolor the background color of the page.
+     * @jsptagref.attributedescription The background color of the page.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_bgcolor</i>
+     * @netui:attribute required="false"  rtexprvalue="true"
+     * description="The background color of the page."
+     */
+    public void setBgcolor(String bgcolor)
+    {
+        ((BodyBehavior) _behavior).setBgcolor(bgcolor);
+    }
+
+    /**
+     * Sets the foreground text color of the page.
+     * @param text the foreground text color of the page.
+     * @jsptagref.attributedescription The foreground text color of the page.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_text</i>
+     * @netui:attribute required="false"  rtexprvalue="true"
+     * description="The foreground text color of the page."
+     */
+    public void setText(String text)
+    {
+        ((BodyBehavior) _behavior).setText(text);
+    }
+
+    /**
+     * Sets the the color of text marking unvisited hypertext links.
+     * @param link the color of text marking unvisited hypertext links of the page.
+     * @jsptagref.attributedescription The color of text marking unvisited hypertext links of the page
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_link</i>
+     * @netui:attribute required="false"  rtexprvalue="true"
+     * description="The color of text marking unvisited hypertext links of the page."
+     */
+    public void setLink(String link)
+    {
+        ((BodyBehavior) _behavior).setLink(link);
+    }
+
+    /**
+     * Sets the the color of text marking visited hypertext links.
+     * @param vlink the color of text marking visited hypertext links of the page.
+     * @jsptagref.attributedescription The color of text marking visited hypertext links of the page
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_vlink</i>
+     * @netui:attribute required="false"  rtexprvalue="true"
+     * description="The color of text marking visited hypertext links of the page."
+     */
+    public void setVlink(String vlink)
+    {
+        ((BodyBehavior) _behavior).setVlink(vlink);
+    }
+
+    /**
+     * Sets the color of text marking hypertext links when selected by the user.
+     * @param alink the color of text marking hypertext links when selected by the user.
+     * @jsptagref.attributedescription The color of text marking hypertext links when selected by the user
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_alink</i>
+     * @netui:attribute required="false"  rtexprvalue="true"
+     * description="The color of text marking hypertext links when selected by the user."
+     */
+    public void setAlink(String alink)
+    {
+        ((BodyBehavior) _behavior).setAlink(alink);
+    }
+
+    /**
+     * Process the start of the Button.
+     * @throws javax.servlet.jsp.JspException if a JSP exception has occurred
+     */
+    public void doTag() throws JspException, IOException
+    {
+        _behavior.start();
+
+        ServletResponse response = getPageContext().getResponse();
+        Appender appender = new ResponseAppender(response);
+        _behavior.preRender();
+        _behavior.renderStart(appender);
+
+        JspFragment frag = getJspBody();
+        if (frag != null) {
+            frag.invoke(response.getWriter());
+        }
+
+        _behavior.renderEnd(appender);
+        _behavior.postRender();
+        _behavior.terminate();
+    }
+}

Propchange: beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Body.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Button.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Button.java?rev=326581&view=auto
==============================================================================
--- beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Button.java (added)
+++ beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Button.java Wed Oct 19 08:29:22 2005
@@ -0,0 +1,229 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package org.apache.beehive.netui.simpletags.jsptags;
+
+import org.apache.beehive.netui.simpletags.appender.Appender;
+import org.apache.beehive.netui.simpletags.appender.ResponseAppender;
+import org.apache.beehive.netui.simpletags.behaviors.ButtonBehavior;
+import org.apache.beehive.netui.simpletags.html.IHtmlAccessable;
+
+import javax.servlet.jsp.JspException;
+import java.io.IOException;
+
+/**
+ * Generates a button on the page with the specified attributes.  The
+ * &lt;netui:button> tag must be enclosed in &lt;netui:form...> ...
+ * &lt;/netui:form> tags. You can specify the action that the form will
+ * raise on the &lt;netui:form> tag.
+ * @jsptagref.tagdescription Renders an &lt;input type="button"> tag with the specified attributes.
+ * To submit data or invoke a method on the Controller file, the
+ * &lt;netui:button> tag must have a parent {@link Form} tag.
+ * The action attribute on the &lt;netui:button> is for the purpose
+ * of overriding the action attribute on the enclosing &lt;netui:form> tag.
+ * If no action attribute is specified on the &lt;netui:button> tag,
+ * the action attribute
+ * on the &lt;netui:form> tag will determine which action method is invoked.
+ * @example In this sample, the &lt;netui:button> submits data to
+ * the Controller file's <code>processData</code> action method (specified on the &lt;netui:form>'s action
+ * attribute).
+ * <pre>
+ *     &lt;netui:form action="processData">
+ *        &lt;!--
+ *        input elements here
+ *        -->
+ *        &lt;netui:button value="Submit" type="submit"/>
+ *     &lt;/netui:form></pre>
+ * @netui:tag name="button" body-content="scriptless" dynamic-attributes="true" description="Create a button on your JSP page."
+ */
+public class Button extends HtmlFocusBaseTag implements IHtmlAccessable
+{
+    public Button() {
+        _behavior = new ButtonBehavior();
+    }
+
+    /**
+     * Set the name of the action for the Button.
+     * @param action the name of the action to set for the Button.
+     * @jsptagref.attributedescription The action method invoked.  The value of this attribute will override
+     * the <code>action</code>
+     * attribute of the parent &lt;netui:form> tag.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_action</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The action method invoked.  The value of this attribute will override
+     * the action attribute of the parent <netui:form> tag."
+     */
+    public void setAction(String action)
+            throws JspException
+    {
+        ((ButtonBehavior) _behavior).setAction(action);
+    }
+
+    /**
+     * Set the target "scope" for the button's action.  Multiple active page flows may exist concurrently within named
+     * scopes.  This attribute selects which named scope to use.  If omitted, the default scope is assumed.
+     * @param targetScope the name of the target scope in which the associated action's page flow resides.
+     * @jsptagref.attributedescription The target scope in which the associated action's page flow resides.
+     * @jsptagref.databindable true
+     * @jsptagref.attributesyntaxvalue <i>string_targetScope</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The target scope in which the associated action's page flow resides"
+     */
+    public void setTargetScope(String targetScope)
+    {
+        ((ButtonBehavior) _behavior).setTargetScope(targetScope);
+    }
+
+    /**
+     * Set the type of the Button (submit, button, or reset).
+     * @param type the type of the Button.
+     * @jsptagref.attributedescription The type of the button.  Possible values are <code>submit</code>, <code>button</code>, or <code>reset</code>.
+     * The default value is <code>submit</code>.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_type</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The type of the button.  Possible values are submit, button, or reset.
+     * The default value is submit."
+     */
+    public void setType(String type)
+            throws JspException
+    {
+        ((ButtonBehavior) _behavior).setType(type);
+    }
+
+    /**
+     * Set the value of the Button's text.
+     * @param value the value of the Button's text.
+     * @jsptagref.attributedescription The text displayed by the rendered HTML button.
+     * @jsptagref.databindable Read Only
+     * @jsptagref.attributesyntaxvalue <i>string_value</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The text displayed by the rendered HTML button."
+     */
+    public void setValue(String value)
+            throws JspException
+    {
+        ((ButtonBehavior) _behavior).setValue(setNonEmptyValueAttribute(value));
+    }
+
+    /**
+     * Sets the popup indicator.
+     * @param popup whether or not the button should open a popup window.
+     * @jsptagref.attributedescription Boolean.  If <code>popup</code> is set to true,
+     * the button will open a popup window.
+     * @jsptagref.databindable true
+     * @jsptagref.attributesyntaxvalue <i>boolean_popup</i>
+     * @netui:attribute required="false" rtexprvalue="true" type="boolean"
+     * description="If popup is set to true, the button will open a popup window."
+     */
+    public void setPopup(boolean popup)
+    {
+        ((ButtonBehavior) _behavior).setPopup(popup);
+    }
+
+    /**
+     * When true, this button will disable itself before submitting.
+     * @param disableSecondClick when true, this button will disable itself before submitting.
+     * @jsptagref.attributedescription Boolean.  If <code>disableSecondClick</code> is set to true,
+     * the button will disable itself before submitting.
+     * @jsptagref.databindable true
+     * @jsptagref.attributesyntaxvalue <i>boolean_disableSecondClick</i>
+     * @netui:attribute required="false" rtexprvalue="true" type="boolean"
+     * description="When true, this button will disable itself before submitting."
+     */
+    public void setDisableSecondClick(boolean disableSecondClick)
+    {
+        ((ButtonBehavior) _behavior).setDisableSecondClick(disableSecondClick);
+    }
+
+
+    /**
+     * Sets the accessKey attribute value.  This should key value of the
+     * keyboard navigation key.  It is recommended not to use the following
+     * values because there are often used by browsers <code>A, C, E, F, G,
+     * H, V, left arrow, and right arrow</code>.
+     * @param accessKey the accessKey value.
+     * @jsptagref.attributedescription The keyboard navigation key for the element.
+     * The following values are not recommended because they
+     * are often used by browsers: <code>A, C, E, F, G,
+     * H, V, left arrow, and right arrow</code>
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_accessKey</i>
+     * @netui:attribute required="false"  rtexprvalue="true" type="char"
+     * description="The keyboard navigation key for the element.
+     * The following values are not recommended because they
+     * are often used by browsers: A, C, E, F, G,
+     * H, V, left arrow, and right arrow"
+     */
+    public void setAccessKey(char accessKey)
+    {
+        if (accessKey == 0x00)
+            return;
+        ((ButtonBehavior) _behavior).setAccessKey(accessKey);
+    }
+
+    /**
+     * Sets the alt attribute value.
+     * @param alt the alt value.
+     * @jsptagref.attributedescription The alt attribute of the element.
+     * @jsptagref.databindable Read Only
+     * @jsptagref.attributesyntaxvalue <i>string_alt</i>
+     * @netui:attribute required="false"  rtexprvalue="true"
+     * description="The alt attribute of the element."
+     */
+    public void setAlt(String alt)
+    {
+        ((ButtonBehavior) _behavior).setAlt(alt);
+    }
+
+    /**
+     * Sets the tabIndex of the rendered html tag.
+     * @param tabindex the tab index.
+     * @jsptagref.attributedescription The tabIndex of the rendered HTML tag.  This attribute determines the position of the
+     * tag in the sequence of page elements that the user may advance through by pressing the TAB key.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_tabIndex</i>
+     * @netui:attribute required="false" rtexprvalue="true" type="int"
+     * description="The tabIndex of the rendered HTML tag.  This attribute determines the position of the
+     * tag in the sequence of page elements that the user may advance through by pressing the TAB key."
+     */
+    public void setTabindex(int tabindex)
+    {
+        ((ButtonBehavior) _behavior).setTabindex(tabindex);
+    }
+
+    /**
+     * Render the button.
+     * @throws JspException if a JSP exception has occurred
+     */
+    public void doTag() throws JspException, IOException
+    {
+        _behavior.start();
+
+        // The body will override the value if the body is specified.
+        String value = getBufferBody(true);
+        ((ButtonBehavior) _behavior).setValue(value);
+
+        Appender appender = new ResponseAppender(getPageContext().getResponse());
+        _behavior.preRender();
+        _behavior.renderStart(appender);
+        _behavior.renderEnd(appender);
+        _behavior.postRender();
+        _behavior.terminate();
+    }
+}

Propchange: beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Button.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Form.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Form.java?rev=326581&view=auto
==============================================================================
--- beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Form.java (added)
+++ beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Form.java Wed Oct 19 08:29:22 2005
@@ -0,0 +1,433 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package org.apache.beehive.netui.simpletags.jsptags;
+
+import org.apache.beehive.netui.simpletags.appender.Appender;
+import org.apache.beehive.netui.simpletags.appender.ResponseAppender;
+import org.apache.beehive.netui.simpletags.behaviors.FormBehavior;
+
+import javax.servlet.ServletResponse;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.JspFragment;
+import java.io.IOException;
+
+/**
+ * This tag represents an input form, associated with a bean whose
+ * properties correspond to the various fields of the form.
+ * @jsptagref.tagdescription Renders an HTML form that can be submitted to a Java method
+ * in the Controller file for processesing.
+ *
+ * <p><b>Submitting Data</b></p>
+ *
+ * <p>When a &lt;netui:form> is submitted, the form data is passed to a method
+ * for processessing.  The data is passed as a Form Bean instance.
+ * The &lt;netui:form>'s input fields correspond to the properties of the Form Bean.
+ * When the form is submitted the following sequence of events occurs:
+ * (1) a new Form Bean instance is created, (2) the form data is loaded into the
+ * corresponding Form Bean properties,
+ * and (3) the Form Bean instance is passed to the method
+ * where the data is processed.
+ *
+ * <p>The <code>action</code> attribute determines the target method of the submission.
+ * The parameter of the target method determines the Form Bean instance
+ * that carries the submitted data.
+ *
+ * <p>For example, if a &lt;netui:form>'s target method is <code>someAction</code> ...
+ *
+ * <pre>      &lt;netui:form action="<b>someAction</b>">
+ *               //
+ *               // input fields go here
+ *               //
+ *          &lt;netui:button value="Submit" type="submit"/>
+ *      &lt;/netui:form></pre>
+ *
+ * <p>...and the <code>someAction</code> method takes a Form Bean parameter of
+ * type <code>SomeFormBean</code>...
+ *
+ * <pre>     &#x40;Jpf.Action(
+ *        forwards={
+ *            &#x40;Jpf.Forward(name="success", path="showData.jsp")
+ *        }
+ *    )
+ *    protected Forward someAction(<b>SomeFormBean form</b>)</pre>
+ *
+ * <p>...then an instance of <code>SomeFormBean</code> will carry the submitted data.
+ *
+ * <p><b>Pre-populating Form Fields with the Session Object</b></p>
+ *
+ * <p>The <code>name</code>, <code>type</code>, and <code>scope</code> attributes can
+ * be used together to pre-populate
+ * the form fields with default values when they are first rendered in the browser.
+ *
+ * <p>In the Controller file, instantiate the appropriate Form Bean, set default values, and
+ * store the Form Bean instance in the Session object.
+ *
+ * <pre>    protected void onCreate()
+ *    {
+ *      // Create a new Form Bean instance
+ *      ProcessDataForm formInstance = new ProcessDataForm();
+ *
+ *      // Set default values.
+ *      formInstance.setAge(32);
+ *      formInstance.setName("John");
+ *
+ *      // Store the instance in the Session object.
+ *      getSession().setAttribute("defaultValues", formInstance);
+ *    }</pre>
+ *
+ * <p>Then, use the <code>name</code>, <code>type</code>, and <code>scope</code> attributes to pre-populate the
+ * form fields.
+ *
+ * <pre>    &lt;netui:form
+ *        action="processData"
+ *        name="defaultValues"
+ *        type="tagSamples.netui.form.FormController$ProcessDataForm"
+ *        scope="session"></pre>
+ *
+ * <p><b>Note:</b> when the data is submitted, the data is passed as a Request-scoped Form
+ * Bean, *not* as the Session-scoped Form Bean used to pre-populate the fields.  However, you
+ * may pass the data as a Page Flow-scoped Form Bean, if the annotation
+ * <code>{@link org.apache.beehive.netui.pageflow.annotations.Jpf.Action &#64;Jpf.Action}(
+ * {@link org.apache.beehive.netui.pageflow.annotations.Jpf.Action#useFormBean useFormBean}="someFormBeanMemberVariable"
+ * </code>...<code>)</code> is set on the receiving method.
+ *
+ * <p><b>Pre-populating Form Fields By Passing a Form Bean Instance to the JSP Page</b></p>
+ *
+ * <p>As an alternative to the pre-population technique above, you can set the
+ * pre-population values in a Form Bean instance and then pass that instance to the JSP page.
+ * For example, assume that index.jsp contains the &lt;netui:form> and input elements.
+ * The following action method sets the pre-population values in a Form Bean instance
+ * and passes that instance to the
+ * &lt;netui:form> and its input elements.
+ * Note that the Forward object returned by the method has two parameters, the String "success"
+ * and the pre-populated form.
+ *
+ * <pre>     &#x40;Jpf.Action(
+ *        forwards={
+ *            &#x40;Jpf.Forward(name="success", path="index.jsp")
+ *        }
+ *    )
+ *  protected Forward begin(ProcessDataForm form)
+ *  {
+ *      form.setAge(44);
+ *      form.setName("Mark");
+ *      return new Forward("success", form);
+ *  }</pre>
+ * @example In this first sample, the
+ * &lt;netui:form> tag invokes the <code>processData</code>
+ * action method in the Controller file when the form is submitted.
+ * <pre>      &lt;netui:form action="processData">
+ *              Name:
+ *              &lt;netui:textBox dataSource="actionForm.name"/>
+ *              Age:
+ *              &lt;netui:textBox dataSource="actionForm.age"/>
+ *              &lt;netui:button value="Submit" type="submit"/>
+ *      &lt;/netui:form></pre>
+ *
+ * <p> Notice that the processData action method takes a parameter of
+ * type <code>ProcessDataForm</code>.</p>
+ * <pre>     &#x40;Jpf.Action(
+ *        forwards={
+ *            &#x40;Jpf.Forward(name="success", path="showData.jsp")
+ *        }
+ *    )
+ *    protected Forward processData(ProcessDataForm form)
+ *    {
+ *        //
+ *        // Process the submitted data here.
+ *        //
+ *
+ *        return new Forward("success");
+ *    }</pre>
+ *
+ * <p>This means that the submitted data is loaded into an
+ * instance of ProcessDataForm before
+ * it is passed to the action method.
+ *
+ * <p>In this next sample, the form fields are pre-populated based upon default values
+ * stored in the Session object.
+ * <pre>
+ *      &lt;netui:form action="Action" type="corp.Controller$NameBean"
+ *          scope="session" name="nameBean">
+ *          Name: &lt;netui:textBox dataSource="actionForm.name" />
+ *          &lt;netui:button value="Submit"/>
+ *      &lt;/netui:form></pre>
+ * @netui:tag name="form" body-content="scriptless" dynamic-attributes="true" description="Represents an input form, associated with a bean whose properties correspond to the various fields of the form."
+ */
+public class Form extends HtmlBaseTag
+{
+    public Form() {
+        _behavior = new FormBehavior();
+    }
+
+    /**
+     * Return the action of the Form.
+     * @return a String representing the action name of the Form.
+     */
+    public String getAction()
+    {
+        return ((FormBehavior) _behavior).getAction();
+    }
+
+    /**
+     * Set the name of the action for the Form.
+     * @param action the name of the action to set for the Form.
+     * @jsptagref.attributedescription Required. The action method invoked on form submit.  Form data is passed to this method.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_action</i>
+     * @netui:attribute required="true" rtexprvalue="true"
+     * description="The action method invoked on form submit.  Form data is passed to this method."
+     */
+    public void setAction(String action)
+            throws JspException
+    {
+        ((FormBehavior) _behavior).setAction(action);
+    }
+
+    /**
+     * Set the content encoding to be used on a post submit.
+     * @param enctype the content encoding type.
+     * @jsptagref.attributedescription The content encoding to be used on a POST submit.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_enctype</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The content encoding to be used on a POST submit."
+     */
+    public void setEnctype(String enctype)
+    {
+        ((FormBehavior) _behavior).setEnctype(enctype);
+    }
+
+    /**
+     * Set the name of the field to receive focus.
+     * @param focus the focus field name.
+     * @jsptagref.attributedescription The <code>tagID</code> of an input field which should receive initial focus.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_focus</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The tagID of an input field which should receive initial focus."
+     */
+    public void setFocus(String focus)
+    {
+        ((FormBehavior) _behavior).setFocus(setNonEmptyValueAttribute(focus));
+    }
+
+    /**
+     * Get the focus flag.
+     * @return <code>true</code> if the focus has been set.  <code>false</code> otherwise.
+     */
+    public boolean isFocusSet() {
+        return ((FormBehavior) _behavior).isFocusSet();
+    }
+
+    /**
+     * Set the location hash to append to the url.
+     * @param location the location hash
+     * @jsptagref.attributedescription The location hash to append to the URL.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_location</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The location hash to append to the URL."
+     */
+    public void setLocation(String location)
+    {
+        ((FormBehavior) _behavior).setLocation(location);
+    }
+
+    /**
+     * Return the value of the location.
+     * @return  The value of the location.
+     */
+    public String getLocation() {
+        return ((FormBehavior) _behavior).getLocation();
+    }
+
+    /**
+     * Set the request method used when submitting this form.
+     * @param method the request method
+     * @jsptagref.attributedescription The request method used when submitting this form.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_method</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The request method used when submitting this form."
+     */
+    public void setMethod(String method)
+            throws JspException
+    {
+        ((FormBehavior) _behavior).setMethod(method);
+    }
+
+    /**
+     * Set the attribute key under which our associated bean is stored.
+     * @param name the attribute key name
+     * @jsptagref.attributedescription The attribute key under which the associated Form Bean used to populate the input form is stored.
+     * This Form Bean is found in the scope defined by the <code>scope</code> attribute.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_name</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The attribute key under which the associated Form Bean used to populate the input form is stored.
+     * This Form Bean is found in the scope defined by the scope attribute."
+     */
+    public void setBeanName(String name)
+            throws JspException
+    {
+        ((FormBehavior) _behavior).setBeanName(name);
+    }
+
+    /**
+     * Set the target "scope" for the form's action.  Multiple active page flows may exist concurrently within named
+     * scopes.  This attribute selects which named scope to use.  If omitted, the default scope is assumed.
+     * @param targetScope the name of the target scope in which the associated action's page flow resides.
+     * @jsptagref.attributedescription The target scope in which the associated action's page flow resides.
+     * @jsptagref.databindable true
+     * @jsptagref.attributesyntaxvalue <i>string_targetScope</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The target scope in which the associated action's page flow resides"
+     */
+    public void setTargetScope(String targetScope)
+    {
+        ((FormBehavior) _behavior).setTargetScope(targetScope);
+    }
+
+    /**
+     * Sets the onReset javascript event.
+     * @param onReset the onReset event.
+     * @jsptagref.attributedescription The JavaScript onReset event.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_onSubmit</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The JavaScript onReset event."
+     */
+    public void setOnReset(String onReset)
+    {
+        ((FormBehavior) _behavior).setOnReset(onReset);
+    }
+
+    /**
+     * Sets the onSubmit javascript event.
+     * @param onSubmit the onReset event.
+     * @jsptagref.attributedescription The JavaScript onSubmit event.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_onSumbit</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The JavaScript onSubmit event."
+     */
+    public void setOnSubmit(String onSubmit)
+    {
+        ((FormBehavior) _behavior).setOnSubmit(onSubmit);
+    }
+
+    /**
+     * Sets the scope (request or session) under which the associated bean
+     * is stored.
+     * @param scope the scope.
+     * @jsptagref.attributedescription The scope (<code>request</code> or <code>session</code>) under which the associated Form Bean
+     * used to populate the form input fields is stored.
+     * Using the <code>name</code>, <code>type</code>  and <code>scope</code> attributes defines
+     * the Form Bean used.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_scope</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The scope (request or session) under which the associated Form Bean
+     * used to populate the form input fields is stored.
+     * Using the name, type  and scope attributes defines
+     * the Form Bean used."
+     */
+    public void setBeanScope(String scope)
+            throws JspException
+    {
+        ((FormBehavior) _behavior).setBeanScope(scope);
+    }
+
+    /**
+     * Sets the window target.
+     * @param target the window target.
+     * @jsptagref.attributedescription The window target
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_windowTarget</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The window target"
+     */
+    public void setTarget(String target)
+    {
+        ((FormBehavior) _behavior).setTarget(target);
+    }
+
+    /**
+     * Sets the Java class name of the bean to be created, if necessary.
+     * @param type the class name
+     * @jsptagref.attributedescription The Java class name of the Form Bean to be created, if necessary.
+     * This Form Bean will be created if the <code>name</code> and <code>scope</code> attributes are set.
+     * The Form Bean is then used to populate the form input fields.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_type</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The Java class name of the Form Bean to be created, if necessary.
+     * This Form Bean will be created if the name and scope attributes are set.
+     * The Form Bean is then used to populate the form input fields."
+     */
+    public void setBeanType(String type)
+            throws JspException
+    {
+        ((FormBehavior) _behavior).setBeanType(type);
+    }
+
+    /**
+     * Generate the JavaScript which will submit a form.  This is usually generated if the
+     * form contains anchors that are used to submit the form.  This will make sure the JavaScript is
+     * always generated.
+     * @param formSubmit boolean value indicating that the form submit JavaScript should be generated.  Default is false.
+     * @jsptagref.attributedescription Generate the form submit JavaScript even if the form does not
+     * contain anchors. Default is <code>false</code>.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>boolean_formSubmit</i>
+     * @netui:attribute required="false" rtexprvalue="true" type="boolean"
+     * description="Generate the form submit JavaScript even if the form does not contain anchors."
+     */
+    public void setGenJavaScriptFormSubmit(boolean formSubmit)
+    {
+        ((FormBehavior) _behavior).setGenJavaScriptFormSubmit(formSubmit);
+    }
+
+    //********************************************* Do the Work  *******************************************************
+    /**
+     * Render the beginning of this form.
+     * @throws JspException if a JSP exception has occurred
+     */
+    public void doTag() throws JspException, IOException
+    {
+        _behavior.start();
+
+        // The form requires the pageContext...
+        ((FormBehavior) _behavior).setPageContext(getPageContext());
+
+        ServletResponse response = getPageContext().getResponse();
+        Appender appender = new ResponseAppender(response);
+        _behavior.preRender();
+        _behavior.renderStart(appender);
+
+        JspFragment frag = getJspBody();
+        if (frag != null) {
+            frag.invoke(response.getWriter());
+        }
+
+        _behavior.renderEnd(appender);
+        _behavior.postRender();
+        _behavior.terminate();
+    }
+}

Propchange: beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Form.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/FormatDate.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/FormatDate.java?rev=326581&view=auto
==============================================================================
--- beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/FormatDate.java (added)
+++ beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/FormatDate.java Wed Oct 19 08:29:22 2005
@@ -0,0 +1,217 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package org.apache.beehive.netui.simpletags.jsptags;
+
+import org.apache.beehive.netui.simpletags.behaviors.formatting.DateFormatter;
+import org.apache.beehive.netui.simpletags.core.IFormattable;
+import org.apache.beehive.netui.simpletags.core.TagContext;
+import org.apache.beehive.netui.simpletags.core.services.BehaviorStack;
+import org.apache.beehive.netui.simpletags.util.ContextUtils;
+
+import javax.servlet.jsp.JspException;
+
+/**
+ * A formatter used to format dates.  This formatter uses patterns that conform to
+ * <code>java.text.SimpleDateFormat</code> pattern syntax.  Valid types for formatting are:
+ * <ul>
+ * <li>String</li>
+ * <li>java.sql.Date</li>
+ * <li>java.util.Date</li>
+ * <li>java.util.Calendar</li>
+ * </ul>
+ *
+ * <p>
+ * If the type is a String, we attempt to create a date out of the String.  The
+ * String must be defined by a common format list below.  If the string is
+ * equal the the empty string, it will be returned as the empty string.  See
+ * java.text.SimpleDateFormat for more information.
+ * <p>
+ * The valid formats are:
+ * <ul>
+ * <li>MM/dd/yy</li>
+ * <li>yyyy-MM-dd</li>
+ * <li>MMddyy</li>
+ * <li>and the local default</li>
+ * </ul>
+ * @jsptagref.tagdescription A formatter used to format dates.  This formatter uses patterns that conform to
+ * {@link java.text.SimpleDateFormat java.text.SimpleDateFormat} pattern syntax.
+ * Valid types for formatting are:
+ * <blockquote>
+ * <ul>
+ * <li>String</li>
+ * <li>java.sql.Date</li>
+ * <li>java.util.Date</li>
+ * <li>java.util.Calendar</li>
+ * </ul>
+ * </blockquote>
+ *
+ * <p>The &lt;netui:formatDate> tag formats the output of its parent tag.  For example:
+ *
+ * <pre>    &lt;netui:content value="${pageScope.euroDate}">
+ *        &lt;netui:formatDate pattern="dd-MM-yyyy" />
+ *    &lt;/netui:content></pre>
+ *
+ * <p>
+ * The following table summarizes the pattern letters that can be used.
+ * <table border=0 cellspacing=3 cellpadding=0>
+ * <tr bgcolor="#ccccff">
+ * <th align=left>Letter
+ * <th align=left>Date or Time Component
+ * <th align=left>Examples
+ * <tr>
+ * <td><code>G</code>
+ * <td>Era designator
+ * <td><code>AD</code>
+ * <tr bgcolor="#eeeeff">
+ * <td><code>y</code>
+ * <td>Year
+ * <td><code>1996</code>; <code>96</code>
+ * <tr>
+ * <td><code>M</code>
+ * <td>Month in year
+ * <td><code>July</code>; <code>Jul</code>; <code>07</code>
+ * <tr bgcolor="#eeeeff">
+ * <td><code>w</code>
+ * <td>Week in year
+ * <td><code>27</code>
+ * <tr>
+ * <td><code>W</code>
+ * <td>Week in month
+ * <td><code>2</code>
+ * <tr bgcolor="#eeeeff">
+ * <td><code>D</code>
+ * <td>Day in year
+ * <td><code>189</code>
+ * <tr>
+ * <td><code>d</code>
+ * <td>Day in month
+ * <td><code>10</code>
+ * <tr bgcolor="#eeeeff">
+ * <td><code>F</code>
+ * <td>Day of week in month
+ * <td><code>2</code>
+ * <tr>
+ * <td><code>E</code>
+ * <td>Day in week
+ * <td><code>Tuesday</code>; <code>Tue</code>
+ * <tr bgcolor="#eeeeff">
+ * <td><code>a</code>
+ * <td>Am/pm marker
+ * <td><code>PM</code>
+ * <tr>
+ * <td><code>H</code>
+ * <td>Hour in day (0-23)
+ * <td><code>0</code>
+ * <tr bgcolor="#eeeeff">
+ * <td><code>k</code>
+ * <td>Hour in day (1-24)
+ * <td><code>24</code>
+ * <tr>
+ * <td><code>K</code>
+ * <td>Hour in am/pm (0-11)
+ * <td><code>0</code>
+ * <tr bgcolor="#eeeeff">
+ * <td><code>h</code>
+ * <td>Hour in am/pm (1-12)
+ * <td><code>12</code>
+ * <tr>
+ * <td><code>m</code>
+ * <td>Minute in hour
+ * <td><code>30</code>
+ * <tr bgcolor="#eeeeff">
+ * <td><code>s</code>
+ * <td>Second in minute
+ * <td><code>55</code>
+ * <tr>
+ * <td><code>S</code>
+ * <td>Millisecond
+ * <td><code>978</code>
+ * <tr bgcolor="#eeeeff">
+ * <td><code>z</code>
+ * <td>Time zone
+ * <td><code>Pacific Standard Time</code>; <code>PST</code>; <code>GMT-08:00</code>
+ * <tr>
+ * <td><code>Z</code>
+ * <td>Time zone
+ * <td><code>-0800</code>
+ * </table>
+ * </p>
+ *
+ * The number of pattern letters used determines the final presentation.  For example,
+ * yy specifies a 2 digit year, while yyyy specifies a four digit year.  For detailed information see
+ * {@link java.text.SimpleDateFormat java.text.SimpleDateFormat}.
+ *
+ * <p>
+ * If the input type is a String, &lt;netui:formatDate> attempts to
+ * convert the String into a java.util.Date object before formatting.
+ * For the conversion to succeed, the
+ * String must conform to a format listed below.
+ * <p>
+ * The valid formats are:
+ * <blockquote>
+ * <ul>
+ * <li>MM/dd/yy</li>
+ * <li>yyyy-MM-dd</li>
+ * <li>MMddyy</li>
+ * <li>the local default</li>
+ * </ul>
+ * </blockquote>
+ * @example In this sample, the &lt;netui:span> tag's output will be formatted to something like 08/29/1957.
+ * <pre>    &lt;netui:span value="${pageScope.today}">
+ *        &lt;netui:formatDate pattern="MM/dd/yyyy" />
+ *    &lt;/netui:span></pre>
+ * @netui:tag name="formatDate" body-content="empty" description="A formatter used to format dates."
+ */
+public class FormatDate extends FormatTag
+{
+    public FormatDate()
+    {
+        _formatter = new DateFormatter();
+    }
+
+    /**
+     * Set the pattern to use to convert a String value into a date.  This
+     * will be used before the common formats.
+     * @param inputPattern the pattern representing the string input
+     * @jsptagref.attributedescription The pattern used to convert a String value into a date.
+     * @jsptagref.databindable Read Only
+     * @jsptagref.attributesyntaxvalue <i>string_stringInputPattern</i>
+     * @netui:attribute required="false"  rtexprvalue="true"
+     * description="The pattern used to convert a String value into a date."
+     */
+    public void setStringInputPattern(String inputPattern)
+            throws JspException
+    {
+        ((DateFormatter) _formatter).setStringInputPattern(inputPattern);
+    }
+
+    /**
+     * Create the internal Formatter instance and perform the formatting.
+     * @throws JspException if a JSP exception has occurred
+     */
+    public void doTag()
+            throws JspException
+    {
+        // @todo: how are we going to report errors if no IFormattable is found?
+        TagContext tagCtxt = ContextUtils.getTagContext();
+        BehaviorStack behaviors = tagCtxt.getBehaviorStack();
+        IFormattable formattable = (IFormattable) behaviors.findAncestorWithClass(null, IFormattable.class);
+        if (formattable != null)
+            formattable.addFormatter(_formatter);
+    }
+}

Propchange: beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/FormatDate.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/FormatTag.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/FormatTag.java?rev=326581&view=auto
==============================================================================
--- beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/FormatTag.java (added)
+++ beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/FormatTag.java Wed Oct 19 08:29:22 2005
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package org.apache.beehive.netui.simpletags.jsptags;
+
+import org.apache.beehive.netui.simpletags.behaviors.formatting.Formatter;
+
+import javax.servlet.jsp.JspException;
+
+/**
+ * Abstract base class for formatting tags.  Provides the basic formatting properties,
+ * as well as the base for the internal FormatTag.Formatter class.
+ */
+public abstract class FormatTag extends AbstractSimpleTag
+{
+    protected Formatter _formatter;
+
+    /**
+     * Sets the language code for the locale.
+     * @param language the language code
+     * @jsptagref.attributedescription Sets the language code for the locale.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_language</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="Sets the language code for the locale."
+     */
+    public void setLanguage(String language)
+    {
+        _formatter.setLanguage(setNonEmptyValueAttribute(language));
+    }
+
+    /**
+     * Sets the country code for the locale.
+     * @param country the country code
+     * @jsptagref.attributedescription Sets the country code for the locale.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_country</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="Sets the country code for the locale."
+     */
+    public void setCountry(String country)
+    {
+        _formatter.setCountry(setNonEmptyValueAttribute(country));
+    }
+
+    /**
+     * Sets the pattern to be used by this FormatTag.
+     * @param pattern the pattern to be used
+     * @jsptagref.attributedescription Sets the pattern to be used by this format tag.
+     * (See the tag description)
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_pattern</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="Sets the pattern to be used by this FormatTag."
+     */
+    public void setPattern(String pattern)
+            throws JspException
+    {
+        _formatter.setPattern(pattern);
+    }
+}

Propchange: beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/FormatTag.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Html.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Html.java?rev=326581&view=auto
==============================================================================
--- beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Html.java (added)
+++ beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Html.java Wed Oct 19 08:29:22 2005
@@ -0,0 +1,124 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package org.apache.beehive.netui.simpletags.jsptags;
+
+import org.apache.beehive.netui.simpletags.appender.Appender;
+import org.apache.beehive.netui.simpletags.appender.ResponseAppender;
+import org.apache.beehive.netui.simpletags.behaviors.HtmlBehavior;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.DynamicAttributes;
+import javax.servlet.jsp.tagext.JspFragment;
+import javax.servlet.ServletResponse;
+
+/**
+ * Generates the html element and performs error handling within its body.
+ * @jsptagref.tagdescription <p>
+ * Renders an &lt;html> tag.
+ * </p>
+ * @example In this sample, the &lt;netui:html> tag uses the default locale and the direction of the HTML is
+ * left-to-right (LTR).
+ * <pre>&lt;netui:html dir="LTR" useLocale="true"  /></pre>
+ *
+ * @netui:tag name="html" body-content="scriptless" dynamic-attributes="true" description="Generates the html element and performs error handling within its body."
+ */
+public class Html extends ScriptContainer implements DynamicAttributes
+{
+
+    public Html() {
+        _behavior = new HtmlBehavior();
+    }
+
+    /////////////////////////// Attributes ////////////////////////////
+
+    /**
+     * Sets the dir value of the html.
+     * @param dir the direction of text, "LTR" or "RTL"
+     * @jsptagref.attributedescription Specifies the direction of text. (<code>LTR | RTL</code>)
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_dir</i>
+     * @netui:attribute required="false"  rtexprvalue="true"
+     * description="Sets the dir value (ltr or rtl) of the html."
+     */
+    public void setDir(String dir)
+    {
+        ((HtmlBehavior) _behavior).setDir(dir);
+    }
+
+    /**
+     * Gets whether the default locale's language should be used.
+     * @return true or false
+     */
+    public boolean isUseLocale()
+    {
+        return ((HtmlBehavior) _behavior).isUseLocale();
+    }
+
+    /**
+     * Sets whether the default locale's language should be used.
+     * @param locale true or false
+     * @jsptagref.attributedescription Sets whether the default locale's language should be used.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>boolean_locale</i>
+     * @netui:attribute required="false" rtexprvalue="true" type="boolean"
+     * description="Sets whether the default locale's language should be used."
+     */
+    public void setUseLocale(boolean locale)
+    {
+        ((HtmlBehavior) _behavior).setUseLocale(locale);
+    }
+
+    /**
+     * Set the document type (html4-loose or xhtml1-transitional) of the document.
+     * @jsptagref.attributedescription Set the document type (html4-loose or xhtml1-transitional) of the document.
+     * The default is html4-loose-quirks.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_doctype</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="Set the document type (html4-loose or xhtml1-transitional) of the document."
+     */
+    public void setDocumentType(String docType)
+    {
+        ((HtmlBehavior) _behavior).setDocumentType(docType);
+    }
+
+    public void doTag()
+            throws JspException, java.io.IOException
+    {
+        _behavior.start();
+
+        ServletResponse response = getPageContext().getResponse();
+        Appender appender = new ResponseAppender(response);
+        _behavior.preRender();
+        _behavior.renderStart(appender);
+
+        JspFragment frag = getJspBody();
+        if (frag != null) {
+            frag.invoke(response.getWriter());
+        }
+
+        _behavior.renderEnd(appender);
+        _behavior.postRender();
+        _behavior.terminate();
+    }
+
+    public void setDynamicAttribute(String uri, String localName, Object value) throws JspException
+    {
+        ((HtmlBehavior) _behavior).setAttribute(localName, value.toString(), uri);
+    }
+}

Propchange: beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Html.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/HtmlBaseTag.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/HtmlBaseTag.java?rev=326581&view=auto
==============================================================================
--- beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/HtmlBaseTag.java (added)
+++ beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/HtmlBaseTag.java Wed Oct 19 08:29:22 2005
@@ -0,0 +1,328 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package org.apache.beehive.netui.simpletags.jsptags;
+
+import org.apache.beehive.netui.simpletags.behaviors.HtmlBaseBehavior;
+import org.apache.beehive.netui.simpletags.html.HtmlConstants;
+import org.apache.beehive.netui.simpletags.html.IHtmlAttrs;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.DynamicAttributes;
+
+/**
+ * [Base] Anchor, Form, Image, ImageAnchor (Image), Label, SelectOption
+ * [FocusBase] Button, CheckBoxOption, ImageButton, RadioButtonOption
+ * [DataSource] FileUpload
+ * [DefaultableDatSource] CheckBox, TextArea, TextBox
+ * [OptionsDataSource] Select
+ * [GroupDataSource] CheckBoxGroup, RadioButtonGroup
+ */
+abstract public class HtmlBaseTag extends AbstractSimpleTag
+        implements HtmlConstants, DynamicAttributes, IHtmlAttrs
+{
+    //***************************** The IHtmlCore properties *********************************/
+
+    /**
+     * Sets the style of the rendered html tag.
+     * @param style the html style.
+     * @jsptagref.attributedescription Specifies style information for the current element.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_style</i>
+     * @netui:attribute required="false"  rtexprvalue="true"
+     * description="Specifies style information for the current element."
+     */
+    public void setStyle(String style)
+    {
+        ((HtmlBaseBehavior) _behavior).setStyle(style);
+    }
+
+    /**
+     * Sets the style class of the rendered html tag.
+     * @param styleClass the html style class.
+     * @jsptagref.attributedescription The style class (a style sheet selector).
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_styleClass</i>
+     * @netui:attribute required="false"  rtexprvalue="true"
+     * description="The style class (a style sheet selector)."
+     */
+    public void setStyleClass(String styleClass)
+    {
+        ((HtmlBaseBehavior) _behavior).setStyleClass(styleClass);
+    }
+
+    /**
+     * 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.
+     * 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
+     * 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>.
+     *
+     * <p>For example, assume that some tag's <code>tagId</code> attribute is set to <code>foo</code>.
+     *
+     * <pre>    &lt;netui:textBox <b>tagId="foo"</b> /></pre>
+     *
+     * <p>Then the following JavaScript function will return the real id attribute rendered in the browser:
+     *
+     * <pre>    lookupIdByTagId( "foo", this )</pre>
+     *
+     * <p>To get a &lt;netui:form> element and all of its children elements in JavaScript, use
+     * the same JavaScript function <code>lookupIdByTagId( tagId, tag )</code>.  For example,
+     * assume that there is a &lt;netui:form> whose
+     * tagId attribute is set to <code>bar</code>.
+     *
+     * <pre>    &lt;netui:form <b>tagId="bar"</b> ></pre>
+     *
+     * <p>Then the following JavaScript function will return the &lt;netui:form> element
+     * and its children (packaged as an array).
+     *
+     * <pre>    document[lookupIdByTagId( "bar", this )]</pre>
+     *
+     * <p>To retreive the value entered into a &lt;netui:textBox> within the &lt;netui:form> tag, use the following
+     * JavaScript expression.
+     *
+     * <pre>    document[lookupIdByTagId("bar", this)][lookupIdByTagId("foo", this)].value</pre>
+     *
+     * <p>The second parameter ensures that the JavaScript function
+     * begins its search within the correct Portlet scope.  Pass the
+     * JavaScript keyword <code>this</code> as the second parameter.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_tagId</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="String value. Sets the id (or name) attribute of the rendered HTML tag. "
+     */
+    public void setTagId(String tagId)
+            throws JspException
+    {
+        ((HtmlBaseBehavior) _behavior).setTagId(setRequiredValueAttribute(tagId, "tagId"));
+    }
+
+    /**
+     * Return the ID of the tag.  The id may be rewritten by the container (such
+     * as a portal) to make sure it is unique.  JavaScript my lookup the actual id
+     * of the element by looking it up in the <code>netui_names</code> table written
+     * into the HTML.
+     * @return the tagId.
+     */
+    public String getTagId()
+    {
+        return ((HtmlBaseBehavior) _behavior).getTagId();
+    }
+
+    /**
+     * Sets the value of the title attribute.
+     * @param title
+     * @jsptagref.attributedescription The title.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_title</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The title. "
+     */
+    public void setTitle(String title)
+    {
+        ((HtmlBaseBehavior) _behavior).setTitle(title);
+    }
+
+    /******************** the HtmlI18n properties ******************************************/
+    /**
+     * Sets the lang attribute for the HTML element.
+     * @param lang
+     * @jsptagref.attributedescription Sets the language code for the base language of an
+     * element's attribute values and text content.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_lang</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="Sets the language code for the base language of an element's attribute values and text content."
+     */
+    public void setLang(String lang)
+    {
+        ((HtmlBaseBehavior) _behavior).setLang(lang);
+    }
+
+    /**
+     * Sets the dir attribute for the HTML element.
+     * @param dir
+     * @jsptagref.attributedescription Specifies the direction of text. (<code>LTR | RTL</code>)
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_dir</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="Specifies the direction of text. (LTR | RTL)"
+     */
+    public void setDir(String dir)
+    {
+        ((HtmlBaseBehavior) _behavior).setDir(dir);
+    }
+
+    //******************* the HtmlEvent Properties  ****************************************
+    /**
+     * Gets the onClick javascript event.
+     * @return the onClick event.
+     */
+    public String getOnClick()
+    {
+        return ((HtmlBaseBehavior) _behavior).getOnClick();
+    }
+
+    /**
+     * Sets the onClick javascript event.
+     * @param onclick the onClick event.
+     * @jsptagref.attributedescription The onClick JavaScript event.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_onClick</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The onClick JavaScript event."
+     */
+    public void setOnClick(String onclick)
+    {
+        ((HtmlBaseBehavior) _behavior).setOnClick(onclick);
+    }
+
+    /**
+     * Sets the onDblClick javascript event.
+     * @param ondblclick the onDblClick event.
+     * @jsptagref.attributedescription The onDblClick JavaScript event.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_onDblClick</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The onDblClick JavaScript event."
+     */
+    public void setOnDblClick(String ondblclick)
+    {
+        ((HtmlBaseBehavior) _behavior).setOnDblClick(ondblclick);
+    }
+
+    /**
+     * Sets the onKeyDown javascript event.
+     * @param onkeydown the onKeyDown event.
+     * @jsptagref.attributedescription The onKeyDown JavaScript event.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_onKeyDown</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The onKeyDown JavaScript event."
+     */
+    public void setOnKeyDown(String onkeydown)
+    {
+        ((HtmlBaseBehavior) _behavior).setOnKeyDown(onkeydown);
+    }
+
+    /**
+     * Sets the onKeyPress javascript event.
+     * @param onkeypress the onKeyPress event.
+     * @jsptagref.attributedescription The onKeyPress JavaScript event.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_onKeyPress</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The onKeyPress JavaScript event."
+     */
+    public void setOnKeyPress(String onkeypress)
+    {
+        ((HtmlBaseBehavior) _behavior).setOnKeyPress(onkeypress);
+    }
+
+    /**
+     * Sets the onKeyUp javascript event.
+     * @param onkeyup the onKeyUp event.
+     * @jsptagref.attributedescription The onKeyUp JavaScript event.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_onKeyUp</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The onKeyUp JavaScript event."
+     */
+    public void setOnKeyUp(String onkeyup)
+    {
+        ((HtmlBaseBehavior) _behavior).setOnKeyUp(onkeyup);
+    }
+
+    /**
+     * Sets the onMouseDown javascript event.
+     * @param onmousedown the onMouseDown event.
+     * @jsptagref.attributedescription The onMouseDown JavaScript event.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_onMouseDown</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The onMouseDown JavaScript event."
+     */
+    public void setOnMouseDown(String onmousedown)
+    {
+        ((HtmlBaseBehavior) _behavior).setOnMouseDown(onmousedown);
+    }
+
+    /**
+     * Sets the onMouseMove javascript event.
+     * @param onmousemove the onMouseMove event.
+     * @jsptagref.attributedescription The onMouseMove JavaScript event.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_onMouseMove</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The onMouseMove JavaScript event."
+     */
+    public void setOnMouseMove(String onmousemove)
+    {
+        ((HtmlBaseBehavior) _behavior).setOnMouseMove(onmousemove);
+    }
+
+    /**
+     * Sets the onMouseOut javascript event.
+     * @param onmouseout the onMouseOut event.
+     * @jsptagref.attributedescription The onMouseOut JavaScript event.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_onMouseOut</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The onMouseOut JavaScript event."
+     */
+    public void setOnMouseOut(String onmouseout)
+    {
+        ((HtmlBaseBehavior) _behavior).setOnMouseOut(onmouseout);
+    }
+
+    /**
+     * Sets the onMouseOver javascript event.
+     * @param onmouseover the onMouseOver event.
+     * @jsptagref.attributedescription The onMouseOver JavaScript event.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_onMouseOver</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The onMouseOver JavaScript event."
+     */
+    public void setOnMouseOver(String onmouseover)
+    {
+        ((HtmlBaseBehavior) _behavior).setOnMouseOver(onmouseover);
+    }
+
+    /**
+     * Sets the onMouseUp javascript event.
+     * @param onmouseup the onMouseUp event.
+     * @jsptagref.attributedescription The onMouseUp JavaScript event.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_onMouseUp</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The onMouseUp JavaScript event."
+     */
+    public void setOnMouseUp(String onmouseup)
+    {
+        ((HtmlBaseBehavior) _behavior).setOnMouseUp(onmouseup);
+    }
+
+    public void setDynamicAttribute(String uri, String localName, Object value) throws JspException
+    {
+        ((HtmlBaseBehavior) _behavior).setAttribute(localName, value.toString(), uri);
+    }
+}

Propchange: beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/HtmlBaseTag.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/HtmlDataSourceTag.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/HtmlDataSourceTag.java?rev=326581&view=auto
==============================================================================
--- beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/HtmlDataSourceTag.java (added)
+++ beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/HtmlDataSourceTag.java Wed Oct 19 08:29:22 2005
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package org.apache.beehive.netui.simpletags.jsptags;
+
+import org.apache.beehive.netui.simpletags.behaviors.HtmlDataSourceBehavior;
+
+/**
+ * Abstract Base class adding support for the <code>dataSource</code> attribute.
+ */
+abstract public class HtmlDataSourceTag
+        extends HtmlFocusBaseTag
+{
+    /**
+     * Sets the tag's data source (can be an expression).
+     * @param dataSource the data source
+     * @jsptagref.attributedescription <p>The <code>dataSource</code> attribute determines both
+     * (1) the source of populating data for the tag and
+     * (2) the object to which the tag submits data.
+     *
+     * <p>For example, assume that the Controller file (= JPF file) contains
+     * a Form Bean with the property foo.  Then the following &lt;netui:textBox> tag will
+     * (1) draw populating data from the Form Bean's foo property and (2)
+     * submit user defined data to the same property.
+     *
+     * <p>&nbsp;&nbsp;&nbsp;&nbsp;<code>&lt;netui:textBox dataSource="actionForm.foo" /></code>
+     *
+     * <p>The <code>dataSource</code> attribute takes either a data binding expression or
+     * the name of a Form Bean property.  In the
+     * above example, <code>&lt;netui:textBox dataSource="foo" /></code>
+     * would have the exactly same behavior.
+     *
+     * <p>When the tag is used to submit data, the data binding expression must
+     * refer to a Form Bean property.
+     * In cases where the tag is not used to submit data, but is used for
+     * displaying data only, the data
+     * binding expression need not refer to a Form Bean property.  For example,
+     * assume that myIterativeData is a member variable on
+     * the Controller file ( = JPF file).  The following &lt;netui-data:repeater>
+     * tag draws its data from myIterativeData.
+     *
+     * <p>&nbsp;&nbsp;&nbsp;&nbsp;<code>&lt;netui-data:repeater dataSource="pageFlow.myIterativeData"></code>
+     * @jsptagref.databindable true
+     * @jsptagref.attributesyntaxvalue <i>expression_datasource</i>
+     * @netui:attribute required="true"
+     * description="The <code>dataSource</code> attribute determines both
+     * the source of populating data for the tag and
+     * the object to which the tag submits data."
+     */
+    public void setDataSource(String dataSource)
+    {
+        ((HtmlDataSourceBehavior) _behavior).setDataSource(dataSource);
+    }
+}

Propchange: beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/HtmlDataSourceTag.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/HtmlDefaultableDataSourceTag.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/HtmlDefaultableDataSourceTag.java?rev=326581&view=auto
==============================================================================
--- beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/HtmlDefaultableDataSourceTag.java (added)
+++ beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/HtmlDefaultableDataSourceTag.java Wed Oct 19 08:29:22 2005
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package org.apache.beehive.netui.simpletags.jsptags;
+
+import org.apache.beehive.netui.simpletags.behaviors.HtmlDefaultableDataSourceBehavior;
+
+import javax.servlet.jsp.JspException;
+
+/**
+ * Abstract base class extending the <code>HtmlDataSourceTag</code> and adding support
+ * for the <code>defaultValue</code> attribute.
+ */
+abstract public class HtmlDefaultableDataSourceTag
+        extends HtmlDataSourceTag
+{
+    /**
+     * Sets the default value (can be an expression).
+     * @param defaultValue the default value
+     * @jsptagref.attributedescription <p><b>Use in &lt;netui:checkBoxGroup>, &lt;netui:checkBox>,
+     * &lt;netui:radioButtonGroup>, and &lt;netui:select> tags</b></p>
+     * <p>Sets the preselected value or values.
+     * <p>The <code>defaultValue</code> attribute takes either a String literal or
+     * a data binding expression.
+     * <p>If the <code>defaultValue</code> attribute has a String value (or if
+     * the data binding expression points to a String), then a single value
+     * will be preselected.
+     * <p>If the <code>defaultValue</code> attribute points to a String[] object
+     * (or any object which can be iterated over), then
+     * multiple values will be preselected.
+     *
+     *
+     * <p><b>Use in &lt;netui:textArea> and &lt;netui:textBox> tags</b></p>
+     * <p>Sets the initial display text.</p>
+     * <p>The <code>defaultValue</code> attribute takes either a String literal or
+     * a data binding expression that points to a String.
+     * @jsptagref.databindable Read / Write
+     * @jsptagref.attributesyntaxvalue <i>string_or_expression_default</i>
+     * @netui:attribute required="false" rtexprvalue="true"  type="java.lang.Object"
+     * description="Sets the default value of the control which is used if the object bound to is null."
+     */
+    public void setDefaultValue(Object defaultValue)
+            throws JspException
+    {
+        ((HtmlDefaultableDataSourceBehavior) _behavior).setDefaultValue(defaultValue);
+    }
+}

Propchange: beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/HtmlDefaultableDataSourceTag.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/HtmlFocusBaseTag.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/HtmlFocusBaseTag.java?rev=326581&view=auto
==============================================================================
--- beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/HtmlFocusBaseTag.java (added)
+++ beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/HtmlFocusBaseTag.java Wed Oct 19 08:29:22 2005
@@ -0,0 +1,102 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package org.apache.beehive.netui.simpletags.jsptags;
+
+import org.apache.beehive.netui.simpletags.behaviors.HtmlFocusBaseBehavior;
+
+/**
+ * Abstract base class which implements support for the input tag.  This class introduces the following
+ * event attributes which are found on the &lt;input> element: <code>onblur</code>, <code>onfocus</code>,
+ * <code>onchange</code>, <code>onselect</code>.  In addition, the <code>disable</code> attribute
+ * is added.
+ */
+abstract public class HtmlFocusBaseTag extends HtmlBaseTag
+{
+    /**
+     * Set the disable state either with the literal "true" or "false"
+     * or with an expression.
+     * @param disabled true or false or an expression
+     * @jsptagref.attributedescription Set the disable state either with the literal "true"
+     * or "false" or with an expression.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>boolean_disabled</i>
+     * @netui:attribute required="false" rtexprvalue="true" type="boolean"
+     * description="Set the disable state either with the literal "true" or "false"
+     * or with an expression."
+     */
+    public void setDisabled(boolean disabled)
+    {
+        ((HtmlFocusBaseBehavior) _behavior).setDisabled(disabled);
+    }
+
+    /**
+     * Sets the onBlur javascript event.
+     * @param onblur the onBlur event.
+     * @jsptagref.attributedescription The onBlur JavaScript event.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_onBlur</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="Sets the onBlur javascript event."
+     */
+    public void setOnBlur(String onblur)
+    {
+        ((HtmlFocusBaseBehavior) _behavior).setOnBlur(onblur);
+    }
+
+    /**
+     * Sets the onFocus javascript event.
+     * @param onfocus the onFocus event.
+     * @jsptagref.attributedescription The onFocus JavaScript event.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_onFocus</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="Sets the onFocus javascript event."
+     */
+    public void setOnFocus(String onfocus)
+    {
+        ((HtmlFocusBaseBehavior) _behavior).setOnFocus(onfocus);
+    }
+
+    /**
+     * Sets the onChange javascript event.
+     * @param onchange the onChange event.
+     * @jsptagref.attributedescription The onChange JavaScript event.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_onChange</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="Sets the onChange javascript event."
+     */
+    public void setOnChange(String onchange)
+    {
+        ((HtmlFocusBaseBehavior) _behavior).setOnChange(onchange);
+    }
+
+    /**
+     * Sets the onSelect javascript event.
+     * @param onselect the onSelect event.
+     * @jsptagref.attributedescription The onSelect JavaScript event.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_onSelect</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="Sets the onSelect javascript event."
+     */
+    public void setOnSelect(String onselect)
+    {
+        ((HtmlFocusBaseBehavior) _behavior).setOnSelect(onselect);
+    }
+}

Propchange: beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/HtmlFocusBaseTag.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Image.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Image.java?rev=326581&view=auto
==============================================================================
--- beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Image.java (added)
+++ beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Image.java Wed Oct 19 08:29:22 2005
@@ -0,0 +1,225 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package org.apache.beehive.netui.simpletags.jsptags;
+
+import org.apache.beehive.netui.simpletags.appender.Appender;
+import org.apache.beehive.netui.simpletags.appender.ResponseAppender;
+import org.apache.beehive.netui.simpletags.behaviors.ImageBehavior;
+
+import javax.servlet.jsp.JspException;
+import java.io.IOException;
+
+/**
+ * Generates an image with the specified attributes.  Image ignores its
+ * body content.
+ * @jsptagref.tagdescription Renders an HTML &lt;img> tag with specified attributes.
+ * @example In this sample, an Image shows "friends.jpg" at 150 x 175 pixels, with the id "Friends".
+ * <pre>&lt;netui:image src="friends.jpg" tagId="Friends" height="150" width="175" /></pre>
+ * @netui:tag name="image" body-content="scriptless" dynamic-attributes="true" description="Places an image file type on your page."
+ */
+public class Image extends HtmlBaseTag
+{
+    /**
+     * Sets the property to specify where to align the image.
+     * @param align the image alignment.
+     * @jsptagref.attributedescription The alignment of the image.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_align</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The alignment of the image."
+     */
+    public void setAlign(String align)
+    {
+        ((ImageBehavior) _behavior).setAlign(align);
+    }
+
+    /**
+     * Sets the property to specify the alt text of the image.
+     * @param alt the image alignment.
+     * @jsptagref.attributedescription The alternative text of the image
+     * @jsptagref.databindable Read Only
+     * @jsptagref.attributesyntaxvalue <i>string_alt</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The alternative text of the image."
+     */
+    public void setAlt(String alt)
+    {
+        ((ImageBehavior) _behavior).setAlt(alt);
+    }
+
+    /**
+     * Sets the property to specify a link to the the long description to supplement
+     * the short description in the <code>alt</code> attribute.
+     * @param longdesc the longdesc.
+     * @jsptagref.attributedescription Specifies a link to the the long description.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_longdesc</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="Specifies a link to the the long description."
+     */
+    public void setLongdesc(String longdesc)
+    {
+        ((ImageBehavior) _behavior).setLongdesc(longdesc);
+    }
+
+    /**
+     * Sets the border size around the image.
+     * @param border the border size.
+     * @jsptagref.attributedescription The border size around the image
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>integer_pixelBorder</i>
+     * @netui:attribute required="false"  rtexprvalue="true"
+     * description="The border size around the image."
+     */
+    public void setBorder(String border)
+    {
+        ((ImageBehavior) _behavior).setBorder(border);
+    }
+
+    /**
+     * Sets the image height.
+     * @param height the height.
+     * @jsptagref.attributedescription The image height
+     * @jsptagref.databindable Read Only
+     * @jsptagref.attributesyntaxvalue <i>integer_height</i>
+     * @netui:attribute required="false"  rtexprvalue="true"
+     * description="The image height."
+     */
+    public void setHeight(String height)
+    {
+        ((ImageBehavior) _behavior).setHeight(height);
+    }
+
+    /**
+     * Sets the the horizontal spacing around the image.
+     * @param hspace the horizontal spacing.
+     * @jsptagref.attributedescription The horizontal spacing around the image.
+     * @jsptagref.databindable Read Only
+     * @jsptagref.attributesyntaxvalue <i>integer_hspace</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The horizontal spacing around the image."
+     */
+    public void setHspace(String hspace)
+    {
+        ((ImageBehavior) _behavior).setHspace(hspace);
+    }
+
+    /**
+     * Sets the server-side image map declaration.
+     * @param ismap the image map declaration.
+     * @jsptagref.attributedescription The server-side map declaration.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_isMap</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The server-side map declaration."
+     */
+    public void setIsmap(String ismap)
+    {
+        ((ImageBehavior) _behavior).setIsmap(ismap);
+    }
+
+    /**
+     * Sets the location hash to append to the url.
+     * @param location the location hash.
+     * @jsptagref.attributedescription The location hash to append to the URL.
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_location</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The location hash to append to the URL."
+     */
+    public void setLocation(String location)
+    {
+        ((ImageBehavior) _behavior).setLocation(location);
+    }
+
+    /**
+     * Sets the image source URI.
+     * @param src the source URI.
+     * @jsptagref.attributedescription The image source URI
+     * @jsptagref.databindable Read Only
+     * @jsptagref.attributesyntaxvalue <i>string_src</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The image source URI"
+     */
+    public void setSrc(String src)
+            throws JspException
+    {
+        ((ImageBehavior) _behavior).setSrc(src);
+    }
+
+    /**
+     * Sets the client-side image map declaration.
+     * @param usemap the map declaration.
+     * @jsptagref.attributedescription The client-side image map declaration
+     * @jsptagref.databindable false
+     * @jsptagref.attributesyntaxvalue <i>string_useMap</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The client-side image map declaration"
+     */
+    public void setUsemap(String usemap)
+    {
+        ((ImageBehavior) _behavior).setUsemap(usemap);
+    }
+
+    /**
+     * Sets the vertical spacing around the image.
+     * @param vspace the vertical spacing.
+     * @jsptagref.attributedescription The vertical spacing around the image.
+     * @jsptagref.databindable Read Only
+     * @jsptagref.attributesyntaxvalue <i>string_vspace</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The vertical spacing around the image."
+     */
+    public void setVspace(String vspace)
+    {
+        ((ImageBehavior) _behavior).setVspace(vspace);
+    }
+
+    /**
+     * Sets the image width.
+     * @param width the image width.
+     * @jsptagref.attributedescription The image width.
+     * @jsptagref.databindable Read Only
+     * @jsptagref.attributesyntaxvalue <i>integer_pixelWidth</i>
+     * @netui:attribute required="false" rtexprvalue="true"
+     * description="The image width."
+     */
+    public void setWidth(String width)
+    {
+        ((ImageBehavior) _behavior).setWidth(width);
+    }
+
+    /**
+     * Render the beginning of the IMG tag.
+     * @throws JspException if a JSP exception has occurred
+     */
+    public void doTag() throws JspException, IOException
+    {
+        _behavior.start();
+
+        // evaluate the body, this is called basically so any parameters my be applied.
+        getBufferBody(false);
+
+        Appender appender = new ResponseAppender(getPageContext().getResponse());
+        _behavior.preRender();
+        _behavior.renderStart(appender);
+        _behavior.renderEnd(appender);
+        _behavior.postRender();
+        _behavior.terminate();
+    }
+}

Propchange: beehive/trunk/netui/src/simple-tags/org/apache/beehive/netui/simpletags/jsptags/Image.java
------------------------------------------------------------------------------
    svn:eol-style = native