cancel
Showing results for 
Search instead for 
Did you mean: 

Adding values to ItemListBox

Former Member
0 Kudos

Hi,

I have requirement like this,

I want to place an ItemListBox in my view,

Could you please suggesst me some steps to add values in the ItemListBox.

Then how to select single or muliple values.

Regards,

Anitha.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Anitha,

Follow the procedure:

1. Create a Context Node say Vn_List and two attribute within say Va_Name and say Va_EmpNo.

2. Insert UI element ItemListBox in your view and bind the DATASOURCE to the node, Text to Va_EmpNo and DESCRIPTION to Va_Name. Let VISIBLE ITEM to be 5 and width to 250px.

3. Now in case you want to add item to this list , simply add elements to the node Vn_List setting the attributes within. In actual scenarios, usually, you pick up values from any other node displayed as table/itemlistbox and then create new element in thisVn_List Node corresponding to the selected value to be added into the list.

Regards,

Tushar Sinha

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Tushar,

Thanks for your immediate reply. I can able to insert values in itemlistbox

Could you please give give me steps, how to select and fetch the muliple values from itemlistbox.

I want to perform visibility function for certain UI elements according to the values selected from itemlistbox.

User can able to select multiple values and according to the multiple selection, the visibility of UI element changes.

Regards,

Anitha.

Former Member
0 Kudos

Hi Anitha,

First of all set the node bound to the itemlistbox with cardinality 0..n and selection 0..n

This will let it contain 0 to n elements and at the same time let user select 0 to n elements in it.

Also, set multipleSelection property of ItemListBox to true.

Since the only event for this UI element is onLeadSelect and your requirement is to trigger event after multiple selection, you need to trigger your event on action of a button instead. In the action of the button, use a for loop across the node size and then check if the ItemListBox element at a particular index is multiple selected using

boolean b_IsSelected = wdContext.node<Your Item List Box Node>().isMultiSelected(index i);

If b_IsSelected comes to be true then you can modify the visibility of any UI element as you wish.

Regards,

Tushar Sinha