cancel
Showing results for 
Search instead for 
Did you mean: 

UI Element ButtonRow

Former Member
0 Kudos

Hi,

how can I dynamic create an element ButtonRow with ButtonRowItem?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

You can use the following lines of code in your WdModifyView()

IWDButtonRow buttonRow = (IWDButtonRow) view.createElement(IWDButtonRow.class,"ButtonRow");

IWDButtonRowItem item = (IWDButtonRowItem) view.createElement(IWDButtonRowItem.class,"item");

buttonRow.addButton(item);

This will create a button inside the buttonRow.

thanks & regards,

Manoj

Former Member
0 Kudos

Hello,

thank you for your suggestion. I have tried this one:

wdButtonRowItem = (IWDButtonRowItem) view.createElementIWDButtonRowItem.class, "item");

in wdModifyView(). But I got this error:

java.lang.NoSuchMethodException: com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDButtonRowItem.<init>(com.sap.tc.webdynpro.progmodel.view.View, java.lang.String).

I am working with the trial version of NW 2004s (7.0).

regards

Janusz

Former Member
0 Kudos

hi,

Ya even, i am getting the same exception.

But i can suggest you a workaround. You can create the button instead of buttonRowItem and add it to the buttonRow in the same as you are doing.

This will work surely.

thanks & regards,

Manoj

Former Member
0 Kudos

That's because ButtonRowItem is just a marker interface. You have to create some implementing UI element (e.g. IWDButton) and add it to the button row.

Armin

Former Member
0 Kudos

Hello Armin,

thanks for the very good tip.

Thanks a lot also for Manoj.

regards

Janusz

Answers (1)

Answers (1)

Former Member
0 Kudos

You can create an empty button row in design time and fill dynamically at runtime.

(Set visibilty to false if you dont need it)