Change restart settings


Web clipping portlets support an inter-portlet communication mechanism that allows clipping portlets on the same page as a given Web portlet to "restart." That is, portlets that share a page with a Web clipping portlet can reset the Web clipping portlets' state. This is very useful in conjunction with overriding pre-configured settings to cause the Web clipping portlet to restart on a different URL. This mechanism is supported through the use of portlet messages. A portlet sends a message to the Web clipping portlet telling it to restart. The message can be sent to a specific Web clipping portlet on the same page (by name) or to all portlets on the same page. The key is that the sending and the receiving portlets must be on the same page.

In the message-sending portlet's actionPerformed() method, send a DefaultPortletMessage with the message "restart_cliplet". For example:

getConfig().getContext().send(null, new DefaultPortletMessage("restart_cliplet"));

This causes all clipping portlets on the page to restart at the beginning.

You can also pass a URL parameter so that the Web content with the URL can start. In your DefaultPortletMessage, construct this with the following syntax:

new DefaultPortletMessage("restart_cliplet:<url>");

Where <url> is the new target URL that you want the clipping portlet to use. Separate the string restart_cliplet string from the URL using a colon.

Changing restart settings is not available in WebSphere Portal Versions 5.0 and 5.0.2. To use this functionality, download the latest Web Clipping portlet archive from the WebSphere portal catalog.

 

See also

Home |

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.