com.sapportals.htmlb

Class EventValidationContainer

java.lang.Object
  extended bycom.sapportals.htmlb.Component
      extended bycom.sapportals.htmlb.Container
          extended bycom.sapportals.htmlb.EventValidationContainer
All Implemented Interfaces:
IEventValidationComponent
Direct Known Subclasses:
Link, TableView, Tray

public abstract class EventValidationContainer
extends Container
implements IEventValidationComponent


Field Summary
 
Fields inherited from class com.sapportals.htmlb.Container
elements
 
Constructor Summary
EventValidationContainer()
           
EventValidationContainer(String id)
           
 
Method Summary
 ArrayList getAllValidators()
          returns all validators, user defined (application validator) and type validaors, for theis component
 String getClientEvent(EventTrigger trigger)
          gets a client event handler (in Javascript) from the list of the events
 HashMap getClientEventMap()
           
 String getErrorText()
          returns the error text used for validation
 Event getServerEvent(EventTrigger trigger)
          gets an event handler from the list of the events
 HashMap getServerEventMap()
           
 Validator getValidator()
          returns application specific validator to the component
 boolean isDisabled()
          Deprecated. return if this button is currently disabled
 boolean isEnabled()
          return if this button is currently disabled
 boolean isRequiresValidation()
          determines if the validation is required or not before submitting server event
 void renderJavascriptInterface(IPageContext renderContext, String generatedId)
           
 void setClientEvent(EventTrigger trigger, String javascript)
          adds a client event handler (in Javascript) to the list of the events null removes the event for the given trigger
 void setDisabled(boolean disabled)
          Deprecated. disable or enable this button
 void setEnabled(boolean enabled)
          disable or enable this button
 void setErrorText(String errortext)
          sets the error text for the validation
 void setServerEvent(EventTrigger trigger, Event event)
          adds an event handler to the list of the events
 void setValidator(Validator validator)
          sets an application specific validator to the component null removes the validator
 
Methods inherited from class com.sapportals.htmlb.Container
addComponent, addRawText, addText, getChildCount, iterator, preRender, removeComponent, render
 
Methods inherited from class com.sapportals.htmlb.Component
getEncodedIdForForm, getId, getParent, getUI, initFromPageContext, initFromShortId, initializeFromId, isJsObjectNeeded, render, renderAsString, requiresForm, setId, setJsObjectNeeded, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventValidationContainer

public EventValidationContainer()

EventValidationContainer

public EventValidationContainer(String id)
Method Detail

setValidator

public void setValidator(Validator validator)
sets an application specific validator to the component null removes the validator

Specified by:
setValidator in interface IEventValidationComponent
Parameters:
validator - a validator to be assigned to the component
See Also:
Validator

getValidator

public Validator getValidator()
returns application specific validator to the component

Specified by:
getValidator in interface IEventValidationComponent
Returns:
validator a validator to be assigned to the component
See Also:
Validator

getAllValidators

public ArrayList getAllValidators()
returns all validators, user defined (application validator) and type validaors, for theis component

Specified by:
getAllValidators in interface IEventValidationComponent

setErrorText

public void setErrorText(String errortext)
sets the error text for the validation

Specified by:
setErrorText in interface IEventValidationComponent

getErrorText

public String getErrorText()
returns the error text used for validation

Specified by:
getErrorText in interface IEventValidationComponent

setClientEvent

public void setClientEvent(EventTrigger trigger,
                           String javascript)
adds a client event handler (in Javascript) to the list of the events null removes the event for the given trigger

Specified by:
setClientEvent in interface IEventValidationComponent
Parameters:
trigger - triggering event, @see com.sapportals.htmlb.enum.EventTrigger
javascript - javascript to execute, be sure to specify return value

getClientEvent

public String getClientEvent(EventTrigger trigger)
gets a client event handler (in Javascript) from the list of the events

Specified by:
getClientEvent in interface IEventValidationComponent
Parameters:
trigger - triggering event, @see com.sapportals.htmlb.enum.EventTrigger
Returns:
javascript javascript to execute, be sure to specify return value

setServerEvent

public void setServerEvent(EventTrigger trigger,
                           Event event)
adds an event handler to the list of the events

Specified by:
setServerEvent in interface IEventValidationComponent
Parameters:
trigger - triggering event, @see com.sapportals.htmlb.enum.EventTrigger
event - object, @see com.sapportals.htmlb.event.Event

getServerEvent

public Event getServerEvent(EventTrigger trigger)
gets an event handler from the list of the events

Specified by:
getServerEvent in interface IEventValidationComponent
Parameters:
trigger - triggering event, @see com.sapportals.htmlb.enum.EventTrigger
Returns:
event object, @see com.sapportals.htmlb.event.Event

getClientEventMap

public HashMap getClientEventMap()
Specified by:
getClientEventMap in interface IEventValidationComponent

getServerEventMap

public HashMap getServerEventMap()
Specified by:
getServerEventMap in interface IEventValidationComponent

isDisabled

public boolean isDisabled()
Deprecated. return if this button is currently disabled

Specified by:
isDisabled in interface IEventValidationComponent
Returns:
true if the button is disabled

setDisabled

public void setDisabled(boolean disabled)
Deprecated. disable or enable this button

Specified by:
setDisabled in interface IEventValidationComponent
Parameters:
disabled - true if the button should be disabled

isEnabled

public boolean isEnabled()
return if this button is currently disabled

Specified by:
isEnabled in interface IEventValidationComponent
Returns:
true if the button is disabled

setEnabled

public void setEnabled(boolean enabled)
disable or enable this button

Specified by:
setEnabled in interface IEventValidationComponent

renderJavascriptInterface

public void renderJavascriptInterface(IPageContext renderContext,
                                      String generatedId)

isRequiresValidation

public boolean isRequiresValidation()
Description copied from interface: IEventValidationComponent
determines if the validation is required or not before submitting server event

Specified by:
isRequiresValidation in interface IEventValidationComponent


Copyright 2006 SAP AG Complete Copyright Notice