Building application portlets  Application Manager

Chapter 5: Advanced Portlet Creation

Shared context

To minimize the number of entries an employee has to make, a common view of individual tasks allows each task to share the same contextual view as the other tasks.

In this example, the travel dates are common to each portlet. The hotels portlet uses dates to check for the availability of rooms. The car rental portlet uses dates to check the availability of vehicles. The flights portlet uses the dates to check preferred airlines schedules. In each case, the user can override the dates if necessary.

In addition to the common dates, each portlet also has its own requirements. For example, the Hotel portlet requires the destination city, the Car Rental portlet requires the rental duration, and the Flights portlet requires the destination airport code. The user can enter each value directly into the portlet, automatically setting the context of the portlet request for each.

When constructing shared context, you identify the key fields that each of the component portlets has in common, which allows the fields to be linked. For example, the application designer uses form processing in the Hotel portlet to examine the hotel reservation form. The designer is presented with a list of form fields with the relevant fields selected. The next step is to define events for the common relevant fields. After defining the events, the designer uses the Application Builder to assign events, as needed, to the fields of the Car Rental and Flight portlets. The end result is a link between the common input fields of the forms in the application's component portlets. When published to Portal Interface, the link between the form fields is used to automatically fill in the specified common fields of the other portlets used in the application.





Copyright © 2004. Sybase Inc. All rights reserved. Application Manager

View this book as PDF