cancel
Showing results for 
Search instead for 
Did you mean: 

how to handle onclick event for checkbox via bsp_wd_cmpwb

Former Member
0 Kudos

Hi,

When i set a breakpoint in method 'DO_HANDLE_EVENT' of view controller and click checkbox on webUI, it willnot go to the breakpoint. And how could i handle the onclick event of the checkbox (in P-METHOD?) ?

BR

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

In get p method of your field write following code



CASE iv_property.
    WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
      rv_value = cl_bsp_dlc_view_descriptor=>field_type_checkbox.
    WHEN if_bsp_wd_model_setter_getter=>fp_server_event.
      rv_value = 'YOUR_EVENT'.

  ENDCASE.

Becasuse of this code when checkbox is checked, it will navigate to eh_onyour_event method and also debugger will stop in do_handle_event.

Best regards

PAnkaj Kuamr

Answers (1)

Answers (1)

saumya_govil
Active Contributor
0 Kudos

Hi Gang Li,

As suggested by Pankaj, add the logic in the GET_P method of the checkbox attribute.

Create an Event and pass it to rv_value in :

WHEN if_bsp_wd_model_setter_getter=>fp_server_event.

Put logic in the created event for the operation to be performed.

Hope this helps!

Regards,

Saumya