intra-mart Accel Platform / Portlet Programming Guide

«  Introduction   ::   Contents   ::   Portlet Development (Script Development Version)  »

Summary

About Portal Module

Portal module operates on the portlet container.
Since portlet wrapper is provided as standard, which utilizes intra-mart application as a portlet,
those portlets that were used in the older versions can be used as they are.
portal_overview

<intra-mart Portal Module Structure>

Portlet Types

Portlets that are available for portal modules are classified into 5 types depending on the development models.

Portlet Types Development Model
Portlet created as intra-mart application Script Development Model
JavaEE Development Model
JSP/Servlet
SA Struts
Spring

In the next chapter, method to develop portlet for each portlet type is described.

Portlet Development by using JSP/Servlet

Other than the above, it is possible to register the Web pages developed by JSP or Servlet as portlets without utilizing intra-mart framework.
You can create them in the standard methods of creating Web applications.
However, please be aware that such Web application framework as Struts is a framework for creating normal Web pages and is not suitable for creating portlets.
In most cases it cannot be used as a portlet as it is, and should be modified to make it work as a portlet.
Specifically, please make the corrections with the following considerations.
  • Since portlet is called by INCLUDE from the portal screen, FORWARD process cannot be made while processing the portlet.
    Since FORWARD process is automatically made in Struts unless otherwise stated, please make sure to call
     RequestDispatcher#include() in the process of Action class.
  • Moreover, please be aware that FORWARD process in struts-config.xml is not available.
  • Target of ServletFilter is FORWARD only.  If there is a need to use Filter, please add INCLUDE to the target.

Portlet Lifecycle

Since portlet works collaboratively with portal screen and other portlets, lifecycle method below is defined.

processAction Execution Method of Process for Portlet
processEvent Receive Process Method of Event derived from processAction
render Drawing Process of Portlet Screen

Usually request to the portal screen is accepted by the portlet container, and portlet container calls render method of each portlet.

render_flow

< Portal render Process Flow>

In the portlet, processAction can be called with any button or control by submitting form data to Action URL.
By generating Event in processAction, processEvent of the corresponding portlet can be called.
action_flow

<Portal processAction / processEvent Process Flow>

In order to call processEvent, setting of portlet container should be made in advance.
Please refer to the respective chapter of development model for these settings.

Portlet Mode

There are following modes in the portlet.  User can control display contents by switching modes.

VIEW Mode  
EDIT Mode  
CONFIG Mode This mode is for the setting portal, and is not displayed
on normal portal screen.
Please be aware that the mode to be used should be set to the portlet container in advance in order to support the mode.
Please refer to the respective chapter of development model for the setting method.

Window Status

Following window status exist in the portlet.  User can control display contents by switching modes.

NORMAL  
MAXIMIZE  
MINIMIZE Since contents is not displayed, portlet will not be called.

Portlet Screen

Portlet screen is displayed as a part of portal screen.  Therefore, it cannot be created in a similar way the normal screen is created.
Please refer to [Remarks when Creating Screens] for detail.
portal_compare

<Comparison between Portal Screen and Normal Screen>

Therefore, even when you want to use the common screen on the normal screen and portlet screen, you should create each screen separately.
However, since screen displays and functions can be made common, it would not be necessary to recreate the screen for the normal screen by
creating the screen that includes the portlet screen as shown below.
portal_share

<Sharing Normal Screen and Portlet Screen>

Example of implementation methods will be shown for each development model.

«  Introduction   ::   Contents   ::   Portlet Development (Script Development Version)  »