Monday, July 6, 2009

Steps to code a portlet

Steps to create a portlet - jics wiki

1. Create a class library project, and set a bunch of custom settings
  • Change the assembly name (see assembly naming conventions)
  • Set a post-build event that copies the compiled files into the correct directories (see directory naming conventions)
  • Enable debugging
  • Add reference to Jenzabar.Portal.Framework.Web
2. Create a C# class that inherits from PortletBase, which contains a GetCurrentScreen() function.
  • Ordinary portlets inherit from PortletBase
  • Secured portlets inherit from SecuredPortletBase
  • GetCurrentScreen() determines which view will be loaded when the portlet loads.
3. Create a user control for each view you want to use for your portlet
  • Required views are Default_view and Main_view
  • Each usercontrol inherits from the C# base class you created earlier.
  • Ordinary portlets inherit from PortletBase
  • Secured portlets inherit from SecuredPortletBase

No comments: