Skip to main content

Portlet Basics

Portlet Basics

To define a portlet, create and compile a class as follows:

  • Use %DeepSee.Component.Portlet.abstractPortletOpens in a new tab as a superclass.

  • Implement the %DrawHTML() method, which should draw the body of the portlet as HTML.

    This method has the following signature:

    method %DrawHTML()
    

    Also see Using Settings for additional options.

  • Optionally implement the %OnGetPortletName() method, which returns the localized name of the portlet, to display in the Widget Builder dialog box.

    Otherwise, the short class name becomes the portlet name.

    This method has the following signature:

    classmethod %OnGetPortletName() as %String
    
  • Optionally implement the %OnGetPortletIcon() method, which returns the URL of the icon for the portlet, to display in the Widget Builder dialog box.

    Otherwise, the system uses a generic icon.

    This method has the following signature:

    classmethod %OnGetPortletIcon() as %String
    
  • Optionally implement the %OnGetPortletSettings() method, which returns one or more configurable settings. See Defining Settings.

    Otherwise, the portlet has no settings.

  • Optionally implement the adjustContentSize() method, which the system calls whenever the widget containing the portlet is loaded or resized. This method has the following signature:

    ClientMethod adjustContentSize(load, width, height) [ Language = javascript ]
    
  • Optionally implement the onApplyFilters() method, which the system calls whenever a filter change is sent to the widget. This method has the following signature:

    ClientMethod onApplyFilters(refresh) [ Language = javascript ]
    
FeedbackOpens in a new tab