Start of Content Area

Procedure documentation Creating a View  Locate the document in its SAP Library structure

You create a view with graphical support in the Navigation Modeler or Data Modeler. A screen display can show more than one view; to implement this, use a view set into which you embed the desired views. View sets are also created using the graphical Navigation Modeler tool.

The following graphic shows an example of how a Web Dynpro application can be structured by embedding views in a view set. In this example, the interface of the application is separated into the views Customer Search, Customer Details, Product Details, and so on. The views are in turn integrated in the two view sets User Identification and Details.

This graphic is explained in the accompanying text

Note

While views are created using the Navigation Modeler, the layout of the individual views is designed and implemented in another graphical tool, the View Designer.

Prerequisites

Before you can define a view, you must create a Web Dynpro project and a Web Dynpro component with a window.

Procedure

Since you can also use views in a Web Dynpro application without using view sets, the following simply describes the procedure for creating a new view without the use of a view set:

       1.      Open the Navigation Modeler, by choosing the context menu entry This graphic is explained in the accompanying textOpen Navigation Modeler for the window name in the Web Dynpro Explorer.

       2.      In the graphical Navigation Modeler tool, choose Embed View in the selection area.

       3.      In the wizard, choose Embed new view followed by Next.

       4.      Enter a name for the view. You can also specify a different package here, or you can create a new package by entering the new package name in the input field.

       5.      Close the wizard by choosing Finish and then choose This graphic is explained in the accompanying textSave all Metadata to save your changes.

Result

The new view is displayed graphically in the Navigation Modeler. In the Web Dynpro Explorer, the view is displayed below the subnode This graphic is explained in the accompanying textViews of the node This graphic is explained in the accompanying text<MyWebDynproComponent>. The file system contains the directory /<myWDProject>/src/packages/<myPackage>/. This directory in turn contains the following files, which were created automatically by the Web Dynpro Generator at the same time as the view definition.

·        View XML file <myView>.wdview

¡        View context file for the data flow between the view and the view context. The file contains the following subobjects:

§         View controller reference

§         Web Dynpro component reference

§         Transparent container for user interface elements

§         User interface element references, including layout data

·        View controller XML file <myView>.wdcontroller

¡        View context file for the data flow between the view context and the other Web Dynpro entities. The file has the following parameters:

§         Controller event handler inbound plug

§         Main node Context (value node with cardinality 1:1)

§         Controller reference to the Web Dynpro component

·        View properties file <myView>.wdview.xlf

¡        XML file that is relevant for translation.

Under no circumstances should you change any of the files listed above. However, you can display the relevant source code in the Navigator view. To open the XML Editor, choose the context menu entry Open With Text Editor for the relevant file.

Additional Information

To define a view as part of a view set, proceed as described in Embedding a View in a View Set. For information about reusing a view, refer to Copying a View.

 

End of Content Area