Author: thomas.heute(a)jboss.com
Date: 2007-11-14 06:58:53 -0500 (Wed, 14 Nov 2007)
New Revision: 8922
Modified:
branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml
Log:
Use display name for Portlet Instances tab (with tooltip on the portlet instance Id)
Modified:
branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java 2007-11-14
11:03:32 UTC (rev 8921)
+++
branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java 2007-11-14
11:58:53 UTC (rev 8922)
@@ -213,7 +213,9 @@
}
}
});
+ instanceDecorator.setProperty("displayName", new
InstanceDisplayNamePropertyDecorator());
registerDecorator(Instance.class, instanceDecorator);
+
//
SimpleBeanDecorator portalObjectDecorator = new SimpleBeanDecorator()
@@ -471,4 +473,24 @@
return DEFAULT_PORTLET_ICON;
}
}
+
+ private class InstanceDisplayNamePropertyDecorator extends AbstractPropertyDecorator
+ {
+ public InstanceDisplayNamePropertyDecorator()
+ {
+ super(String.class);
+ }
+
+ public Object getValue(Object bean) throws IllegalArgumentException
+ {
+ Instance instance = (Instance)bean;
+ String displayName = getValueForRequestLocale(instance.getDisplayName());
+ if (displayName == null)
+ {
+ displayName = instance.getId();
+ }
+ return displayName;
+ }
+ }
+
}
Modified:
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml 2007-11-14
11:03:32 UTC (rev 8921)
+++
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml 2007-11-14
11:58:53 UTC (rev 8922)
@@ -15,7 +15,7 @@
<table id="instancesTable2" width="100%">
<thead class="portlet-section-header">
<tr>
- <th>Id</th>
+ <th>Name</th>
<th>Actions</th>
</tr>
</thead>
@@ -25,7 +25,7 @@
class="#{instance.id == instancemgr.selectedId ?
'portlet-section-selected' : (status.index % 2 == 0 ?
'portlet-section-body' : 'portlet-section-alternate')}">
<td>
<h:commandLink
action="#{instancemgr.selectInstance}">
- <h:outputText value="#{instance.id}"/>
+ <h:outputText value="#{instance.displayName}"
title="#{instance.id}"/>
<f:param name="id"
value="#{instance.id}"/>
<f:param name="plugin" value="info"/>
</h:commandLink>
Show replies by date