com.ibm.dse.gui.jspbeans
Class JSPAbstractComponent

java.lang.Object
  |
  +--com.ibm.dse.gui.jspbeans.JSPAbstractComponent
Direct Known Subclasses:
JSPActionButtonBean, JSPCheckBoxBean, JSPCommandButtonBean, JSPDataFieldBean, JSPEditableTableBean, JSPErrorListBean, JSPIncludeFileBean, JSPListBean, JSPResultsTableBean, JSPTextAreaBean, JSPToggleGroupBean

public abstract class JSPAbstractComponent
extends java.lang.Object
implements JSPComponent

Provides a base class to develop customized JSPBeans to use in JSP pages and generate HTML content


Field Summary
protected  java.util.Hashtable _properties
           
static java.lang.String BOTTOM
           
static java.lang.String CENTER
           
static java.lang.String HARD
           
static java.lang.String LEFT
           
static java.lang.String NO
           
static java.lang.String NULL
           
static java.lang.String OFF
           
static java.lang.String RESET
           
static java.lang.String RIGHT
           
static java.lang.String SOFT
           
static java.lang.String SUBMIT
           
static java.lang.String TOP
           
static java.lang.String YES
           
 
Constructor Summary
JSPAbstractComponent()
          JSPAbstractComponent constructor In this constructor all "EXISTING" properties must be created
JSPAbstractComponent(JspContextServices anInterface, java.lang.String aDataName)
          JSPAbstractComponent constructor
 
Method Summary
 java.lang.String getDataName()
          Returns the dataname associated to the bean
 java.util.Vector getErrorList()
          Returns the list of errors associated to this bean as a Vector of Strings
 JspContextServices getInterface()
          Returns the object implementing JSPContextServices that will access the operation's context
 java.lang.Object getProperty(java.lang.String aPropertyName)
          Returns the value associated to the key that is passed as an argument.
 void putError(java.lang.String anErrorMessage)
          Adds an error message to the error list of the bean
 java.lang.String renderError(java.lang.String aHTMLString)
          Renders the error message associated to the dataname in the operation's context, as a result of the validation in the server side.
protected  java.lang.String renderLabel(java.lang.String aHTMLString)
          Renders the label associated to the dataname in the operation's context.
 void setDataName(java.lang.String aName)
          Sets the value of the dataname associated to the bean
 void setInterface(JspContextServices aJSPContextServices)
          Sets the object that implements a JspContextServices used to access the operation's context
 void setProperty(java.lang.String aPropertyName, java.lang.Object aPropertyValue)
          Associates a value to a given key.Property names are case-sensitive
abstract  java.lang.String toHTMLString()
          The renderer of the JSPBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_properties

protected java.util.Hashtable _properties

LEFT

public static final java.lang.String LEFT

RIGHT

public static final java.lang.String RIGHT

CENTER

public static final java.lang.String CENTER

TOP

public static final java.lang.String TOP

BOTTOM

public static final java.lang.String BOTTOM

YES

public static final java.lang.String YES

NO

public static final java.lang.String NO

NULL

public static final java.lang.String NULL

OFF

public static final java.lang.String OFF

HARD

public static final java.lang.String HARD

SOFT

public static final java.lang.String SOFT

SUBMIT

public static final java.lang.String SUBMIT

RESET

public static final java.lang.String RESET
Constructor Detail

JSPAbstractComponent

public JSPAbstractComponent()
JSPAbstractComponent constructor In this constructor all "EXISTING" properties must be created

JSPAbstractComponent

public JSPAbstractComponent(JspContextServices anInterface,
                            java.lang.String aDataName)
JSPAbstractComponent constructor
Parameters:
anInterface - com.ibm.dse.cs.html.JspContextServices
aDataName - java.lang.String
Method Detail

getDataName

public java.lang.String getDataName()
Returns the dataname associated to the bean
Specified by:
getDataName in interface JSPComponent
Returns:
String

getErrorList

public java.util.Vector getErrorList()
Returns the list of errors associated to this bean as a Vector of Strings
Specified by:
getErrorList in interface JSPComponent
Returns:
_errors

getInterface

public JspContextServices getInterface()
Returns the object implementing JSPContextServices that will access the operation's context
Specified by:
getInterface in interface JSPComponent
Returns:
com.ibm.dse.cs.html.JspContextServices

getProperty

public java.lang.Object getProperty(java.lang.String aPropertyName)
Returns the value associated to the key that is passed as an argument. If the property doesn't exist it adds an error to the error list. Property names are case-sensitive.
Specified by:
getProperty in interface JSPComponent
Returns:
Object

putError

public void putError(java.lang.String anErrorMessage)
Adds an error message to the error list of the bean
Specified by:
putError in interface JSPComponent
Parameters:
anErrorMessage - java.lang.String

renderError

public java.lang.String renderError(java.lang.String aHTMLString)
Renders the error message associated to the dataname in the operation's context, as a result of the validation in the server side. Attaches the message to the given htmlstring (usually the already rendered JSPBean that generated the error)
Parameters:
aHTMLString - java.lang.String
Returns:
java.lang.String

renderLabel

protected java.lang.String renderLabel(java.lang.String aHTMLString)
Renders the label associated to the dataname in the operation's context.
Parameters:
aHTMLString - java.lang.String
Returns:
java.lang.String

setDataName

public void setDataName(java.lang.String aName)
Sets the value of the dataname associated to the bean
Specified by:
setDataName in interface JSPComponent
Tags copied from interface: JSPComponent
Parameters:
aName - java.lang.String

setInterface

public void setInterface(JspContextServices aJSPContextServices)
Sets the object that implements a JspContextServices used to access the operation's context
Specified by:
setInterface in interface JSPComponent
Parameters:
aJSPContextServices - com.ibm.dse.cs.html.JspContextServices

setProperty

public void setProperty(java.lang.String aPropertyName,
                        java.lang.Object aPropertyValue)
Associates a value to a given key.Property names are case-sensitive
Specified by:
setProperty in interface JSPComponent
Tags copied from interface: JSPComponent
Parameters:
aPropertyName - java.lang.String
aPropertyValue - java.lang.String

toHTMLString

public abstract java.lang.String toHTMLString()
The renderer of the JSPBean
Specified by:
toHTMLString in interface JSPComponent
Returns:
string