Author: chris.laprun(a)jboss.com
Date: 2008-03-31 18:30:00 -0400 (Mon, 31 Mar 2008)
New Revision: 10437
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp
Log:
- JBPORTAL-1967: Title could be null as well, added getLocalizedValue method.
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp 2008-03-31
17:28:28 UTC (rev 10436)
+++
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp 2008-03-31
22:30:00 UTC (rev 10437)
@@ -61,14 +61,6 @@
{
PortletInfo info = portlet.getInfo();
MetaInfo metaInfo = info.getMeta();
-
- LocalizedString localizedDesc = metaInfo.getMetaValue(MetaInfo.DESCRIPTION);
- String desc = "";
- if (localizedDesc != null)
- {
- desc = localizedDesc.getString(locale, true);
- }
-
String iconLocation = getIcon(info);
%>
<tr class="portlet-section-selected">
@@ -80,7 +72,8 @@
<span class="portlet-form-field-label">Portlet
name:</span><%= displayName %>
</div>
<div>
- <span class="portlet-form-field-label">Portlet
description:</span><%= desc %>
+ <span class="portlet-form-field-label">Portlet
description:</span>
+ <%= getLocalizedValue(metaInfo.getMetaValue(MetaInfo.DESCRIPTION), locale)
%>
</div>
</td>
@@ -112,13 +105,6 @@
}
String iconLocation = getIcon(info);
-
- LocalizedString localizedDesc =
portletMetaInfo.getMetaValue(MetaInfo.DESCRIPTION);
- String desc = "";
- if (localizedDesc != null)
- {
- desc = localizedDesc.getString(locale, true);
- }
%>
<portlet:actionURL var="url">
<portlet:param name="content.action.select"
value="true"/>
@@ -128,20 +114,17 @@
<div style="display:none">
<div class="darktip" id="info-container-<%= displayName
%>">
<div class="toolbar" style="width: 250px;">
- <div class="title"><%=
portletMetaInfo.getMetaValue(MetaInfo.TITLE).getDefaultString() %>
+ <div class="title"><%=
getLocalizedValue(portletMetaInfo.getMetaValue(MetaInfo.TITLE), locale) %>
</div>
</div>
<div class="content">
-
- <div>
- <span class="portlet-form-field-label">Portlet
name:</span><%= displayName %>
+ <div><span class="portlet-form-field-label">Portlet
name:</span><%= displayName %>
</div>
- <div>
- <span class="portlet-form-field-label">Portlet
description:</span><%= desc %>
+ <div><span class="portlet-form-field-label">Portlet
description:</span>
+ <%=
getLocalizedValue(portletMetaInfo.getMetaValue(MetaInfo.DESCRIPTION), locale) %>
</div>
</div>
</div>
-
</div>
<tr class="<%= rowClass %>">
@@ -179,4 +162,15 @@
}
return iconLocation;
}
+
+ private String getLocalizedValue(LocalizedString locString, Locale locale)
+ {
+ String value = "";
+ if (locString != null)
+ {
+ value = locString.getString(locale, true);
+ }
+
+ return value;
+ }
%>
\ No newline at end of file
Show replies by date