cancel
Showing results for 
Search instead for 
Did you mean: 

Parameter-Action

Former Member
0 Kudos

I can give a Parameter to action at run time, is it possible to give a parameter at design time itself to a action ??? if so how???

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Open the view controller editor, select tab "Actions", select the action and add the parameters you need.

Armin

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi meenu,

YES..at time of creation action...

You can pass extra parameter paass to your action method..then you have to do one thing.

paramter which you want to pass to action class then you paramerter will be created in WDDomodify method.

public static void wdDoModifyView(IPrivateMyView wdThis,

IPrivateMyView.IContextNode wdContext,

IWDView view, boolean firstTime)

{

if (firstTime)

{

for (int index = 0;index < 10;index ++)

{

IWDButton btn = (IWDButton)view.createElement(IWDButton.class,"tbtm"+index);

btn.setText(getSomeText(index));

btn.setOnAction(wdThis.wdGetGenericAction());

btn.mappingOfOnAction().addParameter("comid",index);

}

}

}

///at time of creatin you have to put paramter

public void onButtonAction (IWDCustomEvent wdEvent , int commandId )

{

// your code

}

thanks

Jati

Former Member
0 Kudos

Hi Meenu,

Refer SAP NetWeaver Library http://help.sap.com/saphelp_nw04s/helpdata/en/60/1f1f056f057d4d962375efd3c92ed0/frameset.htm and associated links which may be helpful.

Kind Regards,

Nitin