Code: Alles auswählen.
loop at lt_groups into wa_groups.
wa_tab-treeid = 'cattree'.
wa_tab-parentid = wa_groups-parent.
wa_tab-childid = wa_groups-id.
wa_tab-text = wa_groups-name.
wa_tab-link = ''.
wa_tab-click = 'Test'.
wa_tab-STATUS = 'close'.
wa_tab-tlevel = ''.
append wa_tab to lt_treetab.
endloop.
Code: Alles auswählen.
* event handler for checking and processing user input and
* for defining navigation
CLASS cl_htmlb_manager DEFINITION LOAD.
* Optional: test that this is an event from HTMLB library.
IF event_id = cl_htmlb_manager=>event_id.
* See if upload is triggered from button
DATA: event TYPE REF TO cl_htmlb_event.
event = cl_htmlb_manager=>get_event( runtime->server->request ).
IF event->name = 'tree' AND event->event_type = 'click'.
DATA: tree_event TYPE REF TO cl_htmlb_event_tree.
tree_event ?= event.
ENDIF.
CASE event->id.
WHEN 'cattree'.
Code: Alles auswählen.
class cl_htmlb_manager definition load.
if event_id = cl_htmlb_manager=>event_id.
event = cl_htmlb_manager=>get_event( runtime->server->request ).
if event is not initial and event->name = htmlb_events=>tree.
data: tree_event type ref to cl_htmlb_event_tree.
tree_event ?= event.
case tree_event->name.
when 'tree'.
read table <name der tabelle mit treedaten>
into <wa> with key nodeid = tree_event->node.
if sy-subrc = 0.
*
*
*
endif.
endcase.
endif.
endif.
Code: Alles auswählen.
* event handler for checking and processing user input and
* for defining navigation
class cl_htmlb_manager definition load.
* Optional: test that this is an event from HTMLB library.
if event_id = cl_htmlb_manager=>event_id.
* See if upload is triggered from button
data: event type ref to cl_htmlb_event.
event = cl_htmlb_manager=>get_event( runtime->server->request ).
if event->name = 'tree' and event->event_type = 'click'.
data: tree_event type ref to cl_htmlb_event_tree.
tree_event ?= event.
endif.
* htmlb event
case event->id.
when 'cattree'.
data: lt_treetab type tview,
wa_tab like line of lt_treetab.
read table lt_treetab
into wa_tab with key childid = tree_event->node.
if sy-subrc = 0.
endif.
Code: Alles auswählen.
data: wa_tab type tviewnode.
data: tree_event type ref to cl_htmlb_event_tree.
read table tab
into wa_tab with key childid = tree_event->node.
Code: Alles auswählen.
IF event IS NOT INITIAL
AND event->event_type = 'cellClick'.
tree_event ?= event.
*** REFERENZ VON tv auf tree Objekt
tv ?= cl_htmlb_manager=>get_data(
request = runtime->server->request
name = 'DeinTree'
id = 'TreeID' ).
*** REFERENZ AUF DIE TV DATEN
tree_event = tv->data.