Developing > Persistence layer > WebSphere Commerce integration with WebSphere Portal > Customizing WebSphere Commerce Portal integration



Using the provided WebSphere Commerce MVCPortlet class (MVC style)

The WebSphere Commerce Portlet, MVCPortlet, is a generic implementation of the MVC pattern. It allows you to set up one or more portlets, each with its own configuration, to call various WebSphere Commerce services. This programming pattern greatly reduces code redundancy as well as maintaining a consistent behavior across all WebSphere Commerce portlet actions.

There are several customizable assets, described in the following sections:

Portlet Action and Render Configuration

Each portlet can have one or more MVC configuration files and they are loaded in the order that is specified in the portlet deployment descriptor. In each MVC configuration file, an action definition is required to define how the request can be mapped out into a WebSphere Commerce service request. A render definition might also be required, depending on the nature of the request. See the Portlet configuration file syntax topic for more information about the portlet action and render configuration.

Portlet JSP file

The Portlet JSP file is a view template for displaying business data and getting inputs from the portal user. These JSP files contain markup tags that provide a consistent, clean, and complete user interface. The portal page is displayed using skins and themes defined by the portal designer or administrator. For portlets to appear integrated with an organization's portal or user's customized portal, they should generate markup that invokes the generic style classes for portlets, rather than using tags or attributes to specify colors, fonts, or other visual elements.

Portlets are allowed to render only markup fragments, which are then assembled by the portlet framework for a complete page. Portlet output should contain complete, well-structured, and valid markup fragments. This helps to prevent the portlet's HTML code, for example, from corrupting the portal's aggregated HTML code.

See the Markup guidelines topic in the WebSphere Portal Server Information Center for more information about the JSP coding guidelines for JSR 168 portlet API.

WebSphere Commerce foundation tag library

A <wcf:getData> action tag is provided as part of the WebSphere Commerce foundation tag library. This tag retrieves populated service data objects from the WebSphere Commerce services. See the Tag: getData topic for more information.

WebSphere Commerce services

WebSphere Commerce provides services that have been created using existing WebSphere Commerce controller commands and data beans, fronted by a component facade interface. These services can be used on the portlet using the WebSphere Commerce foundation tag library. For more information, see the WebSphere Commerce services topic.

Client Library

Each WebSphere Commerce service module provides a client library that is responsible for building the messages to be sent to the WebSphere Commerce services. Upon each invocation, business objects, such as BusinessContextType and AuthenticationCallbackHandler, are passed to the interface so that it can hand over specific information to the service binding layer.

For more information, see the Client library for WebSphere Commerce services topic.

Last updated: 25 November 2009