Wednesday, July 7, 2010

How portlet modes work in portal environment?

I have one JSR-168 based portlet in which I am using all kinds of modes. These are,

1) View Mode
2) Edit Mode
3) Help Mode
4) Edit-Default Mode
5) Config Mode

Now, I have one question in my mind. What is the use of these modes? If we take an example of any web-based application which is deployed on web container and this application does not have any kind of mode. Here I am going to describe a brief description of portlet modes which are helpful to understand the benefits of portlet application over web-based J2EE application.

View Mode -
This is the landing page of the portlet.

Edit Mode -
This is the different page of the portlet for storing personalized settings. These settings allowed for a particular instance of the portlet for particular portal user. If we make another instance of portlet in another page, personalized variable is not allowed to accessible.

Edit - Default Mode -
This is also different page of the portlet. We are using this mode for storing the configuration parameters of the portlet which are accessible for all portal users for the same portlet instances. For Example. An admin stores some parameters in edit-default mode of portlet and check the availability of these parameters in other portal users. These parameters are available for all portal users for a particular instance of the portlet suppose you add same portlet in different page, you will not allowed to see stored parameters for different instances of portlet.

Config Mode -
This is also different page of the portlet. We are using this mode for storing the configuration parameters of portlets which is accessible for all portal users for all portlet instances.

Now we have a big picture, how these modes are working in portal environment? We have tested this procedure for IBM Web Sphere portal server 6.0 using RAD 7.0 and JSR 168 specification.