Skip to content

Commit

Permalink
SOS-797 Add init parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ealonso authored and brianchandotcom committed Apr 20, 2012
1 parent ae7aa12 commit cf95986
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions portlets/contacts-portlet/docroot/WEB-INF/portlet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
<name>config-template</name>
<value>/contacts_center/configuration.jsp</value>
</init-param>
<init-param>
<name>max-result-count</name>
<value>100</value>
</init-param>
<init-param>
<name>view-template</name>
<value>/contacts_center/view.jsp</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public class ContactsConstants {
public static final String FILTER_BY_TYPE_UNI_FOLLOWER =
FILTER_BY_TYPE + SocialRelationConstants.TYPE_UNI_FOLLOWER;

public static final int MAX_RESULT_COUNT = 100;

public static String getDisplayStyleLabel(int displayStyle) {
if (displayStyle == DISPLAY_STYLE_BASIC) {
return DISPLAY_STYLE_BASIC_LABEL;
Expand Down
3 changes: 2 additions & 1 deletion portlets/contacts-portlet/docroot/init.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ page import="com.liferay.portal.kernel.portlet.LiferayWindowState" %><%@
page import="com.liferay.portal.kernel.servlet.ServletContextPool" %><%@
page import="com.liferay.portal.kernel.util.CharPool" %><%@
page import="com.liferay.portal.kernel.util.Constants" %><%@
page import="com.liferay.portal.kernel.util.GetterUtil" %><%@
page import="com.liferay.portal.kernel.util.HtmlUtil" %><%@
page import="com.liferay.portal.kernel.util.ParamUtil" %><%@
page import="com.liferay.portal.kernel.util.PrefsParamUtil" %><%@
Expand Down Expand Up @@ -112,7 +113,7 @@ String currentURL = PortalUtil.getCurrentURL(request);
int displayStyle = PrefsParamUtil.getInteger(preferences, request, "displayStyle", ContactsConstants.DISPLAY_STYLE_FULL);
int maxResultCount = 200;
int maxResultCount = GetterUtil.getInteger(portletConfig.getInitParameter("max-result-count"), ContactsConstants.MAX_RESULT_COUNT);
boolean showAdditionalEmailAddresses = PrefsParamUtil.getBoolean(preferences, request, "showAdditionalEmailAddresses", true);
boolean showAddresses = PrefsParamUtil.getBoolean(preferences, request, "showAddresses", true);
Expand Down

0 comments on commit cf95986

Please sign in to comment.