Designer 10.7 | webMethods CAF and OpenUI Development | Getting Started with Portlet Application Development | Adding a View to a Portlet
 
Adding a View to a Portlet
When you create a portlet, it is created with a default view file. An edit or help view may be present if you specified other portlet modes. These views, or pages, are created as JSF View Declaration Language (VDL) files. You can drag a control from the Palette view onto the VDL file displayed in the editor. For more information, see Adding a Control to a Portlet View.
You can add additional views to the portlet to extend the portlet functionality. You can use one of the available predefined view templates to create the view, or you can add an empty view using this procedure.
*To add a view to a portlet
1. In the UI Development perspective, in the Navigation view, open the portlet application project and expand the WebContent folder.
2. Select the portlet that will receive the new VDL file, and right-click New > Portlet View.
3. In the JSF Portlet View wizard, type a name for the VDL file in the File name field.
Note:
If you type the file name only, without a file name extension, the view file will be created in .xhtml format by default. If you type the file name with a .view file name extension, the view file will be created as a legacy page view.
4. (Optional) Click Advanced if you want to link to an existing file in your file system.
5. Click Next
6. In the For Portlet list, select the portlet where you want to create the view.
7. In For Portlet Mode, click the portlet mode you want to apply to this view. For more information, see  About Portlet Modes.
8. In the Template list, select a template to use for the VDL file. The following table lists the available templates:
Template
Description
Form
(Default) Creates a basic view with a Formatted Message control and a JSF command form. You can modify the view to your desired implementation.
Empty
Creates a basic view with no components other than a View Root control. You can modify the view to your desired implementation.
Search Bar
Creates a predefined view for use in developing a search bar portlet. Contains user interface elements that enable the user to enter search criteria, set options, and save searches.
Task Notification
Creates a task notification view. This is generally selected when you are working with a task application project. For more information, see the webMethods BPM Task Development Help.
9. Click Next.
10. In the Managed Bean Scope list, choose the scope for portlet view. For more information, see About Managed Beans.
11. Click Next to specify any custom settings you want to apply to the view, or click Finish to create the view with the remaining default settings.
The new view appears in the design canvas (a JSF graphical editor), and in the Solutions view, the Navigator view, or the Package Explorer view, depending on the project type.
Related Topics