Author: thomas.heute(a)jboss.com
Date: 2008-07-30 11:41:01 -0400 (Wed, 30 Jul 2008)
New Revision: 11656
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml
Log:
Suddenly JSF+Facelets doesn't like Sets anymore...
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java 2008-07-30
13:31:11 UTC (rev 11655)
+++
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java 2008-07-30
15:41:01 UTC (rev 11656)
@@ -25,6 +25,7 @@
import org.jboss.portal.common.i18n.LocalizedString;
import org.jboss.portal.common.net.media.MediaType;
import org.jboss.portal.common.util.IteratorStatus;
+import org.jboss.portal.common.util.Tools;
import org.jboss.portal.core.impl.model.content.ContentProviderRegistryService;
import org.jboss.portal.core.model.content.ContentType;
import org.jboss.portal.core.model.content.spi.portlet.ContentPortlet;
@@ -45,8 +46,11 @@
import org.jboss.portal.identity.RoleModule;
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.TransportGuarantee;
import org.jboss.portal.portlet.info.MetaInfo;
+import org.jboss.portal.portlet.info.ModeInfo;
import org.jboss.portal.portlet.info.PortletInfo;
+import org.jboss.portal.portlet.info.WindowStateInfo;
import org.jboss.portal.security.AuthorizationDomainRegistry;
import org.jboss.portal.security.spi.provider.AuthorizationDomain;
import org.jboss.portal.theme.LayoutService;
@@ -173,27 +177,38 @@
}
}
});
- portletDecorator.setProperty("modes", new
AbstractPropertyDecorator(Set.class)
+ portletDecorator.setProperty("modes", new
AbstractPropertyDecorator(List.class)
{
public Object getValue(Object bean) throws IllegalArgumentException
{
Portlet portlet = (Portlet)bean;
- return portlet.getInfo().getCapabilities().getModes(MediaType.TEXT_HTML);
+ Set<ModeInfo> set = portlet.getInfo().getCapabilities().getAllModes();
+ return Tools.toList(set.iterator());
}
});
- portletDecorator.setProperty("windowStates", new
AbstractPropertyDecorator(Set.class)
+ portletDecorator.setProperty("windowStates", new
AbstractPropertyDecorator(List.class)
{
public Object getValue(Object bean) throws IllegalArgumentException
{
Portlet portlet = (Portlet)bean;
- return
portlet.getInfo().getCapabilities().getWindowStates(MediaType.TEXT_HTML);
+ Set<WindowStateInfo> set =
portlet.getInfo().getCapabilities().getWindowStates(MediaType.TEXT_HTML);
+ return Tools.toList(set.iterator());
}
});
- portletDecorator.setProperty("locales", new
AbstractPropertyDecorator(Set.class)
+ portletDecorator.setProperty("mediaTypes", new
AbstractPropertyDecorator(List.class)
{
public Object getValue(Object bean) throws IllegalArgumentException
{
Portlet portlet = (Portlet)bean;
+ Set<MediaType> set =
portlet.getInfo().getCapabilities().getMediaTypes();
+ return Tools.toList(set.iterator());
+ }
+ });
+ portletDecorator.setProperty("locales", new
AbstractPropertyDecorator(List.class)
+ {
+ public Object getValue(Object bean) throws IllegalArgumentException
+ {
+ Portlet portlet = (Portlet)bean;
Set<Locale> locales =
portlet.getInfo().getCapabilities().getAllLocales();
if (locales != null)
{
@@ -205,6 +220,22 @@
}
}
});
+ portletDecorator.setProperty("transportGuarantees", new
AbstractPropertyDecorator(List.class)
+ {
+ public Object getValue(Object bean) throws IllegalArgumentException
+ {
+ Portlet portlet = (Portlet)bean;
+ Set<TransportGuarantee> tg =
portlet.getInfo().getSecurity().getTransportGuarantees();
+ if (tg != null)
+ {
+ return new ArrayList<TransportGuarantee>(tg);
+ }
+ else
+ {
+ return Collections.emptyList();
+ }
+ }
+ });
portletDecorator.setProperty("smallIconLocation", new
PortletIconPropertyDecorator(PortletIconInfo.SMALL));
portletDecorator.setProperty("largeIconLocation", new
PortletIconPropertyDecorator(PortletIconInfo.LARGE));
registerDecorator(Portlet.class, portletDecorator);
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml 2008-07-30
13:31:11 UTC (rev 11655)
+++
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/showPortletDetails.xhtml 2008-07-30
15:41:01 UTC (rev 11656)
@@ -43,7 +43,7 @@
<div class="full-width sub-header2">
<ul>
<li
class="third-width"><label>#{bundle.COMMON_TRANSPORT_GUARANTEES}:
</label>
- <c:forEach var="transportGuarantees"
items="#{portlet.info.security.transportGuarantees}">
+ <c:forEach var="transportGuarantees"
items="#{portlet.transportGuarantees}">
#{transportGuarantees}  
</c:forEach>
</li>
@@ -59,7 +59,7 @@
<portal:box class="whiteWithLtGreyHeader meta-box">
<h3>#{bundle.COMMON_MEDIA_TYPES}</h3>
<dl>
- <c:forEach var="mediaType"
items="#{portlet.info.capabilities.mediaTypes}">
+ <c:forEach var="mediaType"
items="#{portlet.mediaTypes}">
<dt>
#{mediaType.value}
</dt>
@@ -72,7 +72,7 @@
<portal:box class="whiteWithLtGreyHeader meta-box">
<h3>#{bundle.COMMON_PORTLET_MODES}</h3>
<dl>
- <c:forEach var="mode"
items="#{portlet.info.capabilities.allModes}">
+ <c:forEach var="mode" items="#{portlet.modes}">
<dt>
#{mode.modeName}
</dt>
@@ -85,7 +85,7 @@
<portal:box class="whiteWithLtGreyHeader meta-box">
<h3>#{bundle.COMMON_WINDOW_STATES}</h3>
<dl>
- <c:forEach var="windowState"
items="#{portlet.info.capabilities.allWindowStates}">
+ <c:forEach var="windowState"
items="#{portlet.windowStates}">
<dt>
#{windowState.windowStateName}
</dt>
Show replies by date