Show TOC

Web Dynpro Code WizardLocate this document in the navigation structure

Use

When processing controller methods, you can use the Web Dynpro Code Wizard to help you. The icon for the wizard is located in the toolbar above the Controller Editor: Wizard Icon

The icon is active under the following prerequisites:

  • If the Workbench is in change mode

  • If you are editing controller method or a view layout

Note

Do not use the Web Dynpro Code Wizard in supply functions; use the passed parameters and generated code instead.

Editing Controller Methods

If you are editing a controller method, a separate dialog box is opened when you call the wizard. Different functions are provided for your use:

  • General Functions

  • Special context functions

Method call in the current controller

Call of methods of an interface of the controller that is currently being edited. The input help automatically displays all available methods of the corresponding interface, that is, all methods of the IF_<Controllername> interface.

Method call in the used controller

Call of methods from interfaces of other controllers:

  • on the one hand this can be a controller of the same component (component, custom or interface controller). If you want to call a method of an interface of such a controller, a usage for the controller concerned must be entered on the Properties tab page for the current controller.

  • On the other hand, this can bet he interface controller of an external component. In this case, a usage of the external component (Component Editor) and a usage of the external interface controller for the current controller must be entered. More information: Component Usage with Controller Access .

    Provided that the required usages were entered, you can now select the required controller using the F4 help for the Component Name , Comp-Usage or Controller Name rows. Following this, you then use the F4 help to select a method of this controller.

Instantiating the Used Component

Instantiation of external components in the controller method that is currently being edited.

Regardless of whether you only want to call an external component or whether you want to access the interface controller of the external component, the external component must be instantiated at a time you select. You can add the call that is required for this to the coding of your current controller method using the Web Dynpro Code Wizard. The F4 help offers all components for which a usage has been entered. See also Working with Component Usages .

Create message

You can choose different methods of the IF_WD_MESSAGE_MANAGER interface to create Messages .

Text symbol access

This function generates a text symbol access from the associated Assistance Class . In the wizard you can specify a name for the variable which the text symbol is assigned to.

Create popup

This function can be used to create a popup from a window. This window can be part of your component or part of a used component.

Personalization

To Personalize Web Dynpro applications, you can use methods of interface IF_ WD_PERSONALIZATION.

View Controller

The functions for portal integration and the option for setting up navigation are available for all methods of a view controller:

Trigger navigation

Insert the method that calls an outbound plug of a view or interface view. Use the F4 help for the Outbound Plug input line to choose all outbound plugs that are available for the controller of the current view/interface view (see View: Inbound and Outbound Plugs

Portal Integration

Web Dynpro applications can be integrated in a portal. Views of an embedded application can interact with the portal using the methods of interface IF_WD_PORTAL_INTEGRATION .

Component Controller

If you want to trigger an event in a method of the component controller, the wizard has another feature you can use. You can use the wizard to program portal integration in the component controller.

Trigger event

Insert the method that triggers an event of a component, custom or interface controller of a component. Use the F4 help in the Event input line to choose an event that you have created for the controller that is currently being edited (see Controller: Events ).

Portal Integration

See above.

Window Controller

In the window controller you can also find the option for setting up navigation.

Trigger navigation

See above.

Context

You use the Context tab page to execute specific operations for a context node or context node attribute. To do this, use F4 Help to select the relevant context node or attribute and then select one of the following options:

  • Read

  • Set

  • Append

You can use these options to insert methods that read/set/append the elements or attributes of the context of the controller that is currently being edited.

You can use the As Table Operation checkbox for multiple nodes. If this checkbox is selected, you can either read or set all elements or append multiple elements.

Edit View Layout

If you are editing a view layout, a separate dialog box is opened when you call the wizard. In this dialog box there is a file containing standard templates to design Web Dynpro views. When you select one of these templates, a UI element is generated that is adjusted directly to the bound context node. The following templates are currently available:

If you have created your own templates in View Layout (View Designer) , these are listed as user templates beneath the standard templates. You can use the wizard to add user templates to the layout. You can also use the wizard to remove your own templates. In addition, you can import and export them.