method bind_table. ********************************************************************* data: lo_node type ref to if_wd_context_node. ********************************************************************* " Validate necessary object initialisation check o_context is bound. " Get the element lo_node = get_node( path ). lo_node->bind_table( exporting new_items = new_items set_initial_elements = set_initial_elements index = index ). endmethod. method CONSTRUCTOR. o_context = context. endmethod. method GET_ATTRIBUTE. ********************************************************************* DATA: lv_elpath TYPE string, lv_attribute TYPE string, lo_element TYPE REF TO if_wd_context_element. ********************************************************************* " Validate necessary object initialisation CHECK o_context IS BOUND. " Determine element path and attribute name get_element_path( EXPORTING path = path IMPORTING elpath = lv_elpath attribute = lv_attribute ). " Get the element lo_element = get_element( lv_elpath ). lo_element->get_attribute( EXPORTING name = lv_attribute IMPORTING value = value ). endmethod. method get_attributes. ********************************************************************* data: lo_node type ref to if_wd_context_node. ********************************************************************* " Validate necessary object initialisation check o_context is bound. " Get the element lo_node = get_node( path ). lo_node->get_static_attributes( importing static_attributes = values ). endmethod. method GET_NODE. ********************************************************************* DATA: lv_path TYPE string, lt_path TYPE TABLE OF string, lv_index TYPE i, lv_length TYPE i, lo_node TYPE REF TO if_wd_context_node. ********************************************************************* " Validate necessary object initialisation CHECK me->o_context IS BOUND. " Read the path into a table SPLIT path AT '/' INTO TABLE lt_path. " Get the path depth DESCRIBE TABLE lt_path LINES lv_length. " Root attributes IF lv_length = 0. lo_node = me->o_context. ENDIF. " Follow the path lv_index = 0. LOOP AT lt_path INTO lv_path. lv_index = lv_index + 1. IF lv_index = 1. " Get first node in the path lo_node = me->o_context->get_child_node( lv_path ). ELSE. " Get next node down the path lo_node = lo_node->get_child_node( lv_path ). ENDIF. ENDLOOP. result = lo_node. endmethod. method get_static_attributes_table. ********************************************************************* data: lo_node type ref to if_wd_context_node. ********************************************************************* " Validate necessary object initialisation check o_context is bound. " Get the element lo_node = get_node( path ). lo_node->get_static_attributes_table( exporting from = from to = to importing table = table ). endmethod. method IS_CHANGED_BY_CLIENT. ********************************************************************* data: lo_node type ref to if_wd_context_node. ********************************************************************* " Validate necessary object initialisation check o_context is bound. " Get the element lo_node = get_node( path ). flag = lo_node->IS_CHANGED_BY_CLIENT( ). endmethod. method RESET_CHANGED_BY_CLIENT. ********************************************************************* data: lo_node type ref to if_wd_context_node. ********************************************************************* " Validate necessary object initialisation check o_context is bound. " Get the element lo_node = get_node( path ). lo_node->RESET_CHANGED_BY_CLIENT( ). endmethod. method SET_ATTRIBUTE. ********************************************************************* DATA: lv_elpath TYPE string, lv_attribute TYPE string, lo_element TYPE REF TO if_wd_context_element. ********************************************************************* " Validate necessary object initialisation CHECK o_context IS BOUND. " Determine element path and attribute name get_element_path( EXPORTING path = path IMPORTING elpath = lv_elpath attribute = lv_attribute ). " Get the element lo_element = get_element( lv_elpath ). lo_element->set_attribute( EXPORTING name = lv_attribute value = value ). endmethod. method set_attributes. ********************************************************************* data: lo_node type ref to if_wd_context_node. ********************************************************************* " Validate necessary object initialisation check o_context is bound. " Get the element lo_node = get_node( path ). lo_node->set_static_attributes( exporting static_attributes = values ). endmethod. method SET_CHANGED_BY_CLIENT. ********************************************************************* data: lo_node type ref to if_wd_context_node. ********************************************************************* " Validate necessary object initialisation check o_context is bound. " Get the element lo_node = get_node( path ). lo_node->SET_CHANGED_BY_CLIENT( flag ). endmethod. method SET_CONTEXT. o_context = context. endmethod. method set_lead_selection. ********************************************************************* data: lo_node type ref to if_wd_context_node. ********************************************************************* " Validate necessary object initialisation check o_context is bound. " Get the element lo_node = get_node( path ). lo_node->set_lead_selection( exporting element = element ). endmethod. method GET_ELEMENT. ********************************************************************* DATA: lo_node TYPE REF TO if_wd_context_node. ********************************************************************* " Validate necessary object initialisation CHECK me->o_context IS BOUND. lo_node = get_node( path ). element = lo_node->get_element( ). endmethod. method GET_ELEMENT_PATH. ********************************************************************* DATA: lv_path TYPE string, lt_path TYPE TABLE OF string, lv_index TYPE i, lv_length TYPE i, lv_lengm1 TYPE i. ********************************************************************* " Read the path into a table SPLIT path AT '/' INTO TABLE lt_path. " Get the path depth DESCRIBE TABLE lt_path LINES lv_length. lv_lengm1 = lv_length - 1. " Follow the path lv_index = 0. LOOP AT lt_path INTO lv_path. lv_index = lv_index + 1. IF lv_index < lv_length. CONCATENATE elpath lv_path INTO elpath. IF lv_index < lv_lengm1. CONCATENATE elpath '/' INTO elpath. ENDIF. ELSE. attribute = lv_path. ENDIF. ENDLOOP. endmethod. ATTRIBUTE O_CONTEXT Instance Attribute Public Type Ref To IF_WD_CONTEXT_NODE Web Dynpro: Interface for Context Nodes