com.cc.framework.taglib.forms
Class FormElementHtmlTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byjavax.servlet.jsp.tagext.BodyTagSupport
          extended bycom.cc.framework.taglib.forms.FormElementHtmlTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, FormElementTag, InnerTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, LabeledFormElementTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag
Direct Known Subclasses:
FormElementDescriptionTag

public class FormElementHtmlTag
extends javax.servlet.jsp.tagext.BodyTagSupport
implements LabeledFormElementTag, InnerTag

Tag-Handler for the description form element.

The tag generates a description element. The description text is graphically assigned to the preceding form element. The description text can be specified as an attribute (description) or directly in the tag body. In the tag-body, all the HTML elements can be used for formatting. The tag may only be used within a FormElementContainerTag. Examples of this are <forms:form>, <forms:section> and <forms:buttonsection>. The description element always refers to the immediately preceding form element.

Since:
1.0
Version:
$Revision: 1.16 $
Author:
Harald Schulz
See Also:
Serialized Form

Field Summary
private  FormHtmlElement formElement
          Designmodel
private static long serialVersionUID
          Serial Version UID
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
FormElementHtmlTag()
          Constructor
 
Method Summary
 int doAfterBody()
           
protected  FormHtmlElement doCreateFormElement()
          Creates the form element
 int doEndTag()
           
 FormHtmlElement getFormElement()
          Returns the concrete form element
 void release()
           
protected  void releaseFormElement()
          Release the current form element
 void setAccesskey(java.lang.String accessKey)
          The ACCESSKEY attribute can be used to specify a shortcut key for the <LABEL> (activated by pressing 'ALT' and the ACCESSKEY together).
 void setAlign(java.lang.String alignment)
          Specifies the horizontal alignment of the form element within the form left right center
 void setColspan(java.lang.String colspan)
          Sets the column span of this form element
 void setFilter(java.lang.String filter)
          The automatic HTML coding of the element can be activated or disabled with the filter-attribute.
 void setHeight(java.lang.String height)
          Sets the height of the form element (pixel or %)
 void setHelp(java.lang.String help)
          Sets the optional help text
 void setImageref(java.lang.String imageRef)
          Sets the Reference to an Image in an ImageMap, which should be display in front of the Label
 void setJoin(java.lang.String join)
          This method specifies that two adjacent form elements should be joined together without a separator
 void setLabel(java.lang.String label)
          Sets the form element label
 void setLabelDesignModel(FormLabelDesignModel label)
          Sets the Label for the form element
 void setLabeltooltip(java.lang.String tooltip)
          Sets the tooltip text for the label
 void setPageContext(javax.servlet.jsp.PageContext pc)
           
 void setPermission(java.lang.String permission)
          Sets the permission for the element
 void setRequired(java.lang.String required)
          Indicates that this form element is a required field
 void setStyle(java.lang.String style)
          An HTML-style.
 void setStyleClass(java.lang.String styleClass)
          The HTML-class attribute.
 void setStyleId(java.lang.String styleId)
          The HTML-id attribute.
 void setValign(java.lang.String alignment)
          Specifies the vertical alignment of the form element within the form top bottom center
 void setWidth(java.lang.String width)
          Sets the width of the form element (pixel or %)
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, doStartTag, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setParent
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

formElement

private FormHtmlElement formElement
Designmodel

Constructor Detail

FormElementHtmlTag

public FormElementHtmlTag()
Constructor

Method Detail

getFormElement

public FormHtmlElement getFormElement()
Returns the concrete form element

Returns:
form element

doCreateFormElement

protected FormHtmlElement doCreateFormElement()
Creates the form element

Returns:
HTML form element

releaseFormElement

protected void releaseFormElement()
Release the current form element


setPageContext

public void setPageContext(javax.servlet.jsp.PageContext pc)
Specified by:
setPageContext in interface javax.servlet.jsp.tagext.Tag
See Also:
Tag.setPageContext(PageContext pc)

release

public void release()
Specified by:
release in interface javax.servlet.jsp.tagext.Tag
See Also:
Tag.release()

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspException
Specified by:
doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
Throws:
javax.servlet.jsp.JspException
See Also:
IterationTag.doAfterBody()

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Throws:
javax.servlet.jsp.JspException
See Also:
Tag.doEndTag()

setHelp

public void setHelp(java.lang.String help)
Sets the optional help text

Specified by:
setHelp in interface FormElementTag
Parameters:
help - Help

setLabel

public void setLabel(java.lang.String label)
Sets the form element label

Parameters:
label - Label

setLabelDesignModel

public void setLabelDesignModel(FormLabelDesignModel label)
Description copied from interface: LabeledFormElementTag
Sets the Label for the form element

Specified by:
setLabelDesignModel in interface LabeledFormElementTag
Parameters:
label - Label
See Also:
LabeledFormElementTag.setLabelDesignModel(com.cc.framework.ui.model.FormLabelDesignModel)

setRequired

public void setRequired(java.lang.String required)
                 throws javax.servlet.jsp.JspException
Indicates that this form element is a required field

Parameters:
required - true if the Field is required
Throws:
javax.servlet.jsp.JspException - if the argument can not be converted to a boolean value

setFilter

public void setFilter(java.lang.String filter)
               throws javax.servlet.jsp.JspException
The automatic HTML coding of the element can be activated or disabled with the filter-attribute. The default is true

Parameters:
filter - true if the element should be HTML encoded.
Throws:
javax.servlet.jsp.JspException - If the Argument can't be converted to boolean

setPermission

public void setPermission(java.lang.String permission)
                   throws javax.servlet.jsp.JspException
Description copied from interface: FormElementTag
Sets the permission for the element

Specified by:
setPermission in interface FormElementTag
Parameters:
permission - Permission
Throws:
javax.servlet.jsp.JspException - If the Argument can't be converted to Permission
See Also:
FormElementTag.setPermission(java.lang.String)

setColspan

public void setColspan(java.lang.String colspan)
                throws javax.servlet.jsp.JspException
Description copied from interface: FormElementTag
Sets the column span of this form element

Specified by:
setColspan in interface FormElementTag
Parameters:
colspan - column span
Throws:
javax.servlet.jsp.JspException - Is thrown when a number conversion error occurs
See Also:
FormElementTag.setColspan(java.lang.String)

setJoin

public void setJoin(java.lang.String join)
             throws javax.servlet.jsp.JspException
Description copied from interface: FormElementTag
This method specifies that two adjacent form elements should be joined together without a separator

Specified by:
setJoin in interface FormElementTag
Parameters:
join - true when the form elements should be joined
Throws:
javax.servlet.jsp.JspException - if the Argument can not be converted to a boolean Value
See Also:
FormElementTag.setJoin(java.lang.String)

setImageref

public void setImageref(java.lang.String imageRef)
Sets the Reference to an Image in an ImageMap, which should be display in front of the Label

Parameters:
imageRef - Reference to an Image in an ImageMap

setAlign

public void setAlign(java.lang.String alignment)
              throws javax.servlet.jsp.JspException
Description copied from interface: FormElementTag
Specifies the horizontal alignment of the form element within the form

Specified by:
setAlign in interface FormElementTag
Parameters:
alignment - The alignment of the element
Throws:
javax.servlet.jsp.JspException - If the argument can't be converted to an AlignmentType
See Also:
FormElementTag.setAlign(java.lang.String)

setValign

public void setValign(java.lang.String alignment)
               throws javax.servlet.jsp.JspException
Description copied from interface: FormElementTag
Specifies the vertical alignment of the form element within the form

Specified by:
setValign in interface FormElementTag
Parameters:
alignment - The alignment of the element
Throws:
javax.servlet.jsp.JspException - If the argument can't be converted to an AlignmentType
See Also:
FormElementTag.setValign(java.lang.String)

setHeight

public void setHeight(java.lang.String height)
Description copied from interface: FormElementTag
Sets the height of the form element (pixel or %)

Specified by:
setHeight in interface FormElementTag
Parameters:
height - The Height
See Also:
FormElementTag.setHeight(java.lang.String)

setWidth

public void setWidth(java.lang.String width)
Description copied from interface: FormElementTag
Sets the width of the form element (pixel or %)

Specified by:
setWidth in interface FormElementTag
Parameters:
width - The Width
See Also:
FormElementTag.setWidth(java.lang.String)

setStyle

public void setStyle(java.lang.String style)
Description copied from interface: FormElementTag
An HTML-style. See HTML documentation for the attribute style.

Specified by:
setStyle in interface FormElementTag
Parameters:
style - An HTML-style
See Also:
FormElementTag.setStyle(java.lang.String)

setStyleClass

public void setStyleClass(java.lang.String styleClass)
Description copied from interface: FormElementTag
The HTML-class attribute. See HTML documentation for the attribute class.

Specified by:
setStyleClass in interface FormElementTag
Parameters:
styleClass - The HTML-class attribute
See Also:
FormElementTag.setStyleClass(java.lang.String)

setStyleId

public void setStyleId(java.lang.String styleId)
Description copied from interface: FormElementTag
The HTML-id attribute. See HTML documentation for the Attribute id.

Specified by:
setStyleId in interface FormElementTag
Parameters:
styleId - The HTML-id attribute
See Also:
FormElementTag.setStyleId(java.lang.String)

setAccesskey

public void setAccesskey(java.lang.String accessKey)
Description copied from interface: LabeledFormElementTag
The ACCESSKEY attribute can be used to specify a shortcut key for the <LABEL> (activated by pressing 'ALT' and the ACCESSKEY together).

Specified by:
setAccesskey in interface LabeledFormElementTag
Parameters:
accessKey - The Access Key
See Also:
LabeledFormElementTag.setAccesskey(java.lang.String)

setLabeltooltip

public void setLabeltooltip(java.lang.String tooltip)
Description copied from interface: LabeledFormElementTag
Sets the tooltip text for the label

Specified by:
setLabeltooltip in interface LabeledFormElementTag
Parameters:
tooltip - Tooltip text
See Also:
LabeledFormElementTag.setLabeltooltip(java.lang.String)


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.