cancel
Showing results for 
Search instead for 
Did you mean: 

Populate Item List Box

Former Member
0 Kudos

Hi,

How can you populate an Item List Box with values from Simple type?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Malita,

Create a variable(Say ListBox) in context and assign the dictionary simple type to this.

I assume the node for ListBox is ItemListBox with an attribute Value. Bind ItemListBox to datasource and Val to text

The following program loads value from the dictionary simple type enumeration to ListBox

IWDAttributeInfo att=wdContext.getNodeInfo().getAttribute(IPrivateFileUploadView.IContextElement.LIST_BOX);

ISimpleTypeModifiable ss=att.getModifiableSimpleType();

IModifiableSimpleValueSet sss=ss.getSVServices().getModifiableSimpleValueSet();

Iterator it=sss.entrySet().iterator();

IPrivateFileUploadView.IItemListBoxNode lNode=wdContext.nodeItemListBox();

IPrivateFileUploadView.IItemListBoxElement lEl;

while(it.hasNext())

{

Map.Entry m=(Map.Entry)it.next();

String key=""+m.getKey();

String val=""+m.getValue();

lEl=lNode.createItemListBoxElement();

lNode.addElement(lEl);

lEl.setValue(val);

}

Regards

Fahad Hamsa

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanx... viji n Fahad

Former Member
0 Kudos

hi,

chk out this link

<i><b></b></i>

Regards,

viji

Former Member
0 Kudos

Hi Malita,

Here is a help for

<a href="http://help.sap.com/saphelp_nw04s/helpdata/en/b9/4ce641fb6e3f5de10000000a1550b0/frameset.htm">ItemListBox</a>. Chek it out.