Entering content frame

Background documentation IF_WD_COMPONENT_USAGE Locate the document in its SAP Library structure

The IF_WD_COMPONENT_USAGE interface enables you to access methods for manipulating an (external) Web Dynpro component that is used within a Web Dynpro component.

In order to use a different Web Dynpro component, you have to maintain the properties of the component itself, as well as the properties of the controller that wants to access the component that is used. The following method call then returns an object of type IF_WD_COMPONENT_USAGE within this controller:

data:

    component_usage type ref to if_wd_component_usage.

    component_usage = wd_this->wd_cpuse_<Name der Component-Usage>( ).

Methods

CREATE_COMPONENT

This method creates the Web Dynpro component to which the component usage points.

If an active component instance already exists for this component usage, a runtime error results when this method is called. For this reason before calling this method use HAS_ACTIVE_COMPONENT to check whether an active instance of this component already exists.

DELETE_COMPONENT

This method deletes  the Web Dynpro component to which the component usage points.

This method cannot be called if no active instance of the component exists for the component usage.

HAS_ACTIVE_COMPONENT

This method specifies whether the Web Dynpro component that the component usage points to was already created, and if it is active.

GET_IMPLEMENTING_IF_VIEW_INFO

This method returns the metadata description of an interface view.

The result is an object of type IF_WD_RR_INTERFACE_VIEW.

GET_INTERFACE_CONTROLLER

This method returns a reference to the interface controller of a Web Dynpro component.

The result type of the method depends on the concrete definition of the interface controller in a Web Dynpro component and can be found in this controller’s properties.

ADD_EVENT_HANDLER

This method can be used to register an event handler on an event dynamically at runtime.

CREATE_COMP_USAGE_OF_SAME_TYPE

This method creates a component usage that refers to the same component.

The result is an object of type IF_WD_COMPONENT_USAGE.

ENTER_REFERENCING_MODE

You can use this method to determine that one component usage refers to a different component usage.

Note the following:

·        The component usage that should point to a different component usage (referencing component usage) must not have any active components.

·        The referencing component usage must refer to the same component as the referenced component usage.

GET_COMPONENT_USAGE_INFO

This method returns the metadata description of the component usage.

The result is an object of type IF_WD_RR_COMPONENT_USAGE.

IS_REFERENCING

This method specifies whether the component usage refers to a different component usage.

The result can be ’X’ (the component usage points to a different component usage) or ‘ ’ (the component usage does not refer to a different component usage).

IS_REFERENCED

This method specifies whether the component usage is referenced by a different component usage.

The result can be ’X’ (the component usage is referenced by a different component usage) or ‘ ’ (the component usage is not referenced by a different component usage).

LEAVE_REFERENCING_MODE

This method has the effect that the component usage no longer refers to a different component usage.

REMOVE_EVENT_HANDLER

This method can be used to deregister an event handler on an event dynamically at runtime.

 

 

Leaving content frame