cancel
Showing results for 
Search instead for 
Did you mean: 

how to get the selected value thru "selection" attribute in listbox

Former Member
0 Kudos

Hi frnds,

In the listbox i have selected one value.i want to read this value. With the following code i am not getting the value but where if iam using "selections" attribute am getting the value which is in table form.According to my requirement i shouldnt take the selected value from table(i.e.,table string) eventhough its possible.Can anybode plese tell me how to use this attribute.

Layout:

<htmlb:listBox id = "list"

nameOfKeyColumn = "vbeln"

nameOfValueColumn = "vbeln"

width = "200 px"

selection = "<%= sel_value%>"

table = "<%=sales%>" />

Event Handler :

IF event_id = CL_HTMLB_MANAGER=>EVENT_ID.

DATA: event TYPE REF TO CL_HTMLB_EVENT,

event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).

IF event->id = 'button1' AND event->event_type = 'click'.

DATA: data TYPE REF TO CL_HTMLB_LISTBOX.

data ?= CL_HTMLB_MANAGER=>GET_DATA(

request = runtime->server->request

name = 'listbox'

id = 'list' ).

IF data IS NOT INITIAL.

-


sel_value = data->selection.

(here am not getting the selected value into sel_value.)

-


Page Attributes:

sel_value type vbak-vbeln

or

sel_value type string.

(here just i have tried in both the ways)

with regards

sireesha.

Accepted Solutions (0)

Answers (1)

Answers (1)

athavanraja
Active Contributor
0 Kudos

check out the sample application

htmlb_samples/listboxSample.htm

Regards

Raja