The interface IF_WD_CONTEXT_NODE_INFO is the interface of the metadata of a Context node and is used to describe what the data looks like.
Each context node contains a reference to a node info that contains the metadata. Below is the most important metadata that can be accessed using IF_WD_CONTEXT_NODE_INFO:
· Name (GET_NAME)
· Singleton (IS_SINGLETON)
· Multiple node (IS_MULTIPLE)
· Mandatory node (IS_MANDATORY)
· Mandatory selection (IS_MANDATORY_SELECTION)
· Multiple selection (IS_MULTIPLE_SELECTION)
The GET methods supply the attributes of a context node and child node, among others. The GET methods are used to retrieve the single components of a context node.
GET Methods
Method |
Description |
GET_ATTRIBUT GET_ATTRIBUTES |
Retrieves one or all attributes |
GET_CHILD_NODE GET_CHILD_NODES |
Retrieves one or all child nodes |
GET_ATTRIBUTE_VALUEHELP_TYPE |
Retrieves the type of Input Help: The type may be, for example, an ABAP dictionary search help or an OVS input help. |
GET_CONTROLLER |
Retrieves the associated controller |
GET_NAME |
Retrieves the name of the context node |
GET_PARENT |
Retrieves the parent node of the respective context node |
GET_STATIC_ATTRIBUTES_TYPE |
Gets an RTTI instance for the node attributes that have been declared static. For more information about RTTI see the documentation for class CL_ABAP_TYPEDESCR in the system. |
FOLLOW_PATH |
Retrieves the whole path expression that you can use for separate calls to the target node. The separate node names are separated from each other with periods. |
Single components are retrieved using the respective name. Multiple components are retrieved using a table.
The HAS/IS methods are used to retrieve the different properties and statuses of a context node.
HAS/IS Methods
Method |
Description |
HAS_ATTRIBUTE_VALUE_HELP |
Queries whether an input help is available for the context attribute |
IS_CHILD_NODE_RECURSIVE |
Queries whether the child node is recursive or not. See the relevant section under Context. |
IS_FINALIZED |
Establishes that the node information cannot be changed This corresponds to the Read-Only property in the development environment. |
IS_INITIALIZE_LEAD_SELECTION |
Establishes that the lead selection is automatically initialized by the runtime, that is, it is always set. This corresponds to the Initialization Lead Selection property in the development environment. |
IS_MANDATORY IS_MULTIPLE |
Determines the number of node elements. As a result these two methods establishes the Cardinality in the development environment (see also the relevant section in Context Node Properties). IS_MANDATORY ascertains that the current context node has at least one node element. IS_MULTIPLE ascertains that the current context node can have at least several node elements. |
IS_MANDATORY_SELECTION IS_MULTIPLE_SELECTION |
Determines the number of node elements that can be selected in view elements. These two methods determine the selection cardinality in the development environment. IS_MANDATORY_SELECTION determines that a node element must always be selected. IS_MULTIPLE_SELECTION determines that several node elements can be selected. |
IS_MAPPING_COMPLETE |
Determines whether mapping is complete. |
IS_SINGLETON |
Determines whether the context node is a singleton (see also the relevant section in Context Node Properties). So this method corresponds to the property Singleton in the development environment. A node with the property singleton exists at runtime only for the lead selection of the parent node. This allows the Web Dynpro runtime a context hierarchy with an optimized memory structure |
The ADD methods allows attributes of a context node or child node to be added.
ADD Methods
Method |
Description |
ADD_ATTRIBUTE |
Adds an attribute. This corresponds to the context menu Create ® Attribute in the development environment. |
ADD_CHILD_NODE |
Adds a child node. This corresponds to the context menu Create ® Node. |
ADD_NEW_CHILD_NODE |
Creates an info object and adds it as a child node. |
ADD_NEW_MAPPED_CHILD_NODE |
Creates a mapped child node. If the mapping path is specified, it is a standard Mapping. If the path is initial, an externally mappable node needs to be defined. See also External Context Mapping. To complete the mapping, you also need to call the method SET_MAPPING_COMPLETE. |
ADD_RECURSIVE_CHILD_NODE |
Adds a recursive child node. This corresponds to the context menu Create ® Recursive Node in the development environment. |
The SET methods allows attributes of a context node or child node to be set.
SET Methods
Method |
Description |
SET_ATTRIBUTE_VALUE_SET |
Sets the fixed values of an attribute |
SET_FINALIZED |
Sets a property dynamically that cannot be set in the development environment: the node info can no longer be changed, it is constant. |
SET_MAPPING_COMPLETE |
Completes the definition of an externally mappable node. See also ADD_NEW_MAPPED_CHILD_NODE. |
The REMOVE methods allows attributes of a context node or child node to be deleted.
Note that you cannot delete attributes that have been defined as static. You can only delete attributes that were created at runtime.
REMOVE Methods
Method |
Description |
REMOVE_ATTRIBUTE |
Deletes an attribute |
REMOVE_CHILD_NODE |
Deletes a child node |
REMOVE_DYNAMIC_ATTRIBUTES |
Deletes all attributes of a context node |