Show TOC

Window Controller Class ReferenceLocate this document in the navigation structure

Definition

Naming Convention

The name of a window controller class is based on the window name. Window names should end with the suffix Win .

Component Interface View Relation

A window can optionally implement one or many component interface views. Component interface views can be defined within local or stand alonec omponentinterfaces.

  • Local component interface : The interface views which are defined within a local component interface definition must be implemented by at least one window in the same component. A window implements a component interface view, when it has the same inbound , outbound , startup , exit , suspend and resume plugs with the same parameters as defined in the component interface view.

  • Standalone component interface: A component which defines an implementation relation to a standalone component interface must implement it. A component can implement several standalone component interfaces. The interface views which are defined within a related standalone component interface must be implemented by at least one window in the same component. A window can also implement several standalone or local component interfaces.

When a window implements a component interface view its window controller implements the plug event execution ( wdFirePlug<plug name>() ) and the plug event handling ( onPlug<plug name>() ).

Lifespan

Creation

A window controller instance is automatically created by the Web Dynpro Java Runtime as soon as the associated window is part of the current view assembly. Otherwise (the window does not belong to the current view assembly) the window controller is not being created even in case the component, this window belongs to, is created within its embedding component.

Caution

Take into account that a window controller is not created on-demand in case the window is not part of the current view assembly. This means that the invocation of the IPublic -API by another controller in the same component or the existance of another mapped controller context does not induce the creation of the window controller instance (like it is the case for custom controllers). In this case an exception is fired by the Web Dynpro Java Runtime.

Destruction

When a component instance is destroyed all contained window controllers naturally get destroyed too.

In case the embedding component instance is not destroyed the destruction of a window controller depends on the Lifespan property definition:

  • Lifespan = Framework controlled : When the window disappears from the view compostion based on a navigation step the Web Dynpro Runtime does not destroy the window controller. When the window afterwards reappears in the view assembly the window controller is still alive and gets not initialized again. Consequently the wdDoInit() hook method is not called by the Web Dynpro Runtime again.

  • Lifespan = When visible : When the window disappears from the view compostion based on a navigation step the Web Dynpro Runtime automatically destroys the window controller. When the window afterwards reappears in the view assembly a new window controller instance is created and the wdDoInit() hook method is called by the Web Dynpro Runtime again.

Special Methods

Predefined Event Handlers

public void onPlugDefault( IWDCustomEvent wdEvent ["," parameter {"," parameter}] )

Event handler for startup plug ' Defa ult ' . Additional event parameters can be declared. The value of a URL-parameter with the same name like a declared event parameter of type String is automatically passed by the Web Dynpro Java Runtime.

Plug Event Handlers based on Declaration

public void onPlug<inbound plug name>( IWDCustomEvent wdEvent ["," parameter {"," parameter}])

Event handler for inbound plug. Additional event parameters can be declared.

public void onPlug<startup plug name> ( IWDCustomEvent wdEvent ["," parameter {"," parameter}] )

Event handler for additional startup plug. Additional event parameters can be declared.

public void onPlug<resume plug name>( IWDCustomEvent wdEvent ["," parameter {"," parameter}] )

Event handler for window resume plug. Additional event parameters can be declared

Note

A window can implement one or many component interface views. In this case all plugs of a component interface view must also be defined within the window. The associated plug event handlers are implemented in the window controller. Normally a plug event handler is only invoked by the Web Dynpro Runtime when the associated plug is the target of a navigation link. Only in case a plug is explicitly defined as the Default Plug of an embedded component interface view the Web Dynpro Runtime invokes its event handler independent from a defined navigation link. By default the Default Plug property of an embedded (component interface) view is set none .

Shortcut Variables

Predefined Shortcut Variables

private final IWDWindowController wdControllerAPI

A shortcut for wdThis.wdGetAPI() . Represents the generic controller API IWDWindowController of the generic Web Dynpro counterpart for this controller.

wdThis, wdComponentAPI, wdContext

More information: common controller class reference