Hello,
As a newby in BSP programming, I'm trying to build a small application with a menu structure . This menu is defined in a page fragment and consists of dropdownlistboxes. The event handling is located in the main page which contains the page fragment.
My problem is that I cannot get these dropdownlist boxes to work. The coding in the page fragment is :
==========================
<htmlb:content>
<htmlb:form>
<htmlb:dropdownListBox id = "myDropdownListBox1"
tooltip = "Tooltip for my DropdownListBox"
onClientSelect = "alert('myDropdownListBox1')"
onSelect = "mySelect" >
<htmlb:listBoxItem key = "k1"
value = "MenuChoice1" />
<htmlb:listBoxItem key = "k2"
value = "MenuChoice2" />
<htmlb:listBoxItem key = "k3"
value = "MenuChoice3" />
<htmlb:listBoxItem key = "k4"
value = "MenuChoice4" />
<htmlb:listBoxItem key = "k5"
value = "MenuChoice5" />
<htmlb:listBoxItem key = "k6"
value = "MenuChoice6" />
</htmlb:dropdownListBox>
</htmlb:form>
</htmlb:content>
==========================
The event handler ( OnInputProcessing ) code is :
==========================
CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
DATA: event TYPE REF TO if_htmlb_data,
ddlb_event TYPE REF TO CL_HTMLB_EVENT_SELECTION.
event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
IF event IS NOT INITIAL AND event->event_name =
'dropdownListBox'.
ddlb_event ?= event.
CASE event->event_id.
WHEN 'myDropdownListBox1'.
CASE ddlb_event->selection.
WHEN 'k1'.
.......( Contains other statements )
WHEN 'k2'.
.......( Contains other statements )
WHEN 'k3'.
.......( Contains other statements )
WHEN 'k4'.
.......( Contains other statements )
WHEN 'k5'.
.......( Contains other statements )
WHEN 'k6'.
.......( Contains other statements )
ENDCASE.
ENDCASE.
ENDIF.
==========================
I have tried several different event handlers including the example in the documentation of the dropdownlistbox HTMLB element, but in the event handler I don't know how to determine the selection made.
I would appreciate it hugely if someone could give me an example how to do this ?
With regards,
Fred van de Langenberg