IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.dojo.tag
Class AbstractTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.SimpleTagSupport
      extended by com.ibm.btt.dojo.tag.AbstractTag
All Implemented Interfaces:
DojoConstants, javax.servlet.jsp.tagext.DynamicAttributes, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.SimpleTag
Direct Known Subclasses:
AbstractBodyTag, AbstractSimpleTag, DojoLocaleTag

public abstract class AbstractTag
extends javax.servlet.jsp.tagext.SimpleTagSupport
implements javax.servlet.jsp.tagext.DynamicAttributes, DojoConstants


Field Summary
protected  java.util.Map<java.lang.String,java.lang.String> attributes
           
protected  java.lang.String dataName
          This property indicates the name of the data element that will be bound with the widget.
protected static BTTLog log
           
 
Fields inherited from interface com.ibm.btt.dojo.tag.DojoConstants
ACCESSKEY, ACTION, ACTIONURL, ANCHOR, BTTERRORPAGE, BTTGRIDCELL, BTTPARAMS, BUTTON, CHECKED, CHECKEDVALUE, DATANAMEFORLIST, DES_PORCESSORINFOTABLE, DIV, DOJOANCHOR, DOJOBUTTON, DOJOCHECKBOX, DOJOCOMBOBOX, DOJOCONTENTPANE, DOJOCURRENCYTEXTBOX, DOJODATETEXTBOX, DOJOENHANCEDGRID, DOJOFILEUPLOAD, DOJOFORM, DOJOGRID, DOJOGROUP, DOJOHIDDEN, DOJOIMAGE, DOJOLABEL, DOJOMESSAGE, DOJONUMBERTEXTBOX, DOJORADIOBUTTON, DOJORICHTEXTEDITOR, DOJOSELECT, DOJOSTRINGTEXTBOX, DOJOTABBEDPANE, DOJOTEXTAREA, DOJOTEXTBOX, DOJOTREE, DOJOTYPE, DSE_APPLICATIONID, DSE_NEXT_EVENT_NAME, DSE_OPERATIONNAME, DSE_PAGEID, DSE_PROCESSORID, DSE_PROCESSORSTATE, DSE_SESSIONID, EMPTYSTRING, EVENT_ONCLICK, FALSE, FIELD_SET, FOR, FORM, HEIGHT, HIDDEN, ID, IGNORE, IMG, INITIAL, INPUT, ISCHECKED, JSID, LABEL, LABELFIELD, LEVEL, LOCATION, MESSAGEARRAY, METHOD, NAME, OPTION, POST, PROMPTMESSAGE, PX, REQUIRED, RETURN, SELECT, SINGLEFIELDERRORMESSAGE, START, STORE, STOREDATA, STOREDATANAME, STOREURL, TABLE, TEXT, TEXTAREA, TRUE, TYPE, VALUE, VALUEFIELD, WIDTH
 
Constructor Summary
AbstractTag()
           
 
Method Summary
protected  void afterGenerateTag(java.lang.StringBuffer buffer)
          This method is used for the subclass to inject other JavaScript code or generating the hidden HTML fields
protected  void beforeGenerateTag(java.lang.StringBuffer buffer)
          This method is used for the subclass to inject other JavaScript code or generating the hidden HTML fields
protected  void generateAttributes(java.lang.StringBuffer buffer, java.util.Map<java.lang.String,java.lang.String> attributes)
          Generate the attributes
protected  void generateEndTag(java.lang.StringBuffer buffer, java.lang.String tagName)
          Used for the subclass to override to generate the body tag of the dojo code, if there is no body tag, then don¡¯t override this.
protected  void generateStartTag(java.lang.StringBuffer buffer, java.lang.String tagName, java.util.Map<java.lang.String,java.lang.String> attributes)
          Generate the start tag of the Dojo Widget
 java.lang.String getDataName()
           
 JspContextServices getJspContextServices()
          Returns an instance of JspContextServices called "utb" in the JSP pageContext.
protected  java.lang.String getNLSMessage(java.lang.String key)
          Get NLS message from the resource bundle
 java.util.ResourceBundle getResourceBundle()
          Returns a resource bundle
protected  java.lang.String getStringValue(java.lang.String dataName)
          Get the value from the context and convert to string
protected abstract  java.lang.String getTagName()
          The tag name of the generated DOJO widget,if it isn't DOJO widget tag, then just return null.
protected  java.util.Locale getUserLocale()
          Get the user's locale, this locale should be initialized in the operation.
protected  void initAttributes()
          This method is used for subclass to initialize the tag attributes
protected  boolean isEmpty(java.lang.String str)
          Check the string is null or empty
 void setDataName(java.lang.String dataName)
           
 void setDynamicAttribute(java.lang.String uri, java.lang.String localName, java.lang.Object value)
           
protected  void write(java.lang.String str)
          Write the string to the response.
 
Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport
doTag, findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

attributes

protected java.util.Map<java.lang.String,java.lang.String> attributes

log

protected static BTTLog log

dataName

protected java.lang.String dataName
This property indicates the name of the data element that will be bound with the widget.

Constructor Detail

AbstractTag

public AbstractTag()
Method Detail

getDataName

public java.lang.String getDataName()

setDataName

public void setDataName(java.lang.String dataName)

getTagName

protected abstract java.lang.String getTagName()
The tag name of the generated DOJO widget,if it isn't DOJO widget tag, then just return null.

Returns:
the tag name of the generated DOJO widget

setDynamicAttribute

public void setDynamicAttribute(java.lang.String uri,
                                java.lang.String localName,
                                java.lang.Object value)
                         throws javax.servlet.jsp.JspException
Specified by:
setDynamicAttribute in interface javax.servlet.jsp.tagext.DynamicAttributes
Throws:
javax.servlet.jsp.JspException

initAttributes

protected void initAttributes()
This method is used for subclass to initialize the tag attributes


beforeGenerateTag

protected void beforeGenerateTag(java.lang.StringBuffer buffer)
This method is used for the subclass to inject other JavaScript code or generating the hidden HTML fields

Parameters:
buffer - the string buffer used to append the dojo code

afterGenerateTag

protected void afterGenerateTag(java.lang.StringBuffer buffer)
This method is used for the subclass to inject other JavaScript code or generating the hidden HTML fields

Parameters:
buffer - the string buffer used to append the dojo code

generateStartTag

protected void generateStartTag(java.lang.StringBuffer buffer,
                                java.lang.String tagName,
                                java.util.Map<java.lang.String,java.lang.String> attributes)
Generate the start tag of the Dojo Widget

Parameters:
buffer - the string buffer used to append the dojo code

generateEndTag

protected void generateEndTag(java.lang.StringBuffer buffer,
                              java.lang.String tagName)
Used for the subclass to override to generate the body tag of the dojo code, if there is no body tag, then don¡¯t override this.

Parameters:
buffer - the string buffer used to append the dojo code

generateAttributes

protected void generateAttributes(java.lang.StringBuffer buffer,
                                  java.util.Map<java.lang.String,java.lang.String> attributes)
Generate the attributes

Parameters:
buffer - the string buffer contains the generated XML
attributes - the map of the attributes

getNLSMessage

protected java.lang.String getNLSMessage(java.lang.String key)
Get NLS message from the resource bundle

Parameters:
key - the resource bundle key
Returns:
the NLS message if not found then return "???key???"

write

protected void write(java.lang.String str)
              throws javax.servlet.jsp.JspException
Write the string to the response.

Parameters:
str -
Throws:
javax.servlet.jsp.JspException

getStringValue

protected java.lang.String getStringValue(java.lang.String dataName)
Get the value from the context and convert to string

Parameters:
dataName - the data name
Returns:
the string value

getUserLocale

protected java.util.Locale getUserLocale()
Get the user's locale, this locale should be initialized in the operation.

Returns:
the user's locale

isEmpty

protected boolean isEmpty(java.lang.String str)
Check the string is null or empty

Parameters:
str - the checked string
Returns:
true if it is null or empty otherwise return false

getResourceBundle

public java.util.ResourceBundle getResourceBundle()
Returns a resource bundle

Returns:
ResourceBundle - The bundle

getJspContextServices

public JspContextServices getJspContextServices()
Returns an instance of JspContextServices called "utb" in the JSP pageContext. If this instance does not exist in the pageContext, this method will create and instance of com.ibm.btt.cs.html.DSEJspContextServices and initialize it with the HttpServletRequest Object.

If a different implementation of JspContextServices must be used, it must be defined as a jspbean called "utb&auot; at the beginning of each JSP, to do this use the following: <% utb.initialize(request); %> // <-- Not required, depend on the implementation.


IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2011