Author: chris.laprun(a)jboss.com
Date: 2007-08-28 17:30:18 -0400 (Tue, 28 Aug 2007)
New Revision: 8074
Modified:
branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml
Log:
- JBPORTAL-1644: Use dataTable instead of forEach to solve the randomness issue (thanks,
Thomas!).
Modified:
branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-08-28
20:53:19 UTC (rev 8073)
+++
branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-08-28
21:30:18 UTC (rev 8074)
@@ -416,11 +416,6 @@
throw new IllegalArgumentException("Invalid object type to set as
default");
}
- // select the object for now as trying to re-display the page results in
apparently random behavior
- // i.e. id parameter don't correspond to what they should be based on the
clicked link
- // comment the next line to try it out for yourself...
- selectObject(poid);
-
PortalObject parent = object.getParent();
if (parent != null)
{
@@ -429,7 +424,7 @@
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO,
"Success",
- "'" + name + "'" + typeName + " was
successfully set as default " + typeName);
+ "'" + name + "' " + typeName + " was
successfully set as default " + typeName);
FacesContext.getCurrentInstance().addMessage("status", message);
}
}
Modified:
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml 2007-08-28
20:53:19 UTC (rev 8073)
+++
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml 2007-08-28
21:30:18 UTC (rev 8074)
@@ -8,152 +8,131 @@
<h:form>
-<table width="100%">
-
<c:if test="#{not empty portalobjectmgr.selectedObject.portals}">
- <thead class="portlet-section-header">
- <tr>
- <th>Portal</th>
- <th>Actions</th>
- </tr>
- </thead>
- <tbody>
- <c:forEach items="#{portalobjectmgr.selectedObject.portals}"
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="editPortalSecurity"
actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Security"/>
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink> | <h:commandLink
action="editProperties"
-
actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Properties"/>
- <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:panelGroup
- rendered="#{(object.name != 'admin') and (object.name !=
'template') and (object.name != 'default')}">
- | <h:commandLink action="renameObject"
actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Rename"/>
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink>
- </h:panelGroup> | <h:commandLink action="confirm"
actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Delete"/>
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink>
- <c:choose>
- <c:when test="#{not object.default}"> |
<h:commandLink action="#{portalobjectmgr.makeObjectDefault}">
- <h:outputText value="Make Default"/>
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink>
- </c:when>
- <c:otherwise> | <h:outputText value="Default"/>
- </c:otherwise>
- </c:choose>
- </td>
- </tr>
- </c:forEach>
- </tbody>
+ <h:dataTable var="object"
value="#{portalobjectmgr.selectedObject.portals}"
+ rowClasses="portlet-section-body,portlet-section-alternate"
headerClass="portlet-section-header">
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Portal"/>
+ </f:facet>
+ <h:commandLink action="#{portalobjectmgr.selectObject}">
+ <h:outputText value="#{object.name}"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink>
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Actions"/>
+ </f:facet>
+ <h:commandLink action="editPortalSecurity"
actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Security"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink> | <h:commandLink action="editProperties"
actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Properties"/>
+ <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:panelGroup
+ rendered="#{(object.name != 'admin') and (object.name !=
'template') and (object.name != 'default')}">
+ | <h:commandLink action="renameObject"
actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Rename"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink>
+ </h:panelGroup> | <h:commandLink action="confirm"
actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Delete"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink>
+ <h:panelGroup rendered="#{not object.default}"> |
<h:commandLink action="#{portalobjectmgr.makeObjectDefault}">
+ <h:outputText value="Make Default"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink>
+ </h:panelGroup>
+ <h:panelGroup rendered="#{object.default}"> | <h:outputText
value="Default"/></h:panelGroup>
+ </h:column>
+ </h:dataTable>
</c:if>
<c:if test="#{not empty portalobjectmgr.selectedObject.pages}">
- <thead class="portlet-section-header">
- <tr>
- <th>Page</th>
- <th>Actions</th>
- </tr>
- </thead>
- <tbody>
- <c:forEach items="#{portalobjectmgr.selectedObject.pages}"
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="Page 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="editProperties"
actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Properties"/>
- <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="renameObject"
actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Rename"/>
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink> | <h:commandLink action="confirm"
actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Delete"/>
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink>
- <c:choose>
- <c:when test="#{not object.default}"> |
<h:commandLink action="#{portalobjectmgr.makeObjectDefault}">
- <h:outputText value="Make Default"/>
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink>
- </c:when>
- <c:otherwise> | <h:outputText value="Default"/>
- </c:otherwise>
- </c:choose>
- </td>
- </tr>
- </c:forEach>
- </tbody>
+ <h:dataTable var="object"
value="#{portalobjectmgr.selectedObject.pages}"
+ rowClasses="portlet-section-body,portlet-section-alternate"
headerClass="portlet-section-header">
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Page"/>
+ </f:facet>
+ <h:commandLink action="#{portalobjectmgr.selectObject}">
+ <h:outputText value="#{object.name}"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink>
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Actions"/>
+ </f:facet>
+ <h:commandLink action="editPageLayout"
actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Page 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="editProperties"
actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Properties"/>
+ <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="renameObject"
actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Rename"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink> | <h:commandLink action="confirm"
actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Delete"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink>
+ <h:panelGroup rendered="#{not object.default}"> |
<h:commandLink action="#{portalobjectmgr.makeObjectDefault}">
+ <h:outputText value="Make Default"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink>
+ </h:panelGroup>
+ <h:panelGroup rendered="#{object.default}"> | <h:outputText
value="Default"/></h:panelGroup>
+ </h:column>
+ </h:dataTable>
</c:if>
<c:if test="#{not empty portalobjectmgr.selectedObject.windows}">
- <thead class="portlet-section-header">
- <tr>
- <th>Window</th>
- <th>Actions</th>
- </tr>
- </thead>
- <tbody>
- <c:forEach items="#{portalobjectmgr.selectedObject.windows}"
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="editWindowTheme"
actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Theme"/>
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink> | <h:commandLink
action="editProperties"
-
actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Properties"/>
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink> | <h:commandLink action="renameObject"
actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Rename"/>
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink> | <h:commandLink action="confirm"
actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Delete"/>
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink>
- </td>
- </tr>
- </c:forEach>
- </tbody>
+ <h:dataTable var="object"
value="#{portalobjectmgr.selectedObject.windows}"
+ rowClasses="portlet-section-body,portlet-section-alternate"
headerClass="portlet-section-header">
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Window"/>
+ </f:facet>
+ <h:commandLink action="#{portalobjectmgr.selectObject}">
+ <h:outputText value="#{object.name}"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink>
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Actions"/>
+ </f:facet>
+ <h:commandLink action="editWindowTheme"
actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Theme"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink> | <h:commandLink action="editProperties"
+
actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Properties"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink> | <h:commandLink action="renameObject"
actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Rename"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink> | <h:commandLink action="confirm"
actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Delete"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink>
+ </h:column>
+ </h:dataTable>
</c:if>
-
-</table>
-
</h:form>
</div>
Show replies by date