Displaytag Export in Portlet

Leave a comment

August 31, 2014 by huionn

displaytag-portlet (http://www.displaytag.org/1.2/portlet.html) supports pagination and sort functionality in portlet. However, the export (such as csv) is not supported. Export with portlet url is problematic.

Based on displaytag-portlet, I extend RequestHelperFactory to use a HybridPortletHref which return original url (view.jsp) for rendering export url.







There is another issue – in order to share the list between portlet and servlet/jsp, the list has be be stored in session scope.

in portlet:
HttpServletRequest httpReq = PortalUtil.getHttpServletRequest(actionRequest);
HttpSession session = httpReq.getSession();
session.setAttribute(“list”, list);

in view.jsp

<display:table name=”${sessionScope.list}” >



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: