Importing a View into a VDL File
The Import Template View control enables you to import one view into another view. You can use the imported view as a template to create a reusable component, such as a header, that can be used on all pages in an application.
For a web application: you can see a typical implementation example in the Starter Web Application project template that you can create as a new web application project. By default, the header view is imported into the default view.
For a portlet application: you can use the Import Template View control as described below, but you can also use JSF Facelets functionality to incorporate an XHTML-based view as a template. For more information, see
Embedding Portal Resources in a
Page File.
To import a view with an Import Template View control
1. If it does not already exist, create the template view you want to import.
2. In the Project Explorer view, expand the WebContent node of the project you want to import the view to, and then double-click the View Declaration Language (VDL) file for the target view to open it in the editor.
3. Drag the view you want to import from the Project Explorer view and drop it into the open VDL file in the editor.
4. In the Drop Candidates dialog box, click Create “Import Template View” Control and then click OK.
5. Save the project.