Skip to Content
0
Former Member
Jun 12, 2006 at 07:53 AM

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

15 Views

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.