Portlet Factory, Version 6.1.2
Overview: communicating between models
If your IBM® WebSphere Portlet Factory application utilizes more than one model for its functionality, you may need to send data from one model to another.
There are multiple ways to communicate between models.
- Using events
- You can fire an event in one model and handle it in another. WebSphere Portlet Factory provides for sending data as well.
- Using the session
- You can store information in the session object. Any models requested by the same session have access to this information.
Parent topic: Developing Web applications
- Using events for inter-model communication
Events are named broadcasts which arrive at any model in the session (for example, for the same user) that is listening for them. There are two types of events: general events and widget events.
- About using the session for inter-model communication
You can store session data in a simple map, so two different models can share the same object just by using the same key.
- About using linked models for inter-model communication
Use the methods in the linked model to send data from the primary model to the linked model or to retrieve data from the linked model.
Library | Support |