Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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:checkbox>                
                         
         </htmlb:checkboxGroup>  


       <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 ).
 
 chkbox1 ?= CL_HTMLB_MANAGER=>GET_DATA(
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┬┐?┬┐?
*
.
.
.
.
.
endIF.

Thanks and regards!!

Mon

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question