The name of a component controller class is based on the component name. Component names should end with the suffix Comp.
The component controller class implements the following component interface controllers:
● Local Component Interface: It is defined within the local component interface of the component, the component controller belongs to.
● Standalone Component Interface. standalone component Interfaces are defined outside an implementing component. The component, the component controller belongs to, can define several implementation relations to standalone component interfaces. All component controller interfaces (its context, methods and events) which are defined in these related standalone component Interfaces must be implemented by the component controller class.
A component controller has the same lifespan as the component it belongs to. The creation or the destruction of a component instance implies the creation or the destruction of the related component controller instance.
For component usages with the lifecycle-property createOnDemand the component creation is automatically done by the Web Dynpro Java Runtime when the IExternal API of the component interface controller is invoked within custom application code.
Additional Predefined Hook Methods |
|
|
public void wdDoApplicationStateChange( Hook that informs the application about a state change. This hook is called e.g. to tell the application that it will be ● left via a suspend plug and therefore should go into a suspend/sleep mode with minimal need of resources. ● left due to a timeout and could write it's state to a data base if the user comes back later on. The concrete reason is available via the IWDApplicationStateChangeInfo-API. Important: This hook is called for the top level component only! |
|
public void wdDoBeforeNavigation(boolean isCurrentRoot) Hook
before the navigation phase starts. This hook allows you to flush the model
queue and handle any errors that occur. Firing outbound plugs is allowed in
this hook. Using preorder depth-first traversal, this hook is called for all
component controllers starting with the current root component. |
|
public void wdDoPostProcessing(boolean isCurrentRoot) Hook called to
handle data retrieval errors before rendering. After wdDoModifyView(), the Web Dynpro Framework gets all context
data needed for rendering by validating the contexts (which in turn calls the
supply functions and supplying relation roles). In this hook, the application
should handle the errors which occurred during validation of the contexts.
Using preorder depth-first traversal, this hook is called for all component
controllers starting with the current root component. Permitted operations: Flushing model queue, creating messages, reading context and model data Forbidden operations: Invalidating model data, manipulating the context, firing outbound plugs, creating components |
Predefined Shortcut Variables |
|
|
private final IWDComponent wdControllerAPI A shortcut for wdThis.wdGetAPI(). Represents the generic controller API IWDComponent of the generic Web Dynpro counterpart for this controller. |
|
wdThis, wdComponentAPI, wdContext More information: Common controller class reference |