Each Commerce Enabled Portal portlet is a concrete instance of the generic commerce enabled portlet.
Note: To familiarize yourself with the concepts discussed in this task, complete the following tutorials:
- Commerce Enabled Portal tutorial: Enabling communication between a Commerce Enabled Portal portlet and a third party portlet
- Commerce Enabled Portal tutorial: Creating a dynamic context relationship
To create a new instance of the generic portlet, do the following:
- Review the information in the Commerce Enabled Portal tutorials.
- Review Commerce Enabled Portal portlets.
- Know the following details before starting to create your portlet:
- The portlet application project to which you are adding the portlet. The portlet application project must include a portlet descriptor file (portlet.xml) that is based on the portlet_template.xml provided with the Commerce Enabled Portal. This portlet.xml file includes the generic Commerce Enabled Portal portlet. portlet_template.xml is located in the following directory on your Portal Toolkit machine:
- temp/Portal/B2CPortletApp/WEB-INF
- temp/Portal/B2BPortletApp/WEB-INF
For more information about using the portlet_template.xml file in your portlet application project, see Adding portal function to your store.
- The URL to the view or controller command for the WebSphere Commerce capability that the portlet will call.
- The portlet application project to which you are adding the portlet. The portlet application project must include a portlet descriptor file (portlet.xml) that is based on the portlet_template.xml provided with the Commerce Enabled Portal. This portlet.xml file includes the generic Commerce Enabled Portal portlet. portlet_template.xml is located in the following directory on your Portal Toolkit machine:
- If you are using the Rational Application Developer with Portal Tools feature development environment, follow the instructions about adding a portlet in the Rational Application Developer documentation If you are using another environment, follow the instructions on Developing portlets in the WebSphere Portal information center.
- Ensure that you add the WebSphere Commerce URL to the view or controller command as a parameter for your portlet. For an example refer to the portlet.xml file provided with one of the Commerce Enabled Portal samples.
- If you define a new concrete instance of the portlet or remove a portlet definition from the portlet.xml file, ensure that you add or remove the corresponding entry in the Web application deployment descriptor (web.xml) file. For an example, refer to the web.xml file provided with one of the Commerce Enabled Portal samples
- If the content of one Commerce Enabled Portal portlet relies on the content of another Commerce Enabled Portal portlet, Commerce Enabled Portal uses a feature called dynamic context, to synchronize the content of the portlets. For more information, see Synchronized content through dynamic context.