ConcourseConnect Support

Support
Corporate
PUBLIC PROFILE

Back to topics

Discuss Development

Steps to create a new Portlet

You need to be logged in to post messages

This question is unanswered

Steps to create a new Portlet

6/26/2009 10:51 AM EDT

What are the steps for creating my own portlet?

1. 6/26/2009 11:26 AM EDT
Default user photo

By Matt Rajkowski

Concursive Corporation
Product Design

airplane-icon-100x100.png

Here's a few pointers to get you started...

1) A standard portlet looks like this...
com.concursive.connect.web.modules.debug.portlets.AboutPortlet.java

The doView is the default code that is executed when the portlet is placed and the requestDispatcher is used to show the resulting JSP.

2) This portlet is registered in two places: web.xml and portlet.xml; because this portlet is deployed as part of the connect application there is no other configuration to deploy and make it available.

3) Place a reference to the portlet in any number of the XML files in which you want to use it... dashboards_en_US.xml, *-portal-layout.xml, etc.; include in the reference any preferences that this particular instance will use

Another Class for review is the com.concursive.connect.web.portal.AbstractPortletModule abstract Class which makes creating complex user interactions much simpler. In conjunction with the com.concursive.connect.web.portal.PortalUtils you will find all of the methods to seamlessly integrate a portlet into all sorts of areas including popup panels.

There are over 60 portlets in ConcourseConnect that do quite a bit more... they obtain database connections, they are aware of the page they are on (including the listing and category), they can exchange information with other portlets on the page, and they are assembled into modules.

1 result found