com.ibm.ccd.ui.tags
Class BaseUITag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by com.ibm.ccd.ui.tags.BaseUITag
All Implemented Interfaces:
ITagConstants, IReference, java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.Tag
Direct Known Subclasses:
UIDatePickerTag, UIDropDownTag, UIFileUploadTag, UIFlagTag, UIMessageBundle, UITextAttachFileTag, UITextTag, UITreeTag

public abstract class BaseUITag
extends javax.servlet.jsp.tagext.TagSupport
implements ITagConstants, IReference

See Also:
Serialized Form

Field Summary
protected  java.lang.String alt
          attributes for the alt field of html element.The default value is blank string.
protected  java.lang.String enabled
          attribute enabled can have value true or false.Html field can enabled or disabled.
protected  boolean fromHtmlEmitter
          This attribute is true when the Tag Class is invoked from Emitter caller class and not from customized tag.so pageContext will not be available.portletContext will be available.
protected  java.lang.String id
          attributes for the id field of html element
protected  boolean labelRequired
          At times the tag needs to be generated without the label, this attribute helps control the label generation
protected  java.util.Locale locale
          Locales are passed from Request object.The default is locale is US.
protected  org.apache.jetspeed.portlet.PortletLog log
          attribute used for log
protected  java.lang.String mandatory
          attributes for the mandatory field of html element.The default value is false.
protected  java.lang.String name
          attributes for the name field of html element
protected  javax.servlet.jsp.JspWriter out
          this JspWriter to place the output
protected  org.apache.jetspeed.portlet.PortletContext portletContext
          attribute stores the PortletContext
protected  java.lang.String style
          attributes for the style field of html element
protected  UILabel uiLabel
          attribute UILabel is used to for localized label for html field
protected  java.lang.String value
          attributes for the value field of html element
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
pageContext
 
Fields inherited from interface com.ibm.ccd.ui.tags.ITagConstants
DEBUG_IMAGE_PATH, DEFAULT_CURRENCY, DEFAULT_EDIT_STYLE, DEFAULT_FIELD_SIZE, DEFAULT_FLAG, DEFAULT_LABEL_STYLE, DEFAULT_LISTBOX_SIZE, DEFAULT_TEXT_MAXLENGTH, ERROR_IMAGE_PATH, FATAL_IMAGE_PATH, IMAGE_PATH, INFO_IMAGE_PATH, JS_MANDATORYCHK, JS_MAXRANGECHK, JS_MINRANGECHK, JS_MINVALUECHK, JS_NUMBERVALUECHK, UPLOAD_TEXT_FIELD_LENGTH, VAR_PORTLET_CONFIG, VAR_PORTLET_REQUEST, VAR_PORTLET_RESPONSE, WARN_IMAGE_PATH
 
Fields inherited from interface com.ibm.ccd.ui.util.IReference
AXIS_CLIENT_TIMEOUT_MILLISECONDS, BUNDLE_WPC_UI_JSMESSAGES, BUNDLE_WPC_UI_LABELS, BUNDLE_WPC_UI_MESSAGES, CACHE_ENABLED, COND_CMPL, ITEM_ATTACHMENTS_DIR, KEY_ATTRIBUTE_NAME, KEY_CATALOG_NAME, MASSUPDATE_MAP_LIST_KEY, MASSUPDATE_MAP_MESSAGE_KEY, MESSAGE_KEY, PRIMARY_CATALOG, SESSION_ACTION, SESSION_BUS_FUNCT, SUPPLIER_ATTR_NAME, TRANS_LOG_FILE, TRANSACTION_PATH, WORKWITHITEM_IMAGEDIR
 
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
BaseUITag()
          BaseUITag : Constructor
 
Method Summary
protected  void displayField()
          Renders the html content which the tag is expected to display.
protected  void displayForMandatory()
          performs the mandatory field check.
protected  void displayLabel()
          Displays the label for this html component.
protected  void displayTag()
          Constructs the html component structure.
 int doEndTag()
          doEndTag is called by the JSP container when the tag is closed
 int doStartTag()
          doStartTag is called by the JSP container when the tag is encountered
 java.lang.String getAlt()
           
 java.lang.String getEnabled()
           
 java.lang.String getId()
           
 java.util.Locale getLocale()
           
 org.apache.jetspeed.portlet.PortletLog getLog()
           
 java.lang.String getMandatory()
           
 java.lang.String getName()
           
 org.apache.jetspeed.portlet.PortletContext getPortletContext()
           
 java.lang.String getSize()
          attribute for getting the size of html elements.Some html element may not use it.
 java.lang.String getStyle()
           
 java.lang.String getTextLabel(org.apache.jetspeed.portlet.PortletRequest portletRequest, java.lang.String key)
           
 java.lang.String getTextMessages(org.apache.jetspeed.portlet.PortletRequest portletRequest, java.lang.String key)
           
 UILabel getUiLabel()
           
 java.lang.String getValue()
           
protected  void initialize()
           
protected  boolean isEnabled()
           
protected  boolean isFromHtmlEmitter()
          This method returns true if Tag class is invoked from Emitter Class
 boolean isLabelRequired()
           
protected  boolean isMandatory()
           
protected abstract  void renderField()
          Method for generating the html field.Tag Subclasses needs overwrite this method
 void setAlt(java.lang.String string)
           
 void setEnabled(java.lang.String param)
           
 void setId(java.lang.String string)
           
 void setLabelRequired(boolean b)
           
 void setLocale(java.util.Locale locale)
           
 void setLog(org.apache.jetspeed.portlet.PortletLog log)
           
 void setMandatory(java.lang.String string)
           
 void setName(java.lang.String string)
           
 void setPortletContext(org.apache.jetspeed.portlet.PortletContext context)
           
 void setSize(java.lang.String string)
          attribute for setting the size of html elements.
 void setStyle(java.lang.String string)
           
 void setUiLabel(UILabel label)
           
 void setValue(java.lang.String string)
           
protected  int validate(java.lang.String inputParam, int defaultValue)
           
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getParent, getValue, getValues, release, removeValue, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
attributes for the name field of html element


id

protected java.lang.String id
attributes for the id field of html element


value

protected java.lang.String value
attributes for the value field of html element


style

protected java.lang.String style
attributes for the style field of html element


alt

protected java.lang.String alt
attributes for the alt field of html element.The default value is blank string. This is for tool tip.


mandatory

protected java.lang.String mandatory
attributes for the mandatory field of html element.The default value is false.


uiLabel

protected UILabel uiLabel
attribute UILabel is used to for localized label for html field


log

protected org.apache.jetspeed.portlet.PortletLog log
attribute used for log


portletContext

protected org.apache.jetspeed.portlet.PortletContext portletContext
attribute stores the PortletContext


labelRequired

protected boolean labelRequired
At times the tag needs to be generated without the label, this attribute helps control the label generation


fromHtmlEmitter

protected boolean fromHtmlEmitter
This attribute is true when the Tag Class is invoked from Emitter caller class and not from customized tag.so pageContext will not be available.portletContext will be available.


locale

protected java.util.Locale locale
Locales are passed from Request object.The default is locale is US.


enabled

protected java.lang.String enabled
attribute enabled can have value true or false.Html field can enabled or disabled.


out

protected javax.servlet.jsp.JspWriter out
this JspWriter to place the output

Constructor Detail

BaseUITag

public BaseUITag()
BaseUITag : Constructor

Method Detail

initialize

protected void initialize()

validate

protected int validate(java.lang.String inputParam,
                       int defaultValue)
                throws java.lang.Exception
Parameters:
inputParam -
defaultValue -
Returns:
integer
Throws:
java.lang.Exception

doStartTag

public int doStartTag()
doStartTag is called by the JSP container when the tag is encountered

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport

displayTag

protected void displayTag()
                   throws java.lang.Exception
Constructs the html component structure. The display takes care of displaying the label, and the field which corresponds to this tag.

Throws:
java.io.JspException
java.lang.Exception

displayLabel

protected void displayLabel()
                     throws java.lang.Exception
Displays the label for this html component. The label is displayed if a label is required. By default all tags require a label, the ones that do not want a label return false for the isLabelRequired method.

Throws:
javax.servlet.jsp.JspException
java.lang.Exception

displayField

protected void displayField()
                     throws java.lang.Exception
Renders the html content which the tag is expected to display. The field display takes care of checking if the field needs to be visible, and if it needs to be enabled.

Throws:
javax.servlet.jsp.JspException
java.lang.Exception

getTextLabel

public java.lang.String getTextLabel(org.apache.jetspeed.portlet.PortletRequest portletRequest,
                                     java.lang.String key)
Parameters:
portletRequest -
key -
Returns:
string

getTextMessages

public java.lang.String getTextMessages(org.apache.jetspeed.portlet.PortletRequest portletRequest,
                                        java.lang.String key)
Parameters:
portletRequest -
key -
Returns:
string

renderField

protected abstract void renderField()
                             throws java.lang.Exception
Method for generating the html field.Tag Subclasses needs overwrite this method

Throws:
java.lang.Exception

displayForMandatory

protected void displayForMandatory()
                            throws javax.servlet.jsp.JspException
performs the mandatory field check. If the field is mandatory, then the default look and feel is to print a red asterisk against the label name

Throws:
javax.servlet.jsp.JspException

doEndTag

public int doEndTag()
doEndTag is called by the JSP container when the tag is closed

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.TagSupport

getValue

public java.lang.String getValue()
Returns:
string

setValue

public void setValue(java.lang.String string)
Parameters:
string -

getName

public java.lang.String getName()
Returns:
string

setName

public void setName(java.lang.String string)
Parameters:
string -

getId

public java.lang.String getId()
Overrides:
getId in class javax.servlet.jsp.tagext.TagSupport
Returns:
string

setId

public void setId(java.lang.String string)
Overrides:
setId in class javax.servlet.jsp.tagext.TagSupport
Parameters:
string -

getLog

public org.apache.jetspeed.portlet.PortletLog getLog()
Returns:
portletLog

getPortletContext

public org.apache.jetspeed.portlet.PortletContext getPortletContext()
Returns:
portletContext

setLog

public void setLog(org.apache.jetspeed.portlet.PortletLog log)
Parameters:
log -

setPortletContext

public void setPortletContext(org.apache.jetspeed.portlet.PortletContext context)
Parameters:
context -

getStyle

public java.lang.String getStyle()
Returns:
string

setStyle

public void setStyle(java.lang.String string)
Parameters:
string -

isLabelRequired

public boolean isLabelRequired()
Returns:
boolean

getUiLabel

public UILabel getUiLabel()
Returns:
UILabel

setLabelRequired

public void setLabelRequired(boolean b)
Parameters:
b -

setUiLabel

public void setUiLabel(UILabel label)
Parameters:
label -

isFromHtmlEmitter

protected boolean isFromHtmlEmitter()
This method returns true if Tag class is invoked from Emitter Class

Returns:
boolean fromHtmlEmitter

getLocale

public java.util.Locale getLocale()
Returns:
Locale

setLocale

public void setLocale(java.util.Locale locale)
Parameters:
locale -

getMandatory

public java.lang.String getMandatory()
Returns:
String

isMandatory

protected boolean isMandatory()
Returns:
boolean

setMandatory

public void setMandatory(java.lang.String string)
Parameters:
string -

isEnabled

protected boolean isEnabled()
Returns:
boolean

setEnabled

public void setEnabled(java.lang.String param)
Parameters:
param -

getSize

public java.lang.String getSize()
attribute for getting the size of html elements.Some html element may not use it.

Returns:
string

setSize

public void setSize(java.lang.String string)
attribute for setting the size of html elements.


getEnabled

public java.lang.String getEnabled()
Returns:
string

getAlt

public java.lang.String getAlt()
Returns:
string

setAlt

public void setAlt(java.lang.String string)
Parameters:
string -