com.atlassian.jira.portal
Interface LazyLoadingPortlet

All Superinterfaces:
Portlet
All Known Implementing Classes:
SavedFiltersPortlet

public interface LazyLoadingPortlet
extends Portlet

This class allows the implementation of lazily loaded portlets. The portal page loads and shows a placeholder. An AJAX request is then sent to retrieve the portlet's actual body. Normal portlets can be lazily loaded with a default placeholder or a portlet can implement this interface and display customized loading HTML and additionally static HTML that will not be swapped out when the actual portlet body is displayed. In order for a portlet to be lazily loaded the attribute of the portlet tag "lazy" in the atlassian-plugin.xml must be set to true.

Since:
Jira 3.7
See Also:
PortletImpl, Portlet, PortletRenderer

Method Summary
 String getLoadingHtml(PortletConfiguration portletConfiguration)
          This method should return temporary HTML
 String getStaticHtml(PortletConfiguration portletConfiguration)
          All JavaScript should be returned by this method.
 
Methods inherited from interface com.atlassian.jira.portal.Portlet
getCornerThumbnail, getDescription, getDescriptor, getId, getName, getObjectConfiguration, getPermission, getTemplateLocation, getThumbnailfile, getViewHtml, hasPermission, init
 

Method Detail

getLoadingHtml

String getLoadingHtml(PortletConfiguration portletConfiguration)
This method should return temporary HTML

Parameters:
portletConfiguration - The portlet configuration for the current request
Returns:
A HTML fragment

getStaticHtml

String getStaticHtml(PortletConfiguration portletConfiguration)
All JavaScript should be returned by this method. If the JavaScript is not returned by this method it may not bound in the when you try and invoke it from your portlet. This method should return any HTML that will not be swapped out because of lazy loading. The resultant HTML returned by this method will be displayed regardless of whether lazy loading is active or not. The static HTML will placed in front of the Loading HTML.

Parameters:
portletConfiguration -
Returns:
A HTML fragment


Copyright © 2002-2009 Atlassian. All Rights Reserved.