Show TOC Start of Content Area

Procedure documentation Implementing Parameter Mapping  Locate the document in its SAP Library structure

You can implement parameter mapping dynamically.

Procedures

Set Constant Values to Action Parameters

...

       1.      Insert the following code into the wdDoModifyView method:

...

if(firstTime){

IWDCheckBox theCheckBox =(IWDCheckbox)view.getElement("<UI element Id>");

theCheckBox.mappingOfOnToggle().setBoolean("<action parameter name>", true);

}

Note 

The action parameter name is case sensitive.

The methods addParameter of IWDParameterMapping are deprecated, use the following methods instead, depending on the parameter type:

      setBoolean(String name, boolean value)

      setByte(String name, byte value)

      setChar(String name, char value)

      setDouble(String name, double value)

      setFloat(String name, float value)

      setInt(String name, int value)

      setLong(String name, long value)

      setShort(String name, short value)

      setString(String name, String value)

The parameter name refers to the action parameter name.

Map Existing Event Parameters to Existing Action Parameters

       1.      Insert the following code into the wdDoModifyView method:

if(firstTime){

IWDCheckBox theCheckBox =(IWDCheckBox)view.getElement("<UI element Id>");

theCheckBox.mappingOfOnToggle().addSourceMapping(IWDCheckBox.IWDOnToggle.CHECKED,

      "<action parameter name>");

}

Note 

You can use the typed constant parameter name. for the generic event parameter it is for example: IWDButton.IWDOnAction.NODE_ELEMENT.

Example

Suppose you have a Button with ID GenderSelector and an action with parameter female of type boolean, the code will look like this:

if (firstTime)

   {

    IWDButton genderSelector = (IWDButton) view.getElement("GenderSelector");

    genderSelector.mappingOfOnAction().setBoolean("female", true);

   }

 

End of Content Area