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.
<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.)
sel_value type vbak-vbeln
sel_value type string.
(here just i have tried in both the ways)