Show TOC

Using Code Snippets to Relate a Context AttributeLocate this document in the navigation structure

Prerequisites

You have created:

Context

You use this procedure to reuse context attributes using code snippets in Web Dynpro.

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 right mouse button.
  4. Drag the Relate Context Attribute snippet, and drop it in the suitable user code area of the Java editor.
  5. In the Insert Snippet: Relate Context Attribute dialog box, drag the required context attribute from the source and drop it on the target context attribute.
  6. Choose Finish .
  7. In the confirmation dialog box, choose Yes to insert the snippet in the Java editor.

    Values from the source context attribute are copied to the target context attribute.