Author: julien(a)jboss.com
Date: 2007-02-28 10:58:26 -0500 (Wed, 28 Feb 2007)
New Revision: 6462
Modified:
trunk/core-admin/src/bin/portal-admin-war/images/management/management.css
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/InstanceManagerBean.java
trunk/core-admin/src/resources/portal-admin-sar/content/editor.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/common/editPreferences.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/definitionsTemplate.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/instances.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/nodeNavigation.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/plugins/manager.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/portlets.xhtml
Log:
more work on portlet details editor
Modified: trunk/core-admin/src/bin/portal-admin-war/images/management/management.css
===================================================================
--- trunk/core-admin/src/bin/portal-admin-war/images/management/management.css 2007-02-28
15:25:16 UTC (rev 6461)
+++ trunk/core-admin/src/bin/portal-admin-war/images/management/management.css 2007-02-28
15:58:26 UTC (rev 6462)
@@ -1,13 +1,22 @@
/* Redefine spacing for tables. */
.admin-ui .portlet-table-body {
+ border-collapse: separate;
+ border: 0px;
border-spacing: 10px 4px;
}
-/* Align label on the left for the table headers. */
-.admin-ui .portlet-section-header {
+.admin-ui .portlet-section-header th {
text-align:left;
+ border-top: 0px;
+ border-bottom: 1px solid;
+ border-left: 0px;
+ border-right: 0px;
}
+.admin-ui .portlet-section-header td {
+ border: 0px;
+}
+
/* Change dashed line to solid. */
.admin-ui hr {
border-top-style: solid;
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/InstanceManagerBean.java
===================================================================
---
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/InstanceManagerBean.java 2007-02-28
15:25:16 UTC (rev 6461)
+++
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/InstanceManagerBean.java 2007-02-28
15:58:26 UTC (rev 6462)
@@ -42,9 +42,13 @@
import org.jboss.portal.core.model.instance.Instance;
import org.jboss.portal.core.model.instance.InstanceContainer;
import org.jboss.portal.core.model.instance.NoSuchInstanceException;
+import org.jboss.portal.core.model.instance.InstanceDefinition;
import org.jboss.portal.faces.matrix.Cell;
import org.jboss.portal.faces.matrix.Row;
import org.jboss.portal.faces.matrix.RowSetModel;
+import org.jboss.portal.faces.el.DelegatingPropertyResolver;
+import org.jboss.portal.faces.el.decorator.SimpleBeanDecorator;
+import org.jboss.portal.faces.el.decorator.AbstractPropertyDecorator;
import org.jboss.portal.identity.RoleModule;
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletInvokerException;
@@ -443,4 +447,30 @@
};
}
}
+
+ static
+ {
+ SimpleBeanDecorator instanceDecorator = new SimpleBeanDecorator();
+
+ // If the portlet is not available we want to avoid the stack trace and rather
return null
+ instanceDecorator.setProperty("portlet", new
AbstractPropertyDecorator(Portlet.class)
+ {
+ public Object getValue(Object bean)
+ {
+ Instance instance = (Instance)bean;
+ try
+ {
+ return instance.getPortlet();
+ }
+ catch (PortletInvokerException e)
+ {
+ return null;
+ }
+ }
+ });
+
+ //
+ DelegatingPropertyResolver.registerDecorator(InstanceDefinition.class,
instanceDecorator);
+ }
+
}
Modified: trunk/core-admin/src/resources/portal-admin-sar/content/editor.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-sar/content/editor.xhtml 2007-02-28
15:25:16 UTC (rev 6461)
+++ trunk/core-admin/src/resources/portal-admin-sar/content/editor.xhtml 2007-02-28
15:58:26 UTC (rev 6462)
@@ -12,6 +12,8 @@
styleClass="portlet-form-field">
<f:selectItems value="#{registry.editors.portlet.instanceItems}"/>
</h:selectOneListbox>
+ <hr/>
+ <h:commandButton value="Show details"
styleClass="portlet-form-button"/>
<br/>
<pfc:context>
<ui:param name="instance"
value="#{registry.editors.portlet.instanceMap[contentURI]}"/>
@@ -19,14 +21,16 @@
<c:if test="#{instance != null}">
<div class="portlet-font">
<div><span class="portlet-form-field-label">Portlet
instance:</span> #{instance.id}</div>
- <c:if test="#{portlet != null}">
- <div><span class="portlet-form-field-label">Portlet
name:</span> #{portlet.name}</div>
- <div><span class="portlet-form-field-label">Portlet
description:</span> #{portlet.description}</div>
- </c:if>
+ <c:choose>
+ <c:when test="#{portlet != null}">
+ <ui:include
src="/WEB-INF/jsp/management/common/showPortletDetails.xhtml">
+ <ui:param name="portlet"
value="#{portlet}"/>
+ </ui:include>
+ </c:when>
+ <c:otherwise>The associated portlet is not
available</c:otherwise>
+ </c:choose>
</div>
</c:if>
</pfc:context>
- <br/>
- <h:commandButton value="Show details"
styleClass="portlet-form-button"/>
</div>
\ No newline at end of file
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/common/editPreferences.xhtml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/common/editPreferences.xhtml 2007-02-28
15:25:16 UTC (rev 6461)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/common/editPreferences.xhtml 2007-02-28
15:58:26 UTC (rev 6462)
@@ -6,7 +6,7 @@
xmlns:c="http://java.sun.com/jstl/core">
<h:form>
- <table width="100%" border="0" cellspacing="0"
class="portlet-table-body">
+ <table width="100%" class="portlet-table-body">
<thead class="portlet-section-header"
style="text-align:left;">
<tr>
<th>Key</th>
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/definitionsTemplate.xhtml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/definitionsTemplate.xhtml 2007-02-28
15:25:16 UTC (rev 6461)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/definitionsTemplate.xhtml 2007-02-28
15:58:26 UTC (rev 6462)
@@ -1,7 +1,8 @@
<div
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:ui="http://java.sun.com/jsf/facelets">
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+ class="admin-ui">
<h:form>
<h:commandLink value="Portal Objects" action="portals"
actionListener="#{portalobjectmgr.selectRootObject}"/> | <h:commandLink
value="Porlet Instances" action="instances"/> |
<b><h:commandLink value="Portlet Definitions"
action="portlets"/></b>
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/instances.xhtml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/instances.xhtml 2007-02-28
15:25:16 UTC (rev 6461)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/instances.xhtml 2007-02-28
15:58:26 UTC (rev 6462)
@@ -12,7 +12,7 @@
<h:form>
- <table id="instancesTable2" width="100%" border="0"
cellspacing="0" class="portlet-table-body">
+ <table id="instancesTable2" width="100%"
class="portlet-table-body">
<thead class="portlet-section-header">
<tr>
<th>Id</th>
@@ -55,7 +55,27 @@
<hr/>
<c:if test="#{instancemgr.selectedPlugin == 'info'}">
- Info
+ <c:choose>
+ <c:when test="#{instancemgr.selectedInstance.portlet !=
null}">
+ <h3>Portlet details
+ </h3>
+ <h:form>
+ <h:commandLink
+ action="#{portletmgr.selectPortlet}">
+ <f:param name="id"
value="#{instancemgr.selectedInstance.portlet.context.id}"/>
+ <f:param name="plugin" value="manager"/>
+ Show
+ </h:commandLink> the associated portlet
+ </h:form>
+ <ui:include
src="/WEB-INF/jsp/management/common/showPortletDetails.xhtml">
+ <ui:param name="portlet"
value="#{instancemgr.selectedInstance.portlet}"/>
+ </ui:include>
+ </c:when>
+ <c:otherwise>
+ <h3>Portlet details</h3>
+ The associated portlet is not available
+ </c:otherwise>
+ </c:choose>
</c:if>
<c:if test="#{instancemgr.selectedPlugin ==
'preferences'}">
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/nodeNavigation.xhtml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/nodeNavigation.xhtml 2007-02-28
15:25:16 UTC (rev 6461)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/nodeNavigation.xhtml 2007-02-28
15:58:26 UTC (rev 6462)
@@ -9,7 +9,7 @@
<h:form>
<c:if test="#{not empty portalobjectmgr.portalNodes}">
- <table width="100%" border="0" cellspacing="0"
class="portlet-table-body">
+ <table width="100%" class="portlet-table-body">
<thead class="portlet-section-header">
<tr>
<th>Portal</th>
@@ -47,7 +47,7 @@
</c:if>
<c:if test="#{not empty portalobjectmgr.pageNodes}">
- <table width="100%" border="0" cellspacing="0"
class="portlet-table-body">
+ <table width="100%" class="portlet-table-body">
<thead class="portlet-section-header">
<tr>
<th>Page</th>
@@ -85,7 +85,7 @@
</c:if>
<c:if test="#{not empty portalobjectmgr.windowNodes}">
- <table width="100%" border="0" cellspacing="0"
class="portlet-table-body">
+ <table width="100%" class="portlet-table-body">
<thead class="portlet-section-header">
<tr>
<th>Window</th>
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/plugins/manager.xhtml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/plugins/manager.xhtml 2007-02-28
15:25:16 UTC (rev 6461)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/plugins/manager.xhtml 2007-02-28
15:58:26 UTC (rev 6462)
@@ -42,7 +42,7 @@
<f:selectItems value="#{portalobjectmgr.portalPageItems}"/>
</h:selectOneMenu>
<br/>
- <h:commandButton value="Update"
class="portlet-form-button"/>
+ <h:commandButton value="Update"
styleClass="portlet-form-button"/>
<br/>
</h:form>
<h:form id="portal_form_2">
@@ -52,9 +52,9 @@
<h:inputText id="name" value="#{addPageAction.pageName}"
validator="#{addPageAction.validatePageName}"
required="true"/>
- <h:messages style="color: red"/>
+ <h:messages errorClass="portlet-msg-error"/>
<br/>
- <h:commandButton action="#{addPageAction.execute}" value="Add
page" class="portlet-form-button"/>
+ <h:commandButton action="#{addPageAction.execute}" value="Add
page" styleClass="portlet-form-button"/>
</h:form>
</h:panelGroup>
@@ -67,7 +67,7 @@
contentType="#{portalobjectmgr.selectedObject.type==3 ?
portalobjectmgr.selectedObject.contentType : null}"
contentURI="#{portalobjectmgr.selectedObject.instanceRef}"/>
<br/>
- <h:commandButton value="Change instance"
class="portlet-form-button"/>
+ <h:commandButton value="Change instance"
styleClass="portlet-form-button"/>
</h:form>
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/portlets.xhtml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/portlets.xhtml 2007-02-28
15:25:16 UTC (rev 6461)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/portlets.xhtml 2007-02-28
15:58:26 UTC (rev 6462)
@@ -5,8 +5,7 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:jbp="http://www.jboss.com/portal"
xmlns:c="http://java.sun.com/jstl/core"
-
xmlns:pfc="http://www.jboss.com/portal/facelet/common"
- class="admin-ui">
+
xmlns:pfc="http://www.jboss.com/portal/facelet/common">
<ui:composition
template="/WEB-INF/jsp/management/definitionsTemplate.xhtml">
@@ -23,7 +22,7 @@
<h:form>
- <table width="100%" border="0" cellspacing="0"
class="portlet-table-body">
+ <table width="100%" class="portlet-table-body">
<thead class="portlet-section-header">
<tr>
<th>Id</th>