Demo Portlets

Demo Portlets

1 HelloWorld

A simple portlet shows environment variables and it's possible to invoke it in three standard portlet modes. The markup of the view portlet mode contains:

  • request attributes and request parameters.
  • actionURL with action parameters and renderURL with render parameters.
The invocation of actionURL sets the property EXPIRATION_CACHE to '6'

helloworld_view_preview_new.png

Edit mode.

helloworld_edit_preview.png

2 PrefsPortlet

The portlet that shows storing/retrieving to/from PortletPreferences.

The Edit mode allows to create a new property.

prefsportlet_preview_new.png

Edit mode.

prefsportlet_edit_preview.png

3 CachePortlet

The portlet for test caching the portlet markup. Date and time must not be changed until cache time (5 minutes) is expired.

cacheportlet.png

4 BundlesDemo

This portlet shows getting resources from resource bundles for different locales.

bundles_preview.png

5 HttpHeaderDemo

Demo for setting http headers in serveResource()

After triggering "Click me" a window appears with a request to save the image.

httpheaderdemo_preview.png

6 ResourceDemo

The picture within a portlet is generated by the portlet itself using the serveResource() method.

Press the button there to get a piece of markup via AJAX.

resourcedemo_inactive_preview.png

After clicking the button and successfully receiving the AJAX markup.

resourcedemo_processing_preview.png

7 Clock

The clock portlet includes clock.html with javascript and html markup.

clock_preview.png

8 Include

To configure the viewed page, you have to change the init-parameters at the portlet.xml file for Include portlet.

<init-param>\
	<name>view</name>\
	<value>/inView.jsp</value>\
</init-param>\
<init-param>\
	<name>edit</name>\
	<value>/inEdit.jsp</value>\
</init-param>\
<init-param>\
	<name>help</name>\
	<value>/inHelp.jsp</value>\
</init-param>

include.png

9 EventDemo

The EventDemo is a portlet which can publish 'MyEventPub' event. This portlet and the HelloWorld process this event and change the mode to edit.

eventdemo_preview.png

Processing...

eventdemo_processing_preview.png

Tags:
Created by Alexey Zavizionov on 01/15/2008
Last modified by Sören Schmidt on 05/16/2009

Products

generated on Thu Sep 02 15:38:17 UTC 2010

eXo Optional Modules

eXo Core Foundations


Copyright (c) 2000-2010. All Rights Reserved - eXo platform SAS
2.4.30451