cancel
Showing results for 
Search instead for 
Did you mean: 

Navigating one OutBound plug to Two Inboung plugs

Former Member
0 Kudos

Hi Friends,

I developed one application using Radio Buttons. I strucked up at Event Handling. Actually i created one out bound plug and navigated it to two inbound plugs of two diffrent views.

If i click on one radio button it should navigate it to first view orelse if click on second radio button it should to second view.

how can i trigger the particular view based on the radio button i have clicked.

could you people concern this one and give me a bright answer.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

If you use single radio buttons (not RadioButtonGroup):

There is an event RadioButton.onSelect which is triggered when a radio button is selected.

https://media.sdn.sap.com/javadocs/NW04/SPS15/wd/com/sap/tc/webdynpro/clientserver/uielib/standard/a...

This event has a parameter "key" which contains the key representing the selected radio button.

Assign an action to event "onSelect" and define an action parameter "selectedKey".

Map event parameter "key" to action parameter "selectedKey" e.g. by writing the following code inside wdDoModifyView():

if (firstTime)
{
  IWDRadioButton radio = (IWDRadioButton) view.getElement("ID-of-radio-button");
  radio.mappingOfOnSelect().addSourceMapping("key", "selectedKey");
}

The effect is that at runtime, parameter "selectedKey" will contain the key of the selected radio button. In the action handler method you can now use the "selectedKey" parameter to decide which view should be navigated to.

Armin

Former Member
0 Kudos

I think you must make two out bound plugs, one for each in bound.

in Event put


if(<condition>)
{
   wdThis.wdFire<nameOfFirstPlug>();
}
else
{
   wdThis.wdFire<nameOfSecondPlug>();
}