Skip to Content
Former Member
Apr 28, 2006 at 10:21 AM

Checkbox and button


Hi forum!

I have a little problem with a checkbox and a button..

I want to do queries when i click on a button, a query A when the checkbox is not checked and a query B when the checkbox is checked.

Well, on the layout:

         <htmlb:checkboxGroup id="myCheck" columnCount="1" >
         <htmlb:checkbox id        = "cb1"
                         text      = "Checkbox without nested elements"
                         tooltip   = "Click the checkbox, clicking thetext does not work"
                         checked   = "<%=checked%>"   >

       <htmlb:button       id            = "boton"
                           text          = "Realizar consulta"
                           tooltip       = "Pulse para comenzar la busqueda"
                           onClick       = "oninputprocessing()"
                           design        = "emphasized"></htmlb:button>

But OnInputProcessing, i have to know if the checkbox is checked..

DATA: event  TYPE REF TO cl_htmlb_event,
      button_event TYPE REF TO cl_htmlb_event_button,
      chkbox1 type ref to cl_htmlb_checkbox.

 event ?= cl_htmlb_manager=>get_event( runtime->server->request ).
request = runtime->server->request
name = 'checkbox'
id = 'cb1' ).

  IF event->name = 'button' AND event->event_type = 'click'.
    button_event ?= event.

   CASE button_event->id.

    WHEN 'boton'.
* I now how to know if the checkbox is really checked¿?¿?

Thanks and regards!!