cancel
Showing results for 
Search instead for 
Did you mean: 

Handling events on phtmlb components (f.e. Menubar)

Former Member
0 Kudos

Hello,

Does anyone have experience with the handling of events on phtmlb components?

I'm developing a BSP application with htmlb components (dropdown, buttons,..) as well as phtmlb component (Menubar).

Everything is going ok with the buttons: in oninputprocessing i can capture the event with the statments:

DATA: event TYPE REF TO cl_htmlb_event.

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

Unfortunately, when I press on a menubar-item I also pass oninputprocessing (through debugging), but when I check the event (see the code above), the event is empty... Do I have to capture the event in another way?

Anyone having any idea? Many thanks in advance!

grtz

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member188685
Active Contributor
0 Kudos

Check the BSP application sbspext_phtmlb

page menuBar.htm

>Unfortunately, when I press on a menubar-item I also pass >oninputprocessing

you need to set the event for onItemClick of menu

Former Member
0 Kudos

Hi Vijay,

Thanks for the reply!

I already had a look at the example application. Unfortunately the example does not show how the event is catched.

As you mentioned I added the parameter onClickItem but when I check the 'event' variable in the inputprocessing, it is empty.

<phtmlb:menuBar id = "myMenuBar"

design = "TRANSPARENT"

width = "100%"

onItemClick = "ocLinkTest"

items = "<%= items %>" />

former_member188685
Active Contributor
0 Kudos

you can get the event information using the cl_htmlb_manager class.

data: men_even type ref to if_htmlb_data.

men_even = cl_htmlb_manager=>GET_EVENT_EX( runtime->server->request ).

using the below two attributes you can differentiate which option is selected from menu

men-SELECTED_STRING

men-SELECTED_ID