cancel
Showing results for 
Search instead for 
Did you mean: 

create IWDToolBarDropDownByKey dynamically

Former Member
0 Kudos

Hi all,

how can I create the UIElement IWDToolBarDropDownByKey dynamically and set the selected key?

I tried:

...

IWDToolBarDropDownByKey dd = (IWDToolBarDropDownByKey) view.create(IWDToolBarDropDownByKey.class, "dd" + counter);

dd.setSelectedKey("ContextAttributeName");

toolbar.addToolBarRightItem(dd);

ContextAttributeName is a Value Attribute in the Context.

An error occurs:

Path null does not point to an attribute, but to com.sap.tc.webdynpro.progmodel.eneration.DelegatingView

Regards,

Johannes

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Johannes,

Instead of

<i>dd.setSelectedKey("ContextAttributeName");</i>

use one of

<i>dd.bindSelectedKey(reference2IWDAttributeInfo);</i>

or (for attribute in root context)

<i>dd.bindSelectedKey("ContextAttributeName");</i>

or (for attribute of some node)

<i>dd.bindSelectedKey("NodeA.SubnodeB.AttributeX");</i>

Valery Silaev

EPAM Systems

http://www.netweaverteam.com/

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Johannes,

Looks like you some UIElements on the view(DesignTime) .Please check the mandatory attriutes for those UIElements.

What is "toolbar" in your code ??

Regards, Anilkumar