com.sap.tc.webdynpro.clientserver.uielib.standard.api

Interface IWDAbstractToggle

All Superinterfaces:
IWDUIElement, IWDViewElement
All Known Subinterfaces:
IWDAbstractToggleButton, IWDCheckBox, IWDToggleButton, IWDToggleLink, IWDToolBarToggleButton

public interface IWDAbstractToggle
extends IWDUIElement

Web Dynpro AbstractToggle API. Abstract base class of all toggle UIElements.

This type can be called by applications using Web Dynpro, but DO NOT EXTEND OR IMPLEMENT IT!

Type Classification Type Classification:

This interface is part of the Web Dynpro API, so applications may reference it or call any method of it, but they must not implement or extend it.

For a detailed explanation of API classification see the Web Dynpro Compatibility Guide

Nested Class Summary
static interface IWDAbstractToggle.IWDOnToggle
           Interface defining the parameter names for event onToggle.
 
Field Summary
static WDTextDirection DEFAULT_TEXT_DIRECTION
          Default value of the textDirection property is WDTextDirection.INHERIT.
 
Fields inherited from interface com.sap.tc.webdynpro.progmodel.api.IWDUIElement
DEFAULT_ENABLED, DEFAULT_TOOLTIP, DEFAULT_VISIBLE
 
Method Summary
 void bindChecked(IWDAttributeInfo attributeInfo)
          Binds the checked property to the context attribute specified by the given attribute info.
 void bindChecked(String path)
          Binds the checked property to the context attribute specified by the given path.
 String bindingOfChecked()
          Returns the binding path of the checked property.
 String bindingOfTextDirection()
          Returns the binding path of the textDirection property.
 void bindTextDirection(IWDAttributeInfo attributeInfo)
          Binds the textDirection property to the context attribute specified by the given attribute info.
 void bindTextDirection(String path)
          Binds the textDirection property to the context attribute specified by the given path.
 boolean getChecked()
          Returns the value of the checked property.
 IWDAction getOnToggle()
          Returns the action assigned to event onToggle.
 WDTextDirection getTextDirection()
          Returns the value of the textDirection property.
 IWDParameterMapping mappingOfOnToggle()
          Returns the parameter mapping for event onToggle.
 void setChecked(boolean value)
          Sets the checked property to the given value.
 void setOnToggle(IWDAction action)
          Assigns the given action to event onToggle.
 void setTextDirection(WDTextDirection value)
          Sets the textDirection property to the given value.
 
Methods inherited from interface com.sap.tc.webdynpro.progmodel.api.IWDUIElement
bindEnabled, bindEnabled, bindingOfEnabled, bindingOfTooltip, bindingOfVisible, bindTooltip, bindTooltip, bindVisible, bindVisible, createLayoutData, getContainer, getEnabled, getLayoutData, getTooltip, getVisible, setEnabled, setTooltip, setVisible
 
Methods inherited from interface com.sap.tc.webdynpro.progmodel.api.IWDViewElement
destroy, getId, getView, requestFocus
 

Field Detail

DEFAULT_TEXT_DIRECTION

public static final WDTextDirection DEFAULT_TEXT_DIRECTION
Default value of the textDirection property is WDTextDirection.INHERIT.

Method Detail

getOnToggle

public IWDAction getOnToggle()
Returns the action assigned to event onToggle. The action performed when the toggle UI element is toggled. The event parameter is the new checked state.

Returns:
the action assigned to event onToggle
See Also:
mappingOfOnToggle()

setOnToggle

public void setOnToggle(IWDAction action)
Assigns the given action to event onToggle.

Parameters:
action - the action assigned to the event
See Also:
getOnToggle()

mappingOfOnToggle

public IWDParameterMapping mappingOfOnToggle()
Returns the parameter mapping for event onToggle.

To pass UI element event parameter values into action handler parameters, a parameter mapping has to be defined. Add code like the following inside method wdDoModifyView() of the view controller:

 if (firstTime)
 {
   IWDAbstractToggle myAbstractToggle = (IWDAbstractToggle) view.getElement("ID-of-AbstractToggle");
   myAbstractToggle.mappingOfOnToggle().addSourceMapping
   (
     IWDAbstractToggle.IWDOnToggle.CHECKED, // event parameter name
     "name-of-action-parameter" // (type boolean)
   ); 
 }

 

Event onToggle has the following parameters:

Returns:
the parameter mapping for event onToggle
See Also:
getOnToggle()

bindChecked

public void bindChecked(String path)
Binds the checked property to the context attribute specified by the given path.

Note: This property must be bound to the context!

Parameters:
path - the context path of the attribute to which the checked property will be bound

bindChecked

public void bindChecked(IWDAttributeInfo attributeInfo)
Binds the checked property to the context attribute specified by the given attribute info.

Note: This property must be bound to the context!

Parameters:
attributeInfo - the info of the context attribute to which the checked property will be bound

bindingOfChecked

public String bindingOfChecked()
Returns the binding path of the checked property.

Note: This property must be bound to the context!

Returns:
the path of the context attribute to which the checked property is currently bound

getChecked

public boolean getChecked()
Returns the value of the checked property.

The initial value is false.

Note: This property must be bound to the context!

Determines if the toggle UI element is checked (pressed).

Returns:
the current value of the checked property
See Also:
setChecked(boolean)

setChecked

public void setChecked(boolean value)
Sets the checked property to the given value.

Note: This property must be bound to the context!

Parameters:
value - the new value of the checked property
See Also:
getChecked()

bindTextDirection

public void bindTextDirection(String path)
Binds the textDirection property to the context attribute specified by the given path.

Parameters:
path - the context path of the attribute to which the textDirection property will be bound

bindTextDirection

public void bindTextDirection(IWDAttributeInfo attributeInfo)
Binds the textDirection property to the context attribute specified by the given attribute info.

Parameters:
attributeInfo - the info of the context attribute to which the textDirection property will be bound

bindingOfTextDirection

public String bindingOfTextDirection()
Returns the binding path of the textDirection property.

Returns:
the path of the context attribute to which the textDirection property is currently bound

getTextDirection

public WDTextDirection getTextDirection()
Returns the value of the textDirection property.

The initial value is WDTextDirection.INHERIT.

Determines the direction of displayed text.

Returns:
the current value of the textDirection property
See Also:
setTextDirection(WDTextDirection)

setTextDirection

public void setTextDirection(WDTextDirection value)
Sets the textDirection property to the given value.

Parameters:
value - the new value of the textDirection property
See Also:
getTextDirection()


Copyright 2006 SAP AG Complete Copyright Notice