cancel
Showing results for 
Search instead for 
Did you mean: 

URGENT: How to remove an Item from HTMLB listbox

Former Member
0 Kudos

Hi All,

I am designing a page, which contains a listbox, whose contents(items) need to be changed dynamically.

I can populate it dynamically using

listbox.addItem(key, string)

But, i don't see any specific methods to remove an item from it.

Please Help Me in this Regard..

vijay

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Detlev

Do you honestly believe the answer given by yohalakshmi is right?if it is yes i dont mind giving points to her answer pls verify your answer along with hers..then you tell me ..whether i should reward her or not..anyhow thanks a lot for your help..i appreciate it..

detlev_beutner
Active Contributor
0 Kudos

Hi Vijay,

no, it refers to removing the selection, not to removing the entry from the list.

Best regards

Detlev

detlev_beutner
Active Contributor
0 Kudos

Hi Vijay,

(a) every request on SDN is expected as urgent... If you won't use this word in the future, you'll have more time for solving your problems

(b) If your listbox.getModel() returns the DefaultListModel, you can call removeItem(String key) on the model; see http://media.sdn.sap.com/javadocs/preNW04/SP2/60_sp2_javadocs/htmlb/com/sapportals/htmlb/DefaultList... for details

Hope it helps

Detlev

PS: Please consider rewarding points for helpful answers on SDN. Thanks in advance!

Former Member
0 Kudos

Hi

The below specified method will be usefull i suppose.

The syntax is as follows.

public void removeSelection(java.lang.String selection)Removes an item from the selected items list.

Parameters:

selection - Key of the item to be deleted from the selected item list.

Reward points for helpful answers.

Regards,

Yoga