com.sapportals.htmlb

Class StatefulButtonBase

java.lang.Object
  extended bycom.sapportals.htmlb.Component
      extended bycom.sapportals.htmlb.EventValidationComponent
          extended bycom.sapportals.htmlb.StatefulButtonBase
All Implemented Interfaces:
IEventValidationComponent
Direct Known Subclasses:
Checkbox, RadioButton

public abstract class StatefulButtonBase
extends EventValidationComponent

Base class for RadioButtons and Checkboxes

Copyright 2004 SAP AG


Field Summary
static int VAR_CONTENT
           
static int VAR_CONTENTFORGROUP
           
static int VAR_ELEMENT
           
static int VAR_ELEMENTFORGROUP
           
 
Constructor Summary
StatefulButtonBase()
           
 
Method Summary
 Component getElement()
          get arbitrary component which should be rendered together with checkbox
 String getKey()
           
 String getText()
          Gets current element as text.
 String getTooltip()
           
 boolean hasValidTooltip()
          check for valid tooltip (i.e. not null and length > 0)
 boolean isEncode()
           
 void setElement(Component component)
          set arbitrary component as element to be rendered together with checkbox
 void setEncode(boolean encode)
           
 void setKey(String key)
           
 void setText(String text)
          Set text for checkbox.
 void setTooltip(String tooltip)
           
 String toString()
           
 
Methods inherited from class com.sapportals.htmlb.EventValidationComponent
getAllValidators, getClientEvent, getClientEventMap, getErrorText, getServerEvent, getServerEventMap, getValidator, isDisabled, isEnabled, isRequiresValidation, renderJavascriptInterface, setClientEvent, setDisabled, setEnabled, setErrorText, setRequiresValidation, setServerEvent, setValidator
 
Methods inherited from class com.sapportals.htmlb.Component
getEncodedIdForForm, getId, getParent, getUI, initFromPageContext, initFromShortId, initializeFromId, isJsObjectNeeded, preRender, render, renderAsString, requiresForm, setId, setJsObjectNeeded, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VAR_ELEMENT

public static final int VAR_ELEMENT
See Also:
Constant Field Values

VAR_CONTENT

public static final int VAR_CONTENT
See Also:
Constant Field Values

VAR_ELEMENTFORGROUP

public static final int VAR_ELEMENTFORGROUP
See Also:
Constant Field Values

VAR_CONTENTFORGROUP

public static final int VAR_CONTENTFORGROUP
See Also:
Constant Field Values
Constructor Detail

StatefulButtonBase

public StatefulButtonBase()
Method Detail

hasValidTooltip

public boolean hasValidTooltip()
check for valid tooltip (i.e. not null and length > 0)


isEncode

public boolean isEncode()

setEncode

public void setEncode(boolean encode)

getKey

public String getKey()

setKey

public void setKey(String key)

getTooltip

public String getTooltip()

setTooltip

public void setTooltip(String tooltip)

getText

public String getText()
Gets current element as text. If current element is not of type String then toString() will return String representation.

Returns:
current element as String

setText

public void setText(String text)
Set text for checkbox. This will delete any previously set element.

Parameters:
text - for checkbox

setElement

public void setElement(Component component)
set arbitrary component as element to be rendered together with checkbox

Parameters:
component - Component to render with checkbox

getElement

public Component getElement()
get arbitrary component which should be rendered together with checkbox

Returns:
component Component to render with checkbox

toString

public String toString()


Copyright 2006 SAP AG Complete Copyright Notice