Portlet post-processing options  Adding listeners

Chapter 5: Advanced Portlet Creation

Adding events

Click the down arrow beside the Post Process button and select Define Events to launch the Event Definition wizard. When you define an event on a portlet, the portlet is saved under the same version, irrespective of what the versioning property is set to. See “Defining broadcast events” for instructions on creating events.

Once an event has been defined on a portlet, all defined events are listed under the portlet name in a hierarchy.


Event-naming convention

Events can have a three-part name:

[page_group_name].[page_name].[event_name]

However, a three-part name is not mandatory. You can also create a name with just [event_name]. The three-part name allows greater flexibility and registered listener name mapping.

The event name is matched with listeners that have their [page_group_name], [page_name] registered along with the subscribed-to [event_name]. If an event name has only one part, all registered listeners are matched with that event name. If an event name includes a [page_name], that event is matched to listeners with the same page name. The same rules apply to [page_group_name].

NoteDo not using spaces in event names.





Copyright © 2004. Sybase Inc. All rights reserved. Adding listeners

View this book as PDF