com.cc.framework.taglib.forms
Class FormTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended bycom.cc.framework.taglib.ScriptTagSupport
          extended bycom.cc.framework.taglib.controls.BaseControlTag
              extended bycom.cc.framework.taglib.forms.FormTag
All Implemented Interfaces:
AjaxSupportTag, DesignRuleContainerTag, FormElementContainerTag, FormElementTag, FrameContainerTag, ImageContainerTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, ScriptSupport, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class FormTag
extends BaseControlTag
implements FrameContainerTag, FormElementContainerTag

Tag-Handler for the form Tag.

The tag generates a form. The form elements are specified in the tag-body.

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

Field Summary
private  boolean buttonSection
          Is set to true if the form contains a section with buttons.
private static long serialVersionUID
          Serial Version UID
 
Fields inherited from class com.cc.framework.taglib.controls.BaseControlTag
log
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
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
FormTag()
          Constructor
 
Method Summary
 void addColumn(FormColumn column)
          Adds a column definition to the container
 void addFormElement(FormElement element)
          Adds a control to the container
 void addInnerFrame(InnerFrame frame)
          Adds a new inner Frame to the container
protected  Control doCreateControl()
          Creates the control element
protected  ControlDesignModel doCreateDesignModel()
          This method is called to create the DesignModel for the control
 int doEndTag()
           
protected  FormDesignModel getFormDesignModel()
          Returns a casted version of the ControlDesignModel
 boolean hasButtonSection()
          Returns true if the form contains a button section
 void release()
           
 void setAlign(java.lang.String alignment)
          Specifies the horizontal alignment of the form element within the form left right center
 void setButtonSection(boolean buttonSection)
          Sets the Flag if the form contains a button section
 void setCaption(java.lang.String caption)
          The main title of the form.
 void setCellWidth(java.lang.String width)
          Sets the width of the control cells for this container.
 void setColspan(java.lang.String colspan)
          Sets the column span of this form element
 void setDetail(java.lang.String detail)
          The detail title of the form
 void setExpandProperty(java.lang.String propertyName)
          Sets the name of a property that is used to expand or collapse the group
 void setFormid(java.lang.String formid)
          The unique identification of the form.
 void setHideButtons(java.lang.String controlButtonList)
          Hides all buttons in the ControlButton List.
 void setImage(ImageModel image)
          Sets the image
 void setImagemap(java.lang.String mapName)
          With this attribute, an ImageList is assigned to the form, The images can be assigned to the individual form elements.
 void setJoin(java.lang.String join)
          This method specifies that two adjacent form elements should be joined together without a separator
 void setLabelPrefix(java.lang.String prefix)
          Specifies the label prefix in plain HTML
 void setLabelSuffix(java.lang.String suffix)
          Specifies the label suffix in plain HTML
 void setLabelWidth(java.lang.String width)
          Sets the width of the labels for this container.
 void setMethod(java.lang.String method)
          Specifies the method using which the form should be sent.
 void setNoframe(java.lang.String noframe)
          Disables the groups border
 void setPageContext(javax.servlet.jsp.PageContext pc)
           
 void setType(java.lang.String type)
          Specifies the form type.
 void setValign(java.lang.String alignment)
          Specifies the vertical alignment of the form element within the form top bottom center
 
Methods inherited from class com.cc.framework.taglib.controls.BaseControlTag
addDesignRule, beginPaint, createControl, createPainter, doStartTag, endPaint, getClientHandler, getControl, getDefaultAction, getDesignModel, getDirectValue, getHttpScope, getPainterContext, lookupBean, releaseDesignModel, setAction, setAjax, setAjax, setBorder, setDirectValue, setDisabled, setFormElement, setHeight, setHelp, setId, setLocale, setName, setPermission, setProperty, setRunat, setScope, setShadow, setStyle, setStyleClass, setStyleId, setSummary, setTabindex, setTooltip, setTransaction, setValue, setWidth
 
Methods inherited from class com.cc.framework.taglib.ScriptTagSupport
setOnabort, setOnactivate, setOnafterprint, setOnafterupdate, setOnbeforeactivate, setOnbeforecopy, setOnbeforecut, setOnbeforedeactivate, setOnbeforeeditfocus, setOnbeforepaste, setOnbeforeprint, setOnbeforeunload, setOnbeforeupdate, setOnblur, setOnbounce, setOncellchange, setOnchange, setOncheck, setOncheckall, setOnclick, setOncollapse, setOncontextmenu, setOncontrolselect, setOncopy, setOncut, setOndataavailable, setOndatasetchanged, setOndatasetcomplete, setOndblclick, setOndeactivate, setOndrag, setOndragend, setOndragenter, setOndragleave, setOndragover, setOndragstart, setOndrop, setOnerror, setOnerrorupdate, setOnexpand, setOnexpandex, setOnfilterchange, setOnfinish, setOnfocus, setOnfocusin, setOnfocusout, setOnhelp, setOnkeydown, setOnkeypress, setOnkeyup, setOnlayoutcomplete, setOnload, setOnlosecapture, setOnmousedown, setOnmouseenter, setOnmouseleave, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnmousewheel, setOnmove, setOnmoveend, setOnmovestart, setOnpaste, setOnpropertychange, setOnreadystatechange, setOnreset, setOnresize, setOnresizeend, setOnresizestart, setOnrowenter, setOnrowexit, setOnrowsdelete, setOnrowsinserted, setOnscroll, setOnselect, setOnselectionchange, setOnselectstart, setOnspindown, setOnspinup, setOnstart, setOnstop, setOnsubmit, setOnuncheck, setOnuncheckall, setOnunload
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.cc.framework.taglib.forms.FormElementTag
setHeight, setHelp, setPermission, setStyle, setStyleClass, setStyleId, setWidth
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

buttonSection

private boolean buttonSection
Is set to true if the form contains a section with buttons.

Constructor Detail

FormTag

public FormTag()
Constructor

Method Detail

doCreateDesignModel

protected ControlDesignModel doCreateDesignModel()
Description copied from class: BaseControlTag
This method is called to create the DesignModel for the control

Specified by:
doCreateDesignModel in class BaseControlTag
Returns:
A concrete DesignModel
See Also:
BaseControlTag.doCreateDesignModel()

getFormDesignModel

protected FormDesignModel getFormDesignModel()
Returns a casted version of the ControlDesignModel

Returns:
FormDesignModel

setPageContext

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

release

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

addInnerFrame

public void addInnerFrame(InnerFrame frame)
Description copied from interface: FrameContainerTag
Adds a new inner Frame to the container

Specified by:
addInnerFrame in interface FrameContainerTag
Parameters:
frame - The inner Frame to add
See Also:
FrameContainerTag.addInnerFrame(com.cc.framework.ui.model.InnerFrame)

addColumn

public void addColumn(FormColumn column)
Description copied from interface: FormElementContainerTag
Adds a column definition to the container

Specified by:
addColumn in interface FormElementContainerTag
Parameters:
column - column definition
See Also:
FormElementContainerTag.addColumn(com.cc.framework.ui.model.FormColumn)

addFormElement

public void addFormElement(FormElement element)
Description copied from interface: FormElementContainerTag
Adds a control to the container

Specified by:
addFormElement in interface FormElementContainerTag
Parameters:
element - FormElement
See Also:
FormElementContainerTag.addFormElement(com.cc.framework.ui.control.FormElement)

hasButtonSection

public boolean hasButtonSection()
Returns true if the form contains a button section

Returns:
Returns a boolean

setButtonSection

public void setButtonSection(boolean buttonSection)
Sets the Flag if the form contains a button section

Parameters:
buttonSection - true if the form contains a button section; false otherwise.

doCreateControl

protected Control doCreateControl()
                           throws javax.servlet.jsp.JspException
Description copied from class: BaseControlTag
Creates the control element

Specified by:
doCreateControl in class BaseControlTag
Returns:
control element
Throws:
javax.servlet.jsp.JspException - If an error during bean lookup occurs
See Also:
BaseControlTag.doCreateControl()

doEndTag

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

setCaption

public void setCaption(java.lang.String caption)
The main title of the form. The title and detail can also be specified together in the form "title - detail.

Parameters:
caption - The caption

setDetail

public void setDetail(java.lang.String detail)
The detail title of the form

Parameters:
detail - The detail title of the form

setType

public void setType(java.lang.String type)
             throws javax.servlet.jsp.JspException
Specifies the form type. The form type has effects on the depiction and the behavior of the form. Thus, in the case of a display-form, e.g, all the form elements are depicted as Read-Only.

Parameters:
type - Specifies the form type
Throws:
javax.servlet.jsp.JspException - If the argument can not be converted to an Object of Type FormType

setMethod

public void setMethod(java.lang.String method)
               throws javax.servlet.jsp.JspException
Specifies the method using which the form should be sent.

Parameters:
method - Method
Throws:
javax.servlet.jsp.JspException - if the argument can not be converted to an Object of Type FormMethod

setFormid

public void setFormid(java.lang.String formid)
The unique identification of the form. It is written in the form as a hidden field with the name formid and is thus available at the time of a form submission. The framework can call the corresponding EventHandler via the formid.

Parameters:
formid - The formid

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)

setImagemap

public void setImagemap(java.lang.String mapName)
                 throws javax.servlet.jsp.JspException
With this attribute, an ImageList is assigned to the form, The images can be assigned to the individual form elements.

Parameters:
mapName - The ImageMap to assign
Throws:
javax.servlet.jsp.JspException - If the ImageMap could not be found

setNoframe

public void setNoframe(java.lang.String noframe)
                throws javax.servlet.jsp.JspException
Description copied from interface: FormElementContainerTag
Disables the groups border

Specified by:
setNoframe in interface FormElementContainerTag
Parameters:
noframe - true if the groups frame should be hidden
Throws:
javax.servlet.jsp.JspException - If the Argument can't be converted to boolean
See Also:
FormElementContainerTag.setNoframe(java.lang.String)

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)

setImage

public void setImage(ImageModel image)
Description copied from interface: ImageContainerTag
Sets the image

Specified by:
setImage in interface ImageContainerTag
Parameters:
image - The image model for the image
See Also:
ImageContainerTag.setImage(com.cc.framework.ui.model.ImageModel)

setHideButtons

public void setHideButtons(java.lang.String controlButtonList)
                    throws javax.servlet.jsp.JspException
Hides all buttons in the ControlButton List.

Parameters:
controlButtonList - A semicolon delimited list of ControlButton names
Throws:
javax.servlet.jsp.JspException - Is thrown when a invalid ControlButton Name is specified

setLabelPrefix

public void setLabelPrefix(java.lang.String prefix)
Specifies the label prefix in plain HTML

Parameters:
prefix - The label prefix

setLabelSuffix

public void setLabelSuffix(java.lang.String suffix)
Specifies the label suffix in plain HTML

Parameters:
suffix - The label suffix

setExpandProperty

public void setExpandProperty(java.lang.String propertyName)
Description copied from interface: FormElementContainerTag
Sets the name of a property that is used to expand or collapse the group

Specified by:
setExpandProperty in interface FormElementContainerTag
Parameters:
propertyName - java property name
See Also:
FormElementContainerTag.setExpandProperty(java.lang.String)

setLabelWidth

public void setLabelWidth(java.lang.String width)
Description copied from interface: FormElementContainerTag
Sets the width of the labels for this container.

Specified by:
setLabelWidth in interface FormElementContainerTag
Parameters:
width - label width
See Also:
FormElementContainerTag.setLabelWidth(java.lang.String)

setCellWidth

public void setCellWidth(java.lang.String width)
Description copied from interface: FormElementContainerTag
Sets the width of the control cells for this container.

Specified by:
setCellWidth in interface FormElementContainerTag
Parameters:
width - control cell width
See Also:
FormElementContainerTag.setCellWidth(java.lang.String)


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