Develop > Presentation layer > WebSphere Commerce integration with WebSphere Portal > Customize WebSphere Commerce Portal integration > Use the provided WebSphere Commerce MVCPortlet class (MVC style)
WebSphere Commerce Portal integration event handlers
The MVCPortlet framework is designed in a flexible way so that each portlet request can be handled differently using an event handler. For each action event and render event, it is possible to define a corresponding event handler in the portlet MVC configuration file.
Although the MVC configuration allows you to define any customized event handler, the use of two generic event handlers is recommended:
- A generic portlet action handler, MVCPortletActionHandler, which calls client libraries through configurations specified in the MVC configuration file.
- A generic portlet render handler, MVCPortletRenderHandler, which returns the proper portlet JSP file according to the current portlet mode.
This programming pattern greatly reduces code redundancy, and maintains a consistent behavior across all WebSphere Commerce portlet events.
- WebSphere Commerce portlet action handler
This WebSphere Commerce portlet action handler invokes the logic for handling this portlet action request.
- WebSphere Commerce portlet render handler
The WebSphere Commerce Portlet render handler has only one task. It simply checks for the current state and mode of the portlet to determine the appropriate JSP path to be used when calling the request dispatcher.
Related concepts
WebSphere Commerce portlet action handler
WebSphere Commerce Portal integration architecture
Best practices for designing store pages that contain MVC Portlets
WebSphere Commerce integration with WebSphere Portal
Use WebSphere Commerce services in portlets
Populate data on a portlet JSP file using the WebSphere Commerce foundation tag library
WebSphere Commerce portlet render handler
WebSphere Commerce Portal integration tracing and logging
Related tasks
Add or customizing a portlet using the MVCPortlet class
Call a WebSphere Commerce service using the MVC portlet configuration file
Wiring the source and target portlets
Related reference
MVC portlet configuration file syntax