Professional Documents
Culture Documents
Defining the source code of controllers requires understanding how predefined methods
(hook methods) should be used, when and in which order they are processed, how
additional user defined methods can be created, and how these methods can be
accessed from the same or from another controller.
In addition, the definition of events, raising these events, and registering the
corresponding event handler on such events has to be understood.
Finally, accessing the controller context (reading, changing, and deleting data stored in
the controller) is essential to implement controllers. In this lesson, all of these aspects
will be discussed in detail
wddoexit( ):
wddoexit( ) is the last method, which
is processed at the end of a
controller's life cycle.
All your cleanup code should go
here
wddobeforeaction( )
After the Web Dynpro application has
been started and the user has raised a
client event, the first methods to be
processed in the Web Dynpro
application are the wddobeforeaction( )
methods of all view controllers of the
previous rendered view assembly
wddomodifyview( )
The only method that allows to access
the UI element hierarchy is the view's
wddomodifyview( ) method.
The interface parameter VIEW is a
reference to the UI element hierarchy;
the FIRST_TIME parameter can be
used to find out if this method has been
previously processed in the view
controller's life cycle.
This method can be used to manipulate
the UI element hierarchy dynamically
WD_THIS
WD_THIS is a reference to the current
controller's interface, IF<controller
name>, and represents all the
functionality implemented in the
generated class.
This also gives you access to standard
Web Dynpro functionality, such as
validation
WD_CONTEXT
WD_CONTEXT is the reference to the
controller.s context root node, and thus to
the entire context. Any access to the
controller's context starts with this
reference
WD_COMP_CONTROLLER
WD_COMP_CONTROLLER is the
reference to the component controller.
Using this reference, all methods and
all public attributes of the component
controller can be accessed
(wd_comp_controller-><meth>, where
<meth> is a placeholder for the
methods name)
1. Click
Wizard
4. Reference
to Node
2. Select the
Read Context
radio button
3. Select Node
to be
Instantiated 1. Reference
to element