com.sas.taglib.servlet.tbeans.form
Class FormTag

com.sas.taglib.servlet.tbeans.form.FormTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally

public class FormTag

FormTag is the tag handler class for the sas:Form custom tag . FormTag is invoked by the JSP page to evaluate the sas:Form custom tag during the execution of the page. Tag handler methods are called by the JSP page implementation class at various points during the evaluation of the tag. The tag handler methods in turn call methods on the underlying Transformation Bean object, Form, to execute the methods.

If you need to extend or modify the functionality of the sas:Form custom tag, you can subclass this tag handler class.

For More Information:

Visit the AppDev Studio Developer's Site to access step-by-step examples, white papers and additional usage information at http://support.sas.com/rnd/appdev/.

Refer to the Custom Tag Library Reference for usage information on the sas:Form custom tag.

Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site.

See Also:
Form, Serialized Form

Field Summary
 
Fields inherited from class com.sas.taglib.BaseBodyTag
DELIMITERS, RB_KEY
 
Constructor Summary
FormTag()
           
 
Method Summary
protected  void applyAttributes()
          Sets the attributes on the underlying Form object.
 int doEndTag()
          Process the end tag.
 int doStartTag()
          Processes the start tag for this instance.
protected  void initialize(boolean includeAttributes)
          Initializes attributes and variables for this tag handler.
 void setAction(java.lang.String action)
          Sets the action property (String) of the Form Tag.
 void setAutoComplete(boolean value)
          Sets the autoComplete attribute (boolean) of the Form Tag.
 void setEncodeType(java.lang.String encodeType)
          Sets the encodetype property (String) of the Form Tag.
 void setMethod(java.lang.String method)
          Sets the method property (String) of the Form Tag.
 void setOnBlur(java.lang.String onblur)
          Sets the onBlur property (String) of the Form Tag.
 void setOnClick(java.lang.String onclick)
          Sets the onClick property (String) of the Form Tag.
 void setOnFocus(java.lang.String onfocus)
          Sets the onFocus property (String) of the Form Tag.
 void setOnKeyDown(java.lang.String onkeydown)
          Sets the onKeyDown property (String) of the Form Tag.
 void setOnKeyPress(java.lang.String onkeypress)
          Sets the onKeyPress property (String) of the Form Tag.
 void setOnKeyUp(java.lang.String onkeyup)
          Sets the onKeyUp property (String) of the Form Tag.
 void setOnLoad(java.lang.String onload)
          Sets the onLoad property (String) of the Form Tag.
 void setOnMouseDown(java.lang.String onmousedown)
          Sets the onMouseDown property (String) of the Form Tag.
 void setOnMouseOut(java.lang.String onmouseout)
          Sets the onMouseOut property (String) of the Form Tag.
 void setOnMouseOver(java.lang.String onmouseover)
          Sets the onMouseOver property (String) of the Form Tag.
 void setOnMouseUp(java.lang.String onmouseup)
          Sets the onMouseUp property (String) of the Form Tag.
 void setOnReset(java.lang.String onreset)
          Sets the onReset property (String) of the Form Tag.
 void setOnSubmit(java.lang.String onsubmit)
          Sets the onSubmit property (String) of the Form Tag.
 void setOnUnload(java.lang.String onunload)
          Sets the onUnLoad property (String) of the Form Tag.
 void setTarget(java.lang.String target)
          Sets the target property (String) of the Form Tag.
 void setValidateFunctionName(java.lang.String validatefunctionname)
          Sets the validatefunctionname property (String) of the Form Tag.
 void setValidationEnabled(boolean validationEnabled)
          Sets the validationEnabled attribute (boolean) of the Form Tag.
 
Methods inherited from class com.sas.taglib.servlet.tbeans.BaseTransformationBodyTag
getCustomAttributes, getEpilog, getLocale, getName, getObjectDataProperty, getProlog, getRender, getRenderType, setCustomAttributes, setEpilog, setLocale, setName, setObjectDataProperty, setProlog, setRender, setRenderType
 
Methods inherited from class com.sas.taglib.BaseBodyTag
doCatch, doFinally, getApplyAttributes, getBodyStrings, getCompositeComponentKey, getInstantiate, getPageContext, getRef, getScope, getTagScope, getWrappedClassName, getWrappedObject, getWrappedObject, loadBeanInstance, newInstance, release, removeFromScope, searchContext, setApplyAttributes, setCompositeComponentKey, setInstantiate, setRef, setScope, setTagScope, setVariableWithinScope, setWrappedClassName, setWrappedObject, validate
 

Constructor Detail

FormTag

public FormTag()
Method Detail

initialize

protected void initialize(boolean includeAttributes)
Initializes attributes and variables for this tag handler.

Overrides:
initialize in class BaseTransformationBodyTag
Parameters:
includeAttributes - Set to true if attributes are to be set to default values.

setAction

public void setAction(java.lang.String action)
Sets the action property (String) of the Form Tag. The action String specifies the URL which is used to post forms via email (i.e "mailto:some.one@sas.com") or a server-side form handler (such as a servlet or JSP page) via HTTP (i.e. "http://www.sas.com/jsp/my.jsp").

Parameters:
action - Specifies the URL which is used to post forms via email or via HTTP

setEncodeType

public void setEncodeType(java.lang.String encodeType)
Sets the encodetype property (String) of the Form Tag. The encodetype String specifies the mechanism used to encode the form's content. The default is "application/x-www-form-urlencoded"

Parameters:
encodetype - The Form encoding type to encode the form's content.

setMethod

public void setMethod(java.lang.String method)
Sets the method property (String) of the Form Tag. The method String specifies the HTTP method to be used when sending the form contents to the server. Valid values are "GET" and "POST". The default value is "GET"

Parameters:
method - The Form submittion method to be used when sending the form contents to the server.

setTarget

public void setTarget(java.lang.String target)
Sets the target property (String) of the Form Tag. The target String specifies the window name that displays the data returned by the invoked program.

Parameters:
target - The window name that displays the data

setValidateFunctionName

public void setValidateFunctionName(java.lang.String validatefunctionname)
Sets the validatefunctionname property (String) of the Form Tag. The validatefunctionname String specifies the name of the validation function to create if there are input fields associated with the form (via the validate methods). The default is OnSubmit.

Parameters:
validatefunctionname - The Form validating function name

setOnSubmit

public void setOnSubmit(java.lang.String onsubmit)
Sets the onSubmit property (String) of the Form Tag. The onSubmit String specifies the name of the function to call when the form is submitted. The default is OnSubmit. If the user wants to add additional validation code for the form the OnSubmit can be set to a custom validation routine. The custom validation routine can invoke the standard validation function generated by this bean and, in turn, perform additional validation.

Parameters:
onSubmit - The Form onSubmit function name that's called when the form is submitted.

setOnBlur

public void setOnBlur(java.lang.String onblur)
Sets the onBlur property (String) of the Form Tag. The onBlur String specifies the action to take when the Form loses focus.

Parameters:
onBlur - The Form onBlur event handler that's called when the form loses focus.

setOnFocus

public void setOnFocus(java.lang.String onfocus)
Sets the onFocus property (String) of the Form Tag. The onFocus String specifies the action to take when the Form receives focus.

Parameters:
onFocus - The Form onFocus event handler that's called when the form receives focus.

setOnKeyDown

public void setOnKeyDown(java.lang.String onkeydown)
Sets the onKeyDown property (String) of the Form Tag. The onKeyDown String specifies the action to take when a key on the keyboard is pressed down while the Form has focus.

Parameters:
onKeyDown - The Form onKeyDown event handler that's called when a key on the keyboard is pressed down while the Form has focus.

setOnKeyPress

public void setOnKeyPress(java.lang.String onkeypress)
Sets the onKeyPress property (String) of the Form Tag. The onKeyPress String specifies the action to take when a key on the keyboard is pressed while the Form has focus.

Parameters:
onKeyPress - The Form onKeyPress event handler that's called when a key on the keyboard is pressed while the Form has focus.

setOnKeyUp

public void setOnKeyUp(java.lang.String onkeyup)
Sets the onKeyUp property (String) of the Form Tag. The onKeyUp String specifies the action to take when a key on the keyboard is released while the Form has focus.

Parameters:
onKeyUp - The Form onKeyUp event handler that's called when a key on the keyboard is released while the Form has focus.

setOnLoad

public void setOnLoad(java.lang.String onload)
Sets the onLoad property (String) of the Form Tag. The onLoad String specifies the action to take when the Form loads.

Parameters:
onLoad - The Form onLoad event handler that's called when the form loads.

setOnMouseDown

public void setOnMouseDown(java.lang.String onmousedown)
Sets the onMouseDown property (String) of the Form Tag. The onMouseDown String specifies the action to take when a mouse button is pressed while the Form has focus.

Parameters:
onMouseDown - The Form onMouseDown event handler that's called when a mouse button is pressed while the Form has focus.

setOnMouseUp

public void setOnMouseUp(java.lang.String onmouseup)
Sets the onMouseUp property (String) of the Form Tag. The onMouseUp String specifies the action to take when a mouse button is released while the Form has focus.

Parameters:
onMouseUp - The Form onMouseUp event handler that's called when a mouse button is released while the Form has focus.

setOnMouseOut

public void setOnMouseOut(java.lang.String onmouseout)
Sets the onMouseOut property (String) of the Form Tag. The onMouseOut String specifies the action to take when a mouse scrolls out of the Form region.

Parameters:
onMouseOut - The Form onMouseOut event handler that's called when a mouse scrolls out of the Form region.

setOnMouseOver

public void setOnMouseOver(java.lang.String onmouseover)
Sets the onMouseOver property (String) of the Form Tag. The onMouseOver String specifies the action to take when a mouse is over the Form region.

Parameters:
onMouseOver - The Form onMouseOver event handler that's called when a mouse is over the Form region.

setOnReset

public void setOnReset(java.lang.String onreset)
Sets the onReset property (String) of the Form Tag. The onReset String specifies the action to take when the Form resets.

Parameters:
onReset - The Form onReset event handler that's called when the form resets.

setOnUnload

public void setOnUnload(java.lang.String onunload)
Sets the onUnLoad property (String) of the Form Tag. The onUnLoad String specifies the action to take when the Form unloads.

Parameters:
onUnLoad - The Form onUnLoad event handler that's called when the form unloads.

setOnClick

public void setOnClick(java.lang.String onclick)
Sets the onClick property (String) of the Form Tag. The onClick String specifies the action to take when the Form is clicked with the mouse.

Parameters:
onClick - The Form onClick event handler that's called when the form is clicked with the mouse.

setValidationEnabled

public void setValidationEnabled(boolean validationEnabled)
Sets the validationEnabled attribute (boolean) of the Form Tag. The validationEnabled Boolean specifies that validation is going to be needed on the Form. The default is false. Valid values are: true, false.

Parameters:
validationEnabled - The state of the FORM element; "true" results in validation being enabled on a Form.

setAutoComplete

public void setAutoComplete(boolean value)
Sets the autoComplete attribute (boolean) of the Form Tag.

Parameters:
value - The state of the autoComplete property

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Processes the start tag for this instance. The doStartTag() method assumes that all setter methods have been invoked before. When this method is invoked, the body has not yet been invoked.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class BaseTransformationBodyTag
Returns:
int designating the next course of action for the tag/jsp page.
Throws:
javax.servlet.jsp.JspException - Thrown if some type of JSP error occurs
See Also:
BaseBodyTag.setInstantiate(boolean), TagSupport.doStartTag()

applyAttributes

protected void applyAttributes()
                        throws javax.servlet.jsp.JspException
Sets the attributes on the underlying Form object.

Overrides:
applyAttributes in class BaseTransformationBodyTag
Throws:
javax.servlet.jsp.JspException - Thrown if some type of JSP error occurs

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Process the end tag. This method will be called on all Tag objects.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class BaseTransformationBodyTag
Returns:
int designating the next course of action for the tag/jsp page.
Throws:
javax.servlet.jsp.JspException - Thrown if some type of JSP error occurs
See Also:
TagSupport.doEndTag(), BaseBodyTag.setInstantiate(boolean)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.