Show TOC

Subscribing to a Portal Event Using a Code SnippetLocate this document in the navigation structure

Prerequisites

You have created windows and views.

For more information, see Creating Views

Context

You use this procedure to subscribe to a defined portal event using the available code snippets in Web Dynpro. The Web Dynpro application gets a notification when an event is triggered in the portal.

Procedure

  1. In the Web Dynpro perspective, choose Start of the navigation path Windows Next navigation step Show Views Next navigation step Snippets End of the navigation path.
  2. In the Web Dynpro Explorer , select the required view.
  3. Choose Start of the navigation path Open Next navigation step Java Editor End of the navigation path using the secondary mouse button.
  4. Drag Subscribe to Portal Event snippet and drop it in the suitable user code area of the Java editor.
  5. If you have not created an existing action handler, follow the steps listed below to create an action handler:
    • In the Insert Snippet: Subscribe to Portal Event dialog box, choose New .

    • Enter the necessary details such as Name , Text , and Icon in the New Action wizard and choose Finish .

  6. Specify the details such as Namespace , Name , and Handler Action in the Insert Snippet: Subscribe to Portal Event dialog box and choose Insert .