JBoss Portal SVN: r6476 - in trunk/core-admin/src/bin/portal-admin-war/images/management: tree and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-28 18:35:26 -0500 (Wed, 28 Feb 2007)
New Revision: 6476
Removed:
trunk/core-admin/src/bin/portal-admin-war/images/management/create.png
trunk/core-admin/src/bin/portal-admin-war/images/management/delete.png
trunk/core-admin/src/bin/portal-admin-war/images/management/document.png
trunk/core-admin/src/bin/portal-admin-war/images/management/down.png
trunk/core-admin/src/bin/portal-admin-war/images/management/edit.png
trunk/core-admin/src/bin/portal-admin-war/images/management/fast-forward.png
trunk/core-admin/src/bin/portal-admin-war/images/management/fast-rewind.png
trunk/core-admin/src/bin/portal-admin-war/images/management/first.png
trunk/core-admin/src/bin/portal-admin-war/images/management/help.gif
trunk/core-admin/src/bin/portal-admin-war/images/management/instance.gif
trunk/core-admin/src/bin/portal-admin-war/images/management/last.png
trunk/core-admin/src/bin/portal-admin-war/images/management/left.png
trunk/core-admin/src/bin/portal-admin-war/images/management/line-trunk.gif
trunk/core-admin/src/bin/portal-admin-war/images/management/manage.png
trunk/core-admin/src/bin/portal-admin-war/images/management/portal.gif
trunk/core-admin/src/bin/portal-admin-war/images/management/portlet.gif
trunk/core-admin/src/bin/portal-admin-war/images/management/preferences.png
trunk/core-admin/src/bin/portal-admin-war/images/management/properties.png
trunk/core-admin/src/bin/portal-admin-war/images/management/right.png
trunk/core-admin/src/bin/portal-admin-war/images/management/security.png
trunk/core-admin/src/bin/portal-admin-war/images/management/theme.png
trunk/core-admin/src/bin/portal-admin-war/images/management/tree/context.png
trunk/core-admin/src/bin/portal-admin-war/images/management/tree/page.png
trunk/core-admin/src/bin/portal-admin-war/images/management/tree/portal.png
trunk/core-admin/src/bin/portal-admin-war/images/management/tree/window.png
trunk/core-admin/src/bin/portal-admin-war/images/management/up.png
trunk/core-admin/src/bin/portal-admin-war/images/management/window.png
trunk/core-admin/src/bin/portal-admin-war/images/management/yellow-folder-closed.png
trunk/core-admin/src/bin/portal-admin-war/images/management/yellow-folder-open.png
Log:
iconless design does not need icons
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/create.png
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/delete.png
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/document.png
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/down.png
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/edit.png
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/fast-forward.png
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/fast-rewind.png
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/first.png
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/help.gif
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/instance.gif
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/last.png
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/left.png
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/line-trunk.gif
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/manage.png
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/portal.gif
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/portlet.gif
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/preferences.png
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/properties.png
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/right.png
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/security.png
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/theme.png
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/tree/context.png
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/tree/page.png
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/tree/portal.png
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/tree/window.png
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/up.png
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/window.png
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/yellow-folder-closed.png
===================================================================
(Binary files differ)
Deleted: trunk/core-admin/src/bin/portal-admin-war/images/management/yellow-folder-open.png
===================================================================
(Binary files differ)
17 years, 2 months
JBoss Portal SVN: r6475 - in trunk: core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-28 18:33:29 -0500 (Wed, 28 Feb 2007)
New Revision: 6475
Added:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/editWindowTheme.xhtml
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortletManagerBean.java
trunk/portlet-federation/src/main/org/jboss/portal/portlet/federation/impl/FederatedPortlet.java
trunk/portlet-federation/src/main/org/jboss/portal/portlet/federation/impl/FederatedPortletInvokerService.java
trunk/portlet-federation/src/main/org/jboss/portal/portlet/federation/impl/FederatingPortletInvokerService.java
Log:
- federated portlet was wrapped 2 times, one by the federating invoker and one by the federated invoker, only keep the federated invoker
- when a portlet is selected (from navigating from the instance), select the right invoker and paginate the portlet shown correctly
Modified: trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortletManagerBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortletManagerBean.java 2007-02-28 23:06:03 UTC (rev 6474)
+++ trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortletManagerBean.java 2007-02-28 23:33:29 UTC (rev 6475)
@@ -49,6 +49,7 @@
import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.federation.FederatedPortletInvoker;
import org.jboss.portal.portlet.federation.FederatingPortletInvoker;
+import org.jboss.portal.portlet.federation.impl.FederatedPortlet;
import org.jboss.portal.portlet.info.MetaInfo;
import org.jboss.portal.portlet.info.PreferenceInfo;
import org.jboss.portal.portlet.info.PreferencesInfo;
@@ -126,8 +127,7 @@
private PortletInvoker getPortletInvoker()
{
- FederatedPortletInvoker federated = federatingPortletInvoker.getFederatedInvoker(selectedFederatedId);
- return federated;
+ return federatingPortletInvoker.getFederatedInvoker(selectedFederatedId);
}
public Collection getFederatedIds()
@@ -204,12 +204,16 @@
{
try
{
+ // Get portlets
List portlets = new ArrayList(getPortletInvoker().getPortlets());
- //
+ // Sort
+ Collections.sort(portlets, comparator);
+
+ // Compute upper bound
int to = Math.min(selectedFrom + 10, portlets.size());
- //
+ // Range
return portlets.subList(selectedFrom, to);
}
catch (PortletInvokerException e)
@@ -263,12 +267,44 @@
}
}
- public void selectPortlet()
+ public String selectPortlet()
{
FacesContext ctx = FacesContext.getCurrentInstance();
selectedPortletId = (String)ctx.getExternalContext().getRequestParameterMap().get("id");
selectedPlugin = (String)ctx.getExternalContext().getRequestParameterMap().get("plugin");
- selectedFrom = 0; // Could we guess the index of the portlet in the list ?
+ selectedFrom = 0;
+
+ try
+ {
+ // Get portlet
+ PortletContext portletCtx = PortletContext.createPortletContext(selectedPortletId);
+ FederatedPortlet portlet = (FederatedPortlet)federatingPortletInvoker.getPortlet(portletCtx);
+
+ //
+ selectedFederatedId = portlet.getFederatedId();
+
+ // Get sorted portlets
+ List portlets = new ArrayList(getPortletInvoker().getPortlets());
+ Collections.sort(portlets, comparator);
+
+ // Find the portlet index in the list
+ for (int i = 0;i < portlets.size();i++)
+ {
+ Portlet current = (Portlet)portlets.get(i);
+ if (portlet.getContext().getId().equals(current.getContext().getId()))
+ {
+ selectedFrom = (i / paginationSize) * paginationSize;
+ break;
+ }
+ }
+ }
+ catch (PortletInvokerException e)
+ {
+ e.printStackTrace();
+ }
+
+ // It may be called from the instance stuff so we need to returns portlet
+ return "portlets";
}
public void selectFrom()
@@ -340,81 +376,17 @@
}
}
- public static void sortPortlets(List portlets, final String column, final boolean ascending)
+ /** A comparator for portlets. */
+ final Comparator comparator = new Comparator()
{
- Comparator comparator = new Comparator()
+ public int compare(Object o1, Object o2)
{
- public int compare(Object o1, Object o2)
- {
- Portlet p1 = (Portlet)o1;
- Portlet p2 = (Portlet)o2;
+ Portlet p1 = (Portlet)o1;
+ Portlet p2 = (Portlet)o2;
+ return p1.getContext().getId().compareToIgnoreCase(p2.getContext().getId());
+ }
+ };
- if (p1 == null || p2 == null)
- {
- return 0;
- }
-
- if (column == null)
- {
- return 0;
- }
- if (column.equals("id"))
- {
- return ascending ? p1.getContext().getId().compareToIgnoreCase(p2.getContext().getId()) : p2.getContext().getId()
- .compareToIgnoreCase(p1.getContext().getId());
- }
- if (column.equals("name"))
- {
-
- LocalizedString displayName = p1.getInfo().getMeta().getMetaValue(MetaInfo.DISPLAY_NAME);
- FacesContext ctx = FacesContext.getCurrentInstance();
- Locale locale = ctx.getExternalContext().getRequestLocale();
- String name1 = displayName.getString(locale, true);
- if (name1 == null)
- {
- name1 = "";
- }
- displayName = p2.getInfo().getMeta().getMetaValue(MetaInfo.DISPLAY_NAME);
- String name2 = displayName.getString(locale, true);
- if (name2 == null)
- {
- name2 = "";
- }
-
- return ascending ? name1.compareToIgnoreCase(name2) : name2
- .compareToIgnoreCase(name1);
- }
-
- if (column.equals("description"))
- {
- LocalizedString displayName = p1.getInfo().getMeta().getMetaValue(MetaInfo.DESCRIPTION);
- FacesContext ctx = FacesContext.getCurrentInstance();
- Locale locale = ctx.getExternalContext().getRequestLocale();
- String name1 = displayName.getString(locale, true);
- if (name1 == null)
- {
- name1 = "-";
- }
- displayName = p2.getInfo().getMeta().getMetaValue(MetaInfo.DESCRIPTION);
- String name2 = displayName.getString(locale, true);
- if (name2 == null)
- {
- name2 = "-";
- }
-
- return ascending ? name1.compareToIgnoreCase(name2) : name2
- .compareToIgnoreCase(name1);
- }
-
- else
- {
- return 0;
- }
- }
- };
- Collections.sort(portlets, comparator);
- }
-
public class AuthorizationBean extends AbstractAuthorizationBean
{
Added: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/editWindowTheme.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/editWindowTheme.xhtml (rev 0)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/editWindowTheme.xhtml 2007-02-28 23:33:29 UTC (rev 6475)
@@ -0,0 +1,19 @@
+<div
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html">
+
+<ui:composition template="/WEB-INF/jsp/management/objectTemplate.xhtml">
+
+ <ui:define name="content">
+
+ <h3>Please set the display options for the window: <h:outputText value="#{portalobjectmgr.selectedObject.name}"/></h3>
+ <br/>
+ <ui:include src="/WEB-INF/jsp/management/common/editTheme.xhtml"/>
+
+ </ui:define>
+
+</ui:composition>
+
+</div>
+
Modified: trunk/portlet-federation/src/main/org/jboss/portal/portlet/federation/impl/FederatedPortlet.java
===================================================================
--- trunk/portlet-federation/src/main/org/jboss/portal/portlet/federation/impl/FederatedPortlet.java 2007-02-28 23:06:03 UTC (rev 6474)
+++ trunk/portlet-federation/src/main/org/jboss/portal/portlet/federation/impl/FederatedPortlet.java 2007-02-28 23:33:29 UTC (rev 6475)
@@ -24,6 +24,7 @@
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletContext;
+import org.jboss.portal.portlet.federation.FederatedPortletInvoker;
import org.jboss.portal.portlet.info.PortletInfo;
/**
@@ -39,8 +40,15 @@
/** . */
final Portlet portlet;
- public FederatedPortlet(PortletContext compoundContext, Portlet portlet)
+ /** . */
+ final FederatedPortletInvoker invoker;
+
+ public FederatedPortlet(FederatedPortletInvoker invoker, PortletContext compoundContext, Portlet portlet)
{
+ if (invoker == null)
+ {
+ throw new IllegalArgumentException("No null invoker accepted");
+ }
if (compoundContext == null)
{
throw new IllegalArgumentException("No null id accepted");
@@ -49,10 +57,16 @@
{
throw new IllegalArgumentException("No null portlet accepted");
}
+ this.invoker = invoker;
this.compoundContext = compoundContext;
this.portlet = portlet;
}
+ public String getFederatedId()
+ {
+ return invoker.getId();
+ }
+
public PortletContext getContext()
{
return compoundContext;
Modified: trunk/portlet-federation/src/main/org/jboss/portal/portlet/federation/impl/FederatedPortletInvokerService.java
===================================================================
--- trunk/portlet-federation/src/main/org/jboss/portal/portlet/federation/impl/FederatedPortletInvokerService.java 2007-02-28 23:06:03 UTC (rev 6474)
+++ trunk/portlet-federation/src/main/org/jboss/portal/portlet/federation/impl/FederatedPortletInvokerService.java 2007-02-28 23:33:29 UTC (rev 6475)
@@ -91,7 +91,7 @@
for (Iterator i = portletInvoker.getPortlets().iterator(); i.hasNext();)
{
Portlet portlet = (Portlet)i.next();
- Portlet federatedPortlet = new FederatedPortlet(reference(portlet.getContext()), portlet);
+ Portlet federatedPortlet = new FederatedPortlet(this, reference(portlet.getContext()), portlet);
federatedPortlets.add(federatedPortlet);
}
return federatedPortlets;
@@ -106,7 +106,7 @@
Portlet portlet = portletInvoker.getPortlet(portletContext);
// Return correct result
- return new FederatedPortlet(compoundPortletContext, portlet);
+ return new FederatedPortlet(this, compoundPortletContext, portlet);
}
private class FederatedInstanceContext implements InstanceContext
Modified: trunk/portlet-federation/src/main/org/jboss/portal/portlet/federation/impl/FederatingPortletInvokerService.java
===================================================================
--- trunk/portlet-federation/src/main/org/jboss/portal/portlet/federation/impl/FederatingPortletInvokerService.java 2007-02-28 23:06:03 UTC (rev 6474)
+++ trunk/portlet-federation/src/main/org/jboss/portal/portlet/federation/impl/FederatingPortletInvokerService.java 2007-02-28 23:33:29 UTC (rev 6475)
@@ -138,22 +138,8 @@
public Portlet getPortlet(PortletContext compoundPortletContext) throws IllegalArgumentException, PortletInvokerException
{
- FederatedPortletInvoker federated;
- try
- {
- federated = getFederatedPortletInvokerFor(compoundPortletContext);
- }
- catch (NoSuchPortletException e)
- {
- log.warn(e);
- return null;
- }
-
- //
- Portlet portlet = federated.getPortlet(compoundPortletContext);
-
- //
- return new FederatedPortlet(compoundPortletContext, portlet);
+ FederatedPortletInvoker federated = getFederatedPortletInvokerFor(compoundPortletContext);
+ return federated.getPortlet(compoundPortletContext);
}
public PortletInvocationResponse invoke(PortletInvocation invocation) throws PortletInvokerException
17 years, 2 months
JBoss Portal SVN: r6474 - in trunk/core-admin/src: resources/portal-admin-war/WEB-INF/jsp/management and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-28 18:06:03 -0500 (Wed, 28 Feb 2007)
New Revision: 6474
Modified:
trunk/core-admin/src/bin/portal-admin-war/images/management/management.css
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/objectTemplate.xhtml
Log:
better display of object path nav bar
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 23:00:07 UTC (rev 6473)
+++ trunk/core-admin/src/bin/portal-admin-war/images/management/management.css 2007-02-28 23:06:03 UTC (rev 6474)
@@ -43,7 +43,7 @@
.admin-ui ul.topnav {
margin: 0;
- padding: 4px 0px 3px 0px;
+ padding: 5px 0px 5px 0px;
}
.admin-ui ul.topnav li {
@@ -52,6 +52,17 @@
margin-right: 10px;
}
+.admin-ui ul.objectpath {
+ margin: 0;
+ padding: 5px 0px 5px 0px;
+}
+
+.admin-ui ul.objectpath li {
+ list-style-type: none;
+ display: inline;
+ margin-right: 3px;
+}
+
/* Change dashed line to solid. */
.admin-ui hr {
border-top-style: solid;
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/objectTemplate.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/objectTemplate.xhtml 2007-02-28 23:00:07 UTC (rev 6473)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/objectTemplate.xhtml 2007-02-28 23:06:03 UTC (rev 6474)
@@ -12,8 +12,12 @@
<!-- Path nav -->
<hr/>
<h:form>
+ <ul class="objectpath">
<c:forEach items="#{portalobjectmgr.selectedObjectPath}" var="node">
+ <li>
>
+ </li>
+ <li>
<c:choose>
<c:when test="#{node.id == portalobjectmgr.selectedObjectBean.id}">
<c:if test="#{node.name == ''}">root</c:if>
@@ -27,7 +31,9 @@
</h:commandLink>
</c:otherwise>
</c:choose>
+ </li>
</c:forEach>
+ </ul>
</h:form>
<!-- Navigation -->
17 years, 2 months
JBoss Portal SVN: r6473 - in trunk/core-admin/src: resources/portal-admin-war/WEB-INF/jsp/management and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-28 18:00:07 -0500 (Wed, 28 Feb 2007)
New Revision: 6473
Removed:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/pageNavigation.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/portalNavigation.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/windowNavigation.xhtml
Modified:
trunk/core-admin/src/bin/portal-admin-war/images/management/management.css
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/instancesTemplate.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/objectTemplate.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/pages.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/portals.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/portletsTemplate.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/tabTemplate.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/windows.xhtml
Log:
simplified the various file inclusions
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 22:10:14 UTC (rev 6472)
+++ trunk/core-admin/src/bin/portal-admin-war/images/management/management.css 2007-02-28 23:00:07 UTC (rev 6473)
@@ -41,6 +41,17 @@
text-decoration: none;
}
+.admin-ui ul.topnav {
+ margin: 0;
+ padding: 4px 0px 3px 0px;
+}
+
+.admin-ui ul.topnav li {
+ list-style-type: none;
+ display: inline;
+ margin-right: 10px;
+}
+
/* Change dashed line to solid. */
.admin-ui hr {
border-top-style: solid;
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/instancesTemplate.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/instancesTemplate.xhtml 2007-02-28 22:10:14 UTC (rev 6472)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/instancesTemplate.xhtml 2007-02-28 23:00:07 UTC (rev 6473)
@@ -4,9 +4,7 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
class="admin-ui">
- <h:form>
- <h:commandLink value="Portal Objects" action="portals" actionListener="#{portalobjectmgr.selectRootObject}"/> | <b><h:commandLink value="Porlet Instances" action="instances"/></b> | <h:commandLink value="Portlet Definitions" action="portlets"/>
- </h:form>
+ <ui:include src="tabTemplate.xhtml"/>
<hr/>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/objectTemplate.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/objectTemplate.xhtml 2007-02-28 22:10:14 UTC (rev 6472)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/objectTemplate.xhtml 2007-02-28 23:00:07 UTC (rev 6473)
@@ -6,9 +6,8 @@
xmlns:c="http://java.sun.com/jstl/core"
class="admin-ui">
- <h:form>
- <b><h:commandLink value="Portal Objects" action="portals" actionListener="#{portalobjectmgr.selectRootObject}"/></b> | <h:commandLink value="Porlet Instances" action="instances"/> | <h:commandLink value="Portlet Definitions" action="portlets"/>
- </h:form>
+ <!-- Common nav -->
+ <ui:include src="tabTemplate.xhtml"/>
<!-- Path nav -->
<hr/>
@@ -31,6 +30,10 @@
</c:forEach>
</h:form>
+ <!-- Navigation -->
+ <ui:include src="objectNavigation.xhtml"/>
+
+ <!-- Content -->
<ui:insert name="content">Content</ui:insert>
</div>
Deleted: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/pageNavigation.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/pageNavigation.xhtml 2007-02-28 22:10:14 UTC (rev 6472)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/pageNavigation.xhtml 2007-02-28 23:00:07 UTC (rev 6473)
@@ -1,18 +0,0 @@
-<div
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core">
-
- <ui:include src="objectNavigation.xhtml"/>
-
- <!-- Sub page addition -->
-
- <hr/>
- <h:form id="portal_form">
- <h:inputText id="name" value="#{addPageAction.pageName}" styleClass="portlet-form-input-field" required="true"/>
- <h:commandButton action="#{addPageAction.execute}" value="Add page" styleClass="portlet-form-button"/>
- <h:message for="name" errorClass="portlet-msg-error"/>
- </h:form>
-
-</div>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/pages.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/pages.xhtml 2007-02-28 22:10:14 UTC (rev 6472)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/pages.xhtml 2007-02-28 23:00:07 UTC (rev 6473)
@@ -2,14 +2,21 @@
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html">
+
<ui:composition template="/WEB-INF/jsp/management/objectTemplate.xhtml">
<ui:define name="content">
- <h3>You are editing the pages of: <h:outputText value="#{portalobjectmgr.selectedObject.name}"/></h3>
+
<h:message id="status" for="status"/>
- <ui:include src="/WEB-INF/jsp/management/pageNavigation.xhtml"/>
+
+ <!-- Sub page addition -->
+ <hr/>
+ <h:form id="portal_form">
+ <h:inputText id="name" value="#{addPageAction.pageName}" styleClass="portlet-form-input-field" required="true"/>
+ <h:commandButton action="#{addPageAction.execute}" value="Add page" styleClass="portlet-form-button"/>
+ <h:message for="name" errorClass="portlet-msg-error"/>
+ </h:form>
+
</ui:define>
</ui:composition>
+
</div>
-
-
-
Deleted: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/portalNavigation.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/portalNavigation.xhtml 2007-02-28 22:10:14 UTC (rev 6472)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/portalNavigation.xhtml 2007-02-28 23:00:07 UTC (rev 6473)
@@ -1,15 +0,0 @@
-<div
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html">
-
- <ui:include src="objectNavigation.xhtml"/>
-
- <hr/>
- <h:form id="portal_form">
- <h:inputText id="name" value="#{portalAction.portalName}" styleClass="portlet-form-input-field" required="true"/>
- <h:commandButton action="#{portalAction.addPortal}" value="Add portal" styleClass="portlet-form-button"/>
- <h:message for="name" errorClass="portlet-msg-error"/>
- </h:form>
-
-</div>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/portals.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/portals.xhtml 2007-02-28 22:10:14 UTC (rev 6472)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/portals.xhtml 2007-02-28 23:00:07 UTC (rev 6473)
@@ -2,13 +2,20 @@
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html">
+
<ui:composition template="/WEB-INF/jsp/management/objectTemplate.xhtml">
<ui:define name="content">
+
<h:message id="status" for="status"/>
- <ui:include src="/WEB-INF/jsp/management/portalNavigation.xhtml"/>
+
+ <hr/>
+ <h:form id="portal_form">
+ <h:inputText id="name" value="#{portalAction.portalName}" styleClass="portlet-form-input-field" required="true"/>
+ <h:commandButton action="#{portalAction.addPortal}" value="Add portal" styleClass="portlet-form-button"/>
+ <h:message for="name" errorClass="portlet-msg-error"/>
+ </h:form>
+
</ui:define>
</ui:composition>
+
</div>
-
-
-
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/portletsTemplate.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/portletsTemplate.xhtml 2007-02-28 22:10:14 UTC (rev 6472)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/portletsTemplate.xhtml 2007-02-28 23:00:07 UTC (rev 6473)
@@ -4,9 +4,7 @@
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>
- </h:form>
+ <ui:include src="tabTemplate.xhtml"/>
<hr/>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/tabTemplate.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/tabTemplate.xhtml 2007-02-28 22:10:14 UTC (rev 6472)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/tabTemplate.xhtml 2007-02-28 23:00:07 UTC (rev 6473)
@@ -2,27 +2,18 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">
-<h:form>
-<div id="navigation">
- <ul id="tabsHeader">
- <li id="current" onmouseover="this.className='hoverOn'" onmouseout="this.className='hoverOff'">
- <h:commandLink value="Portal Objects" action="portalobjects"/>
- </li>
- <li onmouseover="this.className='hoverOn'" onmouseout="this.className='hoverOff'">
- <h:commandLink value="Porlet Instances" action="instances"/>
- </li>
- <li onmouseover="this.className='hoverOn'" onmouseout="this.className='hoverOff'">
- <h:commandLink value="Portlet Definitions" action="portlets"/>
- </li>
- </ul>
-</div>
+ <h:form>
+ <ul class="topnav">
+ <li>
+ <h:commandLink value="Portal Objects" action="portals" actionListener="#{portalobjectmgr.selectRootObject}"/>
+ </li>
+ <li>
+ <h:commandLink value="Portlet Instances" action="instances"/>
+ </li>
+ <li>
+ <h:commandLink value="Portlet Definitions" action="portlets"/>
+ </li>
+ </ul>
+ </h:form>
-<div>
-<h:commandLink value="Portal Objects" action="portals"/> | <h:commandLink value="Porlet Instances" action="instances"/> | <h:commandLink value="Portlet Definitions" action="portlets"/>
</div>
-
-</h:form>
-
-<ui:insert name="content">Content</ui:insert>
-
-</div>
Deleted: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/windowNavigation.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/windowNavigation.xhtml 2007-02-28 22:10:14 UTC (rev 6472)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/windowNavigation.xhtml 2007-02-28 23:00:07 UTC (rev 6473)
@@ -1,5 +0,0 @@
-<div
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets">
- <ui:include src="/WEB-INF/jsp/management/nodeNavigation.xhtml"/>
-</div>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/windows.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/windows.xhtml 2007-02-28 22:10:14 UTC (rev 6472)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/windows.xhtml 2007-02-28 23:00:07 UTC (rev 6473)
@@ -1,17 +1,24 @@
<div
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:ct="http://www.julien.com"
xmlns:h="http://java.sun.com/jsf/html">
+
<ui:composition template="/WEB-INF/jsp/management/objectTemplate.xhtml">
<ui:define name="content">
- <h3>You are editing the windows of: <h:outputText value="#{portalobjectmgr.selectedObject.name}"/></h3>
+
<h:message id="status" for="status"/>
- <ui:include src="/WEB-INF/jsp/management/windowNavigation.xhtml"/>
+
<hr/>
- <ui:include src="/WEB-INF/jsp/management/plugins/manager.xhtml"/>
+ <h:form id="window_form">
+ <ct:content
+ contentType="#{portalobjectmgr.selectedObject.type==3 ? portalobjectmgr.selectedObject.contentType : null}"
+ contentURI="#{portalobjectmgr.selectedObject.instanceRef}"/>
+ <br/>
+ <h:commandButton value="Change instance" styleClass="portlet-form-button"/>
+ </h:form>
+
</ui:define>
</ui:composition>
+
</div>
-
-
-
17 years, 2 months
JBoss Portal SVN: r6472 - in trunk/core-admin/src: resources/portal-admin-war/WEB-INF/jsp/management and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-28 17:10:14 -0500 (Wed, 28 Feb 2007)
New Revision: 6472
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/PortletManagerBean.java
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/portlets.xhtml
Log:
pagination for portlets
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 21:59:59 UTC (rev 6471)
+++ trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/InstanceManagerBean.java 2007-02-28 22:10:14 UTC (rev 6472)
@@ -96,7 +96,14 @@
/** . */
private AbstractAuthorizationBean auth = new AuthorizationBean();
+ /** . */
+ private final int paginationSize = 10;
+ public int getPaginationSize()
+ {
+ return paginationSize;
+ }
+
public int getSelectedFrom()
{
return selectedFrom;
@@ -209,7 +216,7 @@
// }
//
- int to = Math.min(selectedFrom + 5, instances.size());
+ int to = Math.min(selectedFrom + 10, instances.size());
//
return instances.subList(selectedFrom, to);
Modified: trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortletManagerBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortletManagerBean.java 2007-02-28 21:59:59 UTC (rev 6471)
+++ trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortletManagerBean.java 2007-02-28 22:10:14 UTC (rev 6472)
@@ -94,30 +94,26 @@
private FederatingPortletInvoker federatingPortletInvoker;
/** . */
- private String sortColumn;
+ private int selectedFrom;
- private boolean sortAscending;
+ /** . */
+ private final int paginationSize = 10;
- public String getSortColumn()
+ public int getPaginationSize()
{
- return sortColumn;
+ return paginationSize;
}
- public void setSortColumn(String sortColumn)
+ public int getSelectedFrom()
{
- this.sortColumn = sortColumn;
+ return selectedFrom;
}
- public boolean getSortAscending()
+ public void setSelectedFrom(int selectedFrom)
{
- return sortAscending;
+ this.selectedFrom = selectedFrom;
}
- public void setSortAscending(boolean sortAscending)
- {
- this.sortAscending = sortAscending;
- }
-
public RoleModule getRoleModule()
{
return roleModule;
@@ -199,42 +195,47 @@
this.federatingPortletInvoker = federatingPortletInvoker;
}
+ public PreferencesBean getSelectedPreferences()
+ {
+ return selectedPreferences;
+ }
+
public Collection getPortlets()
{
- List portlets = Collections.EMPTY_LIST;
try
{
- portlets = new ArrayList(getPortletInvoker().getPortlets());
+ List portlets = new ArrayList(getPortletInvoker().getPortlets());
+
+ //
+ int to = Math.min(selectedFrom + 10, portlets.size());
+
+ //
+ return portlets.subList(selectedFrom, to);
}
catch (PortletInvokerException e)
{
log.warn("Couldn't access portlet invoker. Portlets won't be listed.\nReason:\n\t" + e.getLocalizedMessage());
+ return Collections.EMPTY_LIST;
}
+ }
+ public int getPortletCount()
+ {
try
{
- sortPortlets(portlets, sortColumn, sortAscending);
+ return getPortletInvoker().getPortlets().size();
}
- catch (Exception e)
+ catch (PortletInvokerException e)
{
- log.warn("Error during sorting portlets list");
+ return 0;
}
-
- return portlets;
}
- // ****************
-
public DomainConfigurator getDomainConfigurator()
{
return authorizationDomainRegistry.getDomain("portlet").getConfigurator();
}
- public String[] getToto()
- {
- return new String[]{"1", "2", "3"};
- }
-
public AbstractAuthorizationBean getAuth()
{
return auth;
@@ -262,17 +263,20 @@
}
}
- public String selectPortlet()
+ public void selectPortlet()
{
FacesContext ctx = FacesContext.getCurrentInstance();
selectedPortletId = (String)ctx.getExternalContext().getRequestParameterMap().get("id");
selectedPlugin = (String)ctx.getExternalContext().getRequestParameterMap().get("plugin");
- return "portlets";
+ selectedFrom = 0; // Could we guess the index of the portlet in the list ?
}
- public PreferencesBean getSelectedPreferences()
+ public void selectFrom()
{
- return selectedPreferences;
+ Map pmap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
+ selectedFrom = Integer.parseInt((String)pmap.get("from"));
+ selectedPlugin = null;
+ selectedPortletId = null;
}
/** Refresh the selected prefs if they are available. */
@@ -280,53 +284,58 @@
{
selectedPreferences = null;
- // Get user locale
- FacesContext ctx = FacesContext.getCurrentInstance();
- Locale locale = ctx.getExternalContext().getRequestLocale();
+ //
+ if ("preferences".equals(selectedPlugin))
+ {
+ // Get user locale
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ Locale locale = ctx.getExternalContext().getRequestLocale();
- // Get portlet
- Portlet portlet = getSelectedPortlet();
+ // Get portlet
+ Portlet portlet = getSelectedPortlet();
- if (portlet != null)
- {
- // Get preferences info
- PreferencesInfo prefsInfo = portlet.getInfo().getPreferences();
-
- // If the portlet has preferences info then we display them
- if (prefsInfo != null)
+ //
+ if (portlet != null)
{
- RowSetModel model = new RowSetModel(null, prefsInfo.getKeys().size());
- model.setMutable(false);
+ // Get preferences info
+ PreferencesInfo prefsInfo = portlet.getInfo().getPreferences();
- //
- int index = 0;
- for (Iterator i = prefsInfo.getKeys().iterator(); i.hasNext(); index++)
+ // If the portlet has preferences info then we display them
+ if (prefsInfo != null)
{
- String key = (String)i.next();
+ RowSetModel model = new RowSetModel(null, prefsInfo.getKeys().size());
+ model.setMutable(false);
//
- PreferenceInfo prefs = prefsInfo.getPreference(key);
- Value value = new StringValue("not available");
- Boolean readOnly = prefs.isReadOnly();
+ int index = 0;
+ for (Iterator i = prefsInfo.getKeys().iterator(); i.hasNext(); index++)
+ {
+ String key = (String)i.next();
- //
- Row row = model.getRow(index);
+ //
+ PreferenceInfo prefs = prefsInfo.getPreference(key);
+ Value value = new StringValue("not available");
+ Boolean readOnly = prefs.isReadOnly();
- //
- Cell cell = row.getCell();
- cell.setHandback("" + i);
- cell.setValue(value.asStringArray());
+ //
+ Row row = model.getRow(index);
+ //
+ Cell cell = row.getCell();
+ cell.setHandback("" + i);
+ cell.setValue(value.asStringArray());
+
+ //
+ row.setHandback(key);
+ row.setKey(key);
+ row.setName(prefs.getDisplayName().getString(locale, true));
+ row.setReadOnly(Boolean.TRUE.equals(readOnly));
+ row.setValue(value.asStringArray());
+ }
+
//
- row.setHandback(key);
- row.setKey(key);
- row.setName(prefs.getDisplayName().getString(locale, true));
- row.setReadOnly(Boolean.TRUE.equals(readOnly));
- row.setValue(value.asStringArray());
+ selectedPreferences = new PreferencesBean(model);
}
-
- //
- selectedPreferences = new PreferencesBean(model);
}
}
}
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 21:59:59 UTC (rev 6471)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/instances.xhtml 2007-02-28 22:10:14 UTC (rev 6472)
@@ -48,7 +48,7 @@
</tbody>
</table>
<ul class="pagination">
- <c:forEach begin="0" end="#{instancemgr.instanceCount}" step="5" var="index">
+ <c:forEach begin="0" end="#{instancemgr.instanceCount}" step="#{instancemgr.paginationSize}" var="index">
<li class="#{index == instancemgr.selectedFrom ? 'selected' : ''}">
<h:commandLink action="#{instancemgr.selectFrom}"><f:param name="from" value="#{index}"/><h:outputText value="#{index}"/></h:commandLink>
</li>
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 21:59:59 UTC (rev 6471)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/portlets.xhtml 2007-02-28 22:10:14 UTC (rev 6472)
@@ -61,6 +61,13 @@
</c:forEach>
</tbody>
</table>
+ <ul class="pagination">
+ <c:forEach begin="0" end="#{portletmgr.portletCount}" step="#{portletmgr.paginationSize}" var="index">
+ <li class="#{index == portletmgr.selectedFrom ? 'selected' : ''}">
+ <h:commandLink action="#{portletmgr.selectFrom}"><f:param name="from" value="#{index}"/><h:outputText value="#{index}"/></h:commandLink>
+ </li>
+ </c:forEach>
+ </ul>
</h:form>
<c:if test="#{portletmgr.selectedPortlet != null}">
17 years, 2 months
JBoss Portal SVN: r6471 - in trunk/core-admin/src: resources/portal-admin-war/WEB-INF/jsp/management and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-28 16:59:59 -0500 (Wed, 28 Feb 2007)
New Revision: 6471
Modified:
trunk/core-admin/src/bin/portal-admin-war/images/management/management.css
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/instances.xhtml
Log:
done pagination for instances
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 20:34:38 UTC (rev 6470)
+++ trunk/core-admin/src/bin/portal-admin-war/images/management/management.css 2007-02-28 21:59:59 UTC (rev 6471)
@@ -21,6 +21,26 @@
padding-top: 2px;
}
+.admin-ui ul.pagination {
+ margin: 0;
+ padding: 4px 0px 3px 0px;
+}
+
+.admin-ui ul.pagination li {
+ list-style-type: none;
+ display: inline;
+ margin-right: 2px;
+ border: 1px solid;
+}
+
+.admin-ui ul.pagination li.selected {
+ font-weight: bold;
+}
+
+.pagination a, .pagination a:visited, .pagination a:hover{
+ text-decoration: none;
+}
+
/* Change dashed line to solid. */
.admin-ui hr {
border-top-style: solid;
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 20:34:38 UTC (rev 6470)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/instances.xhtml 2007-02-28 21:59:59 UTC (rev 6471)
@@ -47,9 +47,13 @@
</c:forEach>
</tbody>
</table>
- <c:forEach begin="0" end="#{instancemgr.instanceCount}" step="5" var="index">
- <h:commandLink action="#{instancemgr.selectFrom}"><f:param name="from" value="#{index}"/><h:outputText value="#{index}"/></h:commandLink>
- </c:forEach>
+ <ul class="pagination">
+ <c:forEach begin="0" end="#{instancemgr.instanceCount}" step="5" var="index">
+ <li class="#{index == instancemgr.selectedFrom ? 'selected' : ''}">
+ <h:commandLink action="#{instancemgr.selectFrom}"><f:param name="from" value="#{index}"/><h:outputText value="#{index}"/></h:commandLink>
+ </li>
+ </c:forEach>
+ </ul>
</h:form>
17 years, 2 months
JBoss Portal SVN: r6470 - in trunk/core-admin/src: resources/portal-admin-war/WEB-INF/jsp/management and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-28 15:34:38 -0500 (Wed, 28 Feb 2007)
New Revision: 6470
Modified:
trunk/core-admin/src/bin/portal-admin-war/images/management/management.css
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/instances.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/objectNavigation.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/portlets.xhtml
Log:
much better CSS for the table
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 19:42:03 UTC (rev 6469)
+++ trunk/core-admin/src/bin/portal-admin-war/images/management/management.css 2007-02-28 20:34:38 UTC (rev 6470)
@@ -1,20 +1,24 @@
/* Redefine spacing for tables. */
-.admin-ui .portlet-table-body {
+.admin-ui table {
+ border: 0px;
border-collapse: separate;
- border: 0px;
border-spacing: 10px 4px;
+ margin-left: -10px;
+ margin-right: -10px;
+ margin-top: -4px;
+ margin-bottom: -4px;
}
-.admin-ui .portlet-section-header th {
+.admin-ui th {
text-align:left;
- border-top: 0px;
+ border: 0px;
border-bottom: 1px solid;
- border-left: 0px;
- border-right: 0px;
}
-.admin-ui .portlet-section-header td {
+.admin-ui td {
border: 0px;
+ padding-bottom: 2px;
+ padding-top: 2px;
}
/* Change dashed line to solid. */
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 19:42:03 UTC (rev 6469)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/common/editPreferences.xhtml 2007-02-28 20:34:38 UTC (rev 6470)
@@ -6,7 +6,7 @@
xmlns:c="http://java.sun.com/jstl/core">
<h:form>
- <table width="100%" class="portlet-table-body">
+ <table width="100%">
<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/instances.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/instances.xhtml 2007-02-28 19:42:03 UTC (rev 6469)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/instances.xhtml 2007-02-28 20:34:38 UTC (rev 6470)
@@ -12,7 +12,7 @@
<h:form>
- <table id="instancesTable2" width="100%" class="portlet-table-body">
+ <table id="instancesTable2" width="100%">
<thead class="portlet-section-header">
<tr>
<th>Id</th>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/objectNavigation.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/objectNavigation.xhtml 2007-02-28 19:42:03 UTC (rev 6469)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/objectNavigation.xhtml 2007-02-28 20:34:38 UTC (rev 6470)
@@ -8,7 +8,7 @@
<h:form>
- <table width="100%" class="portlet-table-body">
+ <table width="100%">
<c:if test="#{not empty portalobjectmgr.portalNodes}">
<tbody class="portlet-section-header">
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 19:42:03 UTC (rev 6469)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/portlets.xhtml 2007-02-28 20:34:38 UTC (rev 6470)
@@ -22,7 +22,7 @@
</h:form>
<h:form>
- <table width="100%" class="portlet-table-body">
+ <table width="100%">
<thead class="portlet-section-header">
<tr>
<th>Id</th>
17 years, 2 months
JBoss Portal SVN: r6469 - trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/jackrabbit.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-02-28 14:42:03 -0500 (Wed, 28 Feb 2007)
New Revision: 6469
Modified:
trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/jackrabbit/JackrabbitJCRService.java
Log:
Debug level to log the jackrabbit configuration
Modified: trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/jackrabbit/JackrabbitJCRService.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/jackrabbit/JackrabbitJCRService.java 2007-02-28 19:29:48 UTC (rev 6468)
+++ trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/jackrabbit/JackrabbitJCRService.java 2007-02-28 19:42:03 UTC (rev 6469)
@@ -97,7 +97,7 @@
public void start() throws Exception
{
- log.info("JackRabbit configuration: " + config);
+ log.debug("JackRabbit configuration: " + config);
// Create repository
StringReader reader = new StringReader(config);
InputSource src = new InputSource(reader);
17 years, 2 months
JBoss Portal SVN: r6468 - trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-28 14:29:48 -0500 (Wed, 28 Feb 2007)
New Revision: 6468
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/objectNavigation.xhtml
Log:
better table usage for the different portal objects using several tbody sections
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/objectNavigation.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/objectNavigation.xhtml 2007-02-28 19:24:22 UTC (rev 6467)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/objectNavigation.xhtml 2007-02-28 19:29:48 UTC (rev 6468)
@@ -8,117 +8,115 @@
<h:form>
+ <table width="100%" class="portlet-table-body">
+
<c:if test="#{not empty portalobjectmgr.portalNodes}">
- <table width="100%" class="portlet-table-body">
- <thead class="portlet-section-header">
- <tr>
- <th>Portal</th>
- <th>Actions</th>
- </tr>
- </thead>
- <tbody>
- <c:forEach items="#{portalobjectmgr.portalNodes}" var="object" varStatus="status">
- <tr class="#{status.index % 2 == 0 ? 'portlet-section-body' : 'portlet-section-alternate'}">
- <td>
- <h:commandLink action="#{portalobjectmgr.selectObject}">
- <h:outputText value="#{object.name}"/>
+ <tbody class="portlet-section-header">
+ <tr>
+ <th>Portal</th>
+ <th>Actions</th>
+ </tr>
+ </tbody>
+ <tbody>
+ <c:forEach items="#{portalobjectmgr.portalNodes}" var="object" varStatus="status">
+ <tr class="#{status.index % 2 == 0 ? 'portlet-section-body' : 'portlet-section-alternate'}">
+ <td>
+ <h:commandLink action="#{portalobjectmgr.selectObject}">
+ <h:outputText value="#{object.name}"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink>
+ </td>
+ <td>
+ <h:commandLink action="editPortalPreferences" actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Edit"/>
<f:param name="id" value="#{object.id}"/>
- </h:commandLink>
- </td>
- <td>
- <h:commandLink action="editPortalPreferences" actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Edit"/>
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink> | <h:commandLink action="editPortalSecurity" actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Security"/>
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink> | <h:commandLink action="editPortalTheme" actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Theme"/>
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink> | <h:commandLink action="portals" actionListener="#{portalobjectmgr.destroyObject}">
- <h:outputText value="Destroy"/>
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink>
- </td>
- </tr>
- </c:forEach>
- </tbody>
- </table>
+ </h:commandLink> | <h:commandLink action="editPortalSecurity" actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Security"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink> | <h:commandLink action="editPortalTheme" actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Theme"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink> | <h:commandLink action="portals" actionListener="#{portalobjectmgr.destroyObject}">
+ <h:outputText value="Destroy"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink>
+ </td>
+ </tr>
+ </c:forEach>
+ </tbody>
</c:if>
<c:if test="#{not empty portalobjectmgr.pageNodes}">
- <table width="100%" class="portlet-table-body">
- <thead class="portlet-section-header">
- <tr>
- <th>Page</th>
- <th>Actions</th>
- </tr>
- </thead>
- <tbody>
- <c:forEach items="#{portalobjectmgr.pageNodes}" var="object" varStatus="status">
- <tr class="#{status.index % 2 == 0 ? 'portlet-section-body' : 'portlet-section-alternate'}">
- <td>
- <h:commandLink action="#{portalobjectmgr.selectObject}">
- <h:outputText value="#{object.name}"/>
+ <tbody class="portlet-section-header">
+ <tr>
+ <th>Page</th>
+ <th>Actions</th>
+ </tr>
+ </tbody>
+ <tbody>
+ <c:forEach items="#{portalobjectmgr.pageNodes}" var="object" varStatus="status">
+ <tr class="#{status.index % 2 == 0 ? 'portlet-section-body' : 'portlet-section-alternate'}">
+ <td>
+ <h:commandLink action="#{portalobjectmgr.selectObject}">
+ <h:outputText value="#{object.name}"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink>
+ </td>
+ <td>
+ <h:commandLink action="editPageLayout" actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Layout"/>
<f:param name="id" value="#{object.id}"/>
- </h:commandLink>
- </td>
- <td>
- <h:commandLink action="editPageLayout" actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Layout"/>
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink> | <h:commandLink action="editPageSecurity" actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Security"/>
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink> | <h:commandLink action="editPageTheme" actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Theme"/>
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink> | <h:commandLink action="pages" actionListener="#{portalobjectmgr.destroyObject}">
- <h:outputText value="Destroy"/>
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink>
- </td>
- </tr>
- </c:forEach>
- </tbody>
- </table>
+ </h:commandLink> | <h:commandLink action="editPageSecurity" actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Security"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink> | <h:commandLink action="editPageTheme" actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Theme"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink> | <h:commandLink action="pages" actionListener="#{portalobjectmgr.destroyObject}">
+ <h:outputText value="Destroy"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink>
+ </td>
+ </tr>
+ </c:forEach>
+ </tbody>
</c:if>
<c:if test="#{not empty portalobjectmgr.windowNodes}">
- <table width="100%" class="portlet-table-body">
- <thead class="portlet-section-header">
- <tr>
- <th>Window</th>
- <th>Actions</th>
- </tr>
- </thead>
- <tbody>
- <c:forEach items="#{portalobjectmgr.windowNodes}" var="object" varStatus="status">
- <tr class="#{status.index % 2 == 0 ? 'portlet-section-body' : 'portlet-section-alternate'}">
- <td>
- <h:commandLink action="#{portalobjectmgr.selectObject}">
- <h:outputText value="#{object.name}"/>
+ <tbody class="portlet-section-header">
+ <tr>
+ <th>Window</th>
+ <th>Actions</th>
+ </tr>
+ </tbody>
+ <tbody>
+ <c:forEach items="#{portalobjectmgr.windowNodes}" var="object" varStatus="status">
+ <tr class="#{status.index % 2 == 0 ? 'portlet-section-body' : 'portlet-section-alternate'}">
+ <td>
+ <h:commandLink action="#{portalobjectmgr.selectObject}">
+ <h:outputText value="#{object.name}"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink>
+ </td>
+ <td>
+ <h:commandLink action="editWindowPreferences" actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Edit"/>
<f:param name="id" value="#{object.id}"/>
- </h:commandLink>
- </td>
- <td>
- <h:commandLink action="editWindowPreferences" actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Edit"/>
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink> | <h:commandLink action="editWindowTheme" actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Theme"/>
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink> | <h:commandLink action="windows" actionListener="#{portalobjectmgr.destroyObject}">
- <h:outputText value="Destroy"/>
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink>
- </td>
- </tr>
- </c:forEach>
- </tbody>
- </table>
+ </h:commandLink> | <h:commandLink action="editWindowTheme" actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Theme"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink> | <h:commandLink action="windows" actionListener="#{portalobjectmgr.destroyObject}">
+ <h:outputText value="Destroy"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink>
+ </td>
+ </tr>
+ </c:forEach>
+ </tbody>
</c:if>
+ </table>
+
</h:form>
</div>
17 years, 2 months
JBoss Portal SVN: r6467 - in trunk/core-admin/src: resources/portal-admin-war/WEB-INF/jsp/management and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-28 14:24:22 -0500 (Wed, 28 Feb 2007)
New Revision: 6467
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/InstanceManagerBean.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/instances.xhtml
Log:
started to add instance pagination
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 16:16:20 UTC (rev 6466)
+++ trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/InstanceManagerBean.java 2007-02-28 19:24:22 UTC (rev 6467)
@@ -73,52 +73,40 @@
private InstanceContainer instanceContainer;
/** . */
- private String selectedId;
+ private AuthorizationDomainRegistry authorizationDomainRegistry;
/** . */
- private String selectedPlugin;
+ private RoleModule roleModule;
/** . */
- private AuthorizationDomainRegistry authorizationDomainRegistry;
+ private String selectedId;
/** . */
- private RoleModule roleModule;
+ private String selectedPlugin;
/** . */
- private PreferencesBean selectedPreferences;
+ private int selectedFrom;
/** . */
- private AbstractAuthorizationBean auth = new AuthorizationBean();
+ private PreferencesBean selectedPreferences;
/** . */
private Integer selectedRow;
/** . */
- private String sortColumn;
+ private AbstractAuthorizationBean auth = new AuthorizationBean();
- /** . */
- private boolean sortAscending;
- public String getSortColumn()
+ public int getSelectedFrom()
{
- return sortColumn;
+ return selectedFrom;
}
- public void setSortColumn(String sortColumn)
+ public void setSelectedFrom(int selectedFrom)
{
- this.sortColumn = sortColumn;
+ this.selectedFrom = selectedFrom;
}
- public boolean getSortAscending()
- {
- return sortAscending;
- }
-
- public void setSortAscending(boolean sortAscending)
- {
- this.sortAscending = sortAscending;
- }
-
public Integer getSelectedRow()
{
return selectedRow;
@@ -201,13 +189,6 @@
this.selectedPlugin = selectedPlugin;
}
- public void selectPlugin()
- {
- // Get id
- Map pmap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
- selectedPlugin = (String)pmap.get("plugin");
- }
-
public AbstractAuthorizationBean getAuth()
{
return auth;
@@ -216,25 +197,43 @@
/** Return an array of all instances known in this container. */
public Collection getInstances()
{
- List instances = new ArrayList();
- for (Iterator i = instanceContainer.getDefinitions().iterator(); i.hasNext();)
- {
- Instance instance = (Instance)i.next();
- instances.add(instance);
- }
+ List instances = new ArrayList(instanceContainer.getDefinitions());
- try
- {
- sortInstances(instances, sortColumn, sortAscending);
- }
- catch (Exception e)
- {
- log.warn("Error during sorting instances list");
- }
+// try
+// {
+// sortInstances(instances, sortColumn, sortAscending);
+// }
+// catch (Exception e)
+// {
+// log.warn("Error during sorting instances list");
+// }
- return instances;
+ //
+ int to = Math.min(selectedFrom + 5, instances.size());
+
+ //
+ return instances.subList(selectedFrom, to);
}
+ public int getInstanceCount()
+ {
+ return instanceContainer.getDefinitions().size();
+ }
+
+ public void selectFrom()
+ {
+ Map pmap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
+ selectedFrom = Integer.parseInt((String)pmap.get("from"));
+ selectedPlugin = null;
+ selectedId = null;
+ }
+
+ public void selectPlugin()
+ {
+ Map pmap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
+ selectedPlugin = (String)pmap.get("plugin");
+ }
+
public void selectInstance()
{
FacesContext ctx = FacesContext.getCurrentInstance();
@@ -247,26 +246,20 @@
public void deleteInstance()
{
- FacesContext ctx = FacesContext.getCurrentInstance();
- ExternalContext ectx = ctx.getExternalContext();
- Map params = ectx.getRequestParameterMap();
- String id = (String)params.get("id");
-
- if (id == null)
- {
- // Error
- }
-
try
{
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ ExternalContext ectx = ctx.getExternalContext();
+ Map params = ectx.getRequestParameterMap();
+ String id = (String)params.get("id");
+
+ //
instanceContainer.destroyDefinition(id);
//
- if (id.equals(selectedId))
- {
- selectedId = null;
- selectedPreferences = null;
- }
+ selectedId = null;
+ selectedPreferences = null;
+ selectedFrom = 0;
}
catch (NoSuchInstanceException e)
{
@@ -274,7 +267,7 @@
}
catch (PortletInvokerException e)
{
- e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ e.printStackTrace();
}
}
@@ -284,126 +277,119 @@
selectedPreferences = null;
//
- Instance selectedInstance = getSelectedInstance();
- if (selectedInstance != null)
+ if ("preferences".equals(selectedPlugin))
{
- PreferencesInfo prefsInfo = null;
- try
- {
- prefsInfo = selectedInstance.getPortlet().getInfo().getPreferences();
- }
- catch (PortletInvokerException e)
- {
- log.warn("Couldn't access portlet invoker associated to instance " + selectedInstance.getId()
- + ". This instance won't be refreshed.\nReason:\n\t" + e.getLocalizedMessage());
- }
+ Instance selectedInstance = getSelectedInstance();
- if (prefsInfo != null)
+ //
+ if (selectedInstance != null)
{
- RowSetModel model = new RowSetModel(null, prefsInfo.getKeys().size());
-
- //
- PropertyMap prefs;
try
{
- prefs = getSelectedInstance().getProperties();
- }
- catch (PortletInvokerException e)
- {
- throw new Error("Handle me gracefully please", e);
- }
+ PreferencesInfo prefsInfo = selectedInstance.getPortlet().getInfo().getPreferences();
+ if (prefsInfo != null)
+ {
+ RowSetModel model = new RowSetModel(null, prefsInfo.getKeys().size());
+ PropertyMap prefs = getSelectedInstance().getProperties();
- //
- int index = 0;
- for (Iterator i = prefsInfo.getKeys().iterator(); i.hasNext(); index++)
- {
- String key = (String)i.next();
+ //
+ int index = 0;
+ for (Iterator i = prefsInfo.getKeys().iterator(); i.hasNext(); index++)
+ {
+ String key = (String)i.next();
- // Get info for this key
-// PreferenceInfo info = prefsInfo.getPreference(key);
-// boolean readOnly = info.isReadOnly();
- boolean readOnly = false;
-// Value value = info.getValue();
+ // Get info for this key
+ // PreferenceInfo info = prefsInfo.getPreference(key);
+ // boolean readOnly = info.isReadOnly();
+ boolean readOnly = false;
+ // Value value = info.getValue();
- // Get value from the state
- Value value = prefs.getProperty(key);
+ // Get value from the state
+ Value value = prefs.getProperty(key);
- //
- Row row = model.getRow(index);
- row.setReadOnly(readOnly);
+ //
+ Row row = model.getRow(index);
+ row.setReadOnly(readOnly);
- //
- Cell cell = row.getCell();
- cell.setHandback("" + i);
- cell.setValue(value.asStringArray());
+ //
+ Cell cell = row.getCell();
+ cell.setHandback("" + i);
+ cell.setValue(value.asStringArray());
- //
- row.setHandback(key);
- row.setKey(key);
- row.setName("Description");
- row.setReadOnly(false);
- row.setValue(value.asStringArray());
- }
+ //
+ row.setHandback(key);
+ row.setKey(key);
+ row.setName("Description");
+ row.setReadOnly(false);
+ row.setValue(value.asStringArray());
+ }
- //
- selectedPreferences = new PreferencesBean(model);
+ //
+ selectedPreferences = new PreferencesBean(model);
- //
- if (selectedRow != null)
- {
- selectedPreferences.selectRow(selectedRow);
- }
- }
- }
- }
-
- public static void sortInstances(List instances, final String column, final boolean ascending)
- {
- Comparator comparator = new Comparator()
- {
- public int compare(Object o1, Object o2)
- {
- if (column == null)
- {
- return 0;
- }
- if (column.equals("id"))
- {
- Instance i1 = (Instance)((Object[])o1)[0];
- Instance i2 = (Instance)((Object[])o2)[0];
- return ascending ? i1.getId().compareToIgnoreCase(i2.getId()) : i2.getId()
- .compareToIgnoreCase(i1.getId());
- }
- if (column.equals("portlet"))
- {
- Portlet p1 = (Portlet)((Object[])o1)[1];
- Portlet p2 = (Portlet)((Object[])o2)[1];
-
- LocalizedString displayName = p1.getInfo().getMeta().getMetaValue(MetaInfo.DISPLAY_NAME);
- FacesContext ctx = FacesContext.getCurrentInstance();
- Locale locale = ctx.getExternalContext().getRequestLocale();
- String name1 = displayName.getString(locale, true);
- displayName = p2.getInfo().getMeta().getMetaValue(MetaInfo.DISPLAY_NAME);
- String name2 = displayName.getString(locale, true);
-
- if (name1 == null || name2 == null)
- {
- return 0;
+ //
+ if (selectedRow != null)
+ {
+ selectedPreferences.selectRow(selectedRow);
+ }
}
-
- return ascending ? name1.compareToIgnoreCase(name2) : name2
- .compareToIgnoreCase(name1);
}
-
- else
+ catch (PortletInvokerException e)
{
- return 0;
+ log.warn("Couldn't access portlet invoker associated to instance " + selectedInstance.getId()
+ + ". This instance won't be refreshed.\nReason:\n\t" + e.getLocalizedMessage());
}
}
- };
- Collections.sort(instances, comparator);
+ }
}
+// public static void sortInstances(List instances, final String column, final boolean ascending)
+// {
+// Comparator comparator = new Comparator()
+// {
+// public int compare(Object o1, Object o2)
+// {
+// if (column == null)
+// {
+// return 0;
+// }
+// if (column.equals("id"))
+// {
+// Instance i1 = (Instance)((Object[])o1)[0];
+// Instance i2 = (Instance)((Object[])o2)[0];
+// return ascending ? i1.getId().compareToIgnoreCase(i2.getId()) : i2.getId()
+// .compareToIgnoreCase(i1.getId());
+// }
+// if (column.equals("portlet"))
+// {
+// Portlet p1 = (Portlet)((Object[])o1)[1];
+// Portlet p2 = (Portlet)((Object[])o2)[1];
+//
+// LocalizedString displayName = p1.getInfo().getMeta().getMetaValue(MetaInfo.DISPLAY_NAME);
+// FacesContext ctx = FacesContext.getCurrentInstance();
+// Locale locale = ctx.getExternalContext().getRequestLocale();
+// String name1 = displayName.getString(locale, true);
+// displayName = p2.getInfo().getMeta().getMetaValue(MetaInfo.DISPLAY_NAME);
+// String name2 = displayName.getString(locale, true);
+//
+// if (name1 == null || name2 == null)
+// {
+// return 0;
+// }
+//
+// return ascending ? name1.compareToIgnoreCase(name2) : name2
+// .compareToIgnoreCase(name1);
+// }
+//
+// else
+// {
+// return 0;
+// }
+// }
+// };
+// Collections.sort(instances, comparator);
+// }
+
public class AuthorizationBean extends AbstractAuthorizationBean
{
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 16:16:20 UTC (rev 6466)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/instances.xhtml 2007-02-28 19:24:22 UTC (rev 6467)
@@ -47,6 +47,9 @@
</c:forEach>
</tbody>
</table>
+ <c:forEach begin="0" end="#{instancemgr.instanceCount}" step="5" var="index">
+ <h:commandLink action="#{instancemgr.selectFrom}"><f:param name="from" value="#{index}"/><h:outputText value="#{index}"/></h:commandLink>
+ </c:forEach>
</h:form>
17 years, 2 months