cancel
Showing results for 
Search instead for 
Did you mean: 

How to populate Item List box

Former Member
0 Kudos

Could someone please tell me how to populate an ItemLIstBox in Java Web Dynpro.

I need to populate it with values obtained from RFC.

I have searched the forums, but can't find anything useful.

I want to be able to select one or more items from the list box and onaction accordingly.

Is the itemListBox the best thing to use?

thanks in advance

Anton

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi anton

chk this thread. it should be helpful for you:

regards

Kunal Saggar

Award points if it helps you

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Anton,

For the Item List Box in Web Dynpro for Java you can refer to the following link.

http://help.sap.com/saphelp_nw2004s/helpdata/en/f2/673942dd4af83ae10000000a1550b0/frameset.htm

Once you have created the Item List Box UI element, create a context node say,

Test_Items (Cardinality 0..n), and create a string context attribute say Items in

this node.

Bind the Context node Test_Items to the datasource property of the item list box,

and the text property to the context attribute Items.

in wDoInit() write this piece of code:

IPrivateTestITBView.ITest_ItemsElement l_test_ele;
    for(int i = 0; i < 10; i++)
    {
    	l_test_ele = wdContext.nodeTest_Items().createTest_ItemsElement();
    	l_test_ele.setItems("ITEM "+i);
		wdContext.nodeTest_Items().addElement(l_test_ele);    	
    	
    }

At line 5 instead of ("ITEM "+i) you can put your own string as required.

Regards,

Alka.

sid_sunny
Contributor
0 Kudos

Hi Anton,

Refer to this thread

Regards

Sid

Former Member
0 Kudos

thanks, but most of the links describe populating in ABAP not Java and the other (java) links don't describe populating the list box, just using the values afterwards.