cancel
Showing results for 
Search instead for 
Did you mean: 

How to add dropdownlist dynamically?

Former Member
0 Kudos

Hi experts...

I want to add Dropdown list dynamically , i wrote bilow code for creating dynamic dropdown i dont know how to bind?

can any one help me?

" IWDTransparentContainer container1 = (IWDTransparentContainer)view.getElement("RootUIElementContainer");

IWDDropDownByIndex dropdown = (IWDDropDownByIndex)view.createElement(IWDDropDownByIndex.class, "DropDown1"); "

Regards

Sharada

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

As you can read in the Javadoc, a DropDownByIndex UI element needs a context node with cardinality 0:n and an attribute of type "string" inside that node. Say your context already contains such a node named "Items" with an attribute named "text", then the code to bind the drop-down list is


IWDDropDownByIndex ddList = view.createElement(IWDDropDownByIndex.class, "ddListID" /* may be null */);
IWDNodeInfo nodeInfo = wdContext.nodeItems().getNodeInfo();
IWDAttributeInfo attributeInfo = nodeInfo.getAttribute(IItemsElement.TEXT);
ddList.bindTexts(attributeInfo);

Former Member
0 Kudos

hello Sharada

Follow the below link which clearly explains How to add dropdownlist dynamically

BR

SS