3.6 Portlet.xml descriptor

 <  Day Day Up  >  

To facilitate creating, organizing and updating the portlet.xml deployment descriptor, the Portal Toolkit provides an intuitive interface. This interface is accessed by double-clicking the portlet.xml file. For details on the elements in the portlet.xml deployment descriptor, see 2.6.2, "portlet.xml" on page 67. Since the interface is rather intuitive, this section will only cover some of the more important fields and points of concern.

The interface allows you to select the contained components and work with a window dedicated to that element. For example, Figure 3-11 demonstrates working with the abstract portlet application.

Figure 3-11. Working with the abstract portlet application

graphics/03fig11.jpg

The wizard will create unique IDs for the abstract and concrete applications. These values are large and entirely unmemorable. Feel free to change the value to something more meaningful but still unique. A best practice is to create the application name from your organization name . See 2.6.5, "UID guidelines" on page 77.

If you want to add more portlets for deployment, select the Add portlet button. The resulting dialog, shown in Figure 3-12 on page 142, will allow you to add portlets already defined in the associated web.xml. You cannot add portlets already defined in the abstract application.

Figure 3-12. Add portlet

graphics/03fig12.jpg

Contained in the abstract application are the abstract portlets to be deployed in this application. Figure 3-13 on page 143 shows the interface for working with the abstract portlets.

Figure 3-13. Working with abstract portlets

graphics/03fig13.jpg

The support section allows you to add or remove predefined markup languages. If you need to add custom markup languages, they must be manually entered into the portlet.xml via the Source tab.

The configuration parameters (not shown in the figure will actually enter servlet-init parameter definitions into the corresponding servlet in the web.xml.

Each portlet.xml may only define a single abstract portlet application. However, since it may contain any number of concrete applications, you can choose to add new concrete portlet applications based on the abstract application. If you click the New Concrete Portlet Application button, a new, empty application will be created. Although the ID and so forth will be created for you, you must add portlets.

The Concrete Portlet Application interface provides the opportunity to set the context parameters of the application. The Concrete Portlet Applications window is shown in Figure 3-14. You are also free to change the UID if you like, but keep in mind that it must be unique throughout the entire portal environment.

Figure 3-14. Working with Concrete Portlet Applications

graphics/03fig14.jpg

The final window allows you to work with the actual concrete portlets that will eventually be seen by end users. This window allows you to set the title that will be seen in the title bar of the portlet. You can choose to set the contents for language blocks by selecting Add , choosing the locale and completing the title field. You must define at least one locale. You may also choose to complete the keywords, description and short title fields. Figure 3-15 on page 145 displays the interface for this final window.

Figure 3-15. Working with concrete portlets

graphics/03fig15.jpg

The configuration parameters can be set for the portlet using settings in the text area.

At any time, you can choose to manually edit the source file by selecting the Source tab at the bottom of the interface. When you have finished working with the portlet.xml, press CTRL-S to save the file.

Tip

When a file has unsaved changes, an asterisk will appear beside the name in the Title tab. Be sure to check for unsaved changes in other perspectives as well.


 <  Day Day Up  >  


IBM WebSphere Portal V5 A Guide for Portlet Application Development
IBM Websphere Portal V5: A Guide for Portlet Application Development
ISBN: 0738498513
EAN: 2147483647
Year: 2004
Pages: 148

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net