Author: thomas.heute(a)jboss.com
Date: 2007-08-14 07:45:55 -0400 (Tue, 14 Aug 2007)
New Revision: 7917
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesBean.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editProperties.xhtml
Log:
JBPORTAL-1569: Adding window properties with names starting with one of the letters from
the range 'a-t' fails
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesBean.java
===================================================================
---
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesBean.java 2007-08-14
11:44:12 UTC (rev 7916)
+++
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesBean.java 2007-08-14
11:45:55 UTC (rev 7917)
@@ -25,6 +25,8 @@
import org.jboss.portal.core.model.portal.PortalObject;
import org.jboss.portal.core.admin.ui.actions.PropertyAction;
+import javax.faces.model.DataModel;
+import javax.faces.model.ListDataModel;
import javax.faces.model.SelectItem;
import javax.faces.context.FacesContext;
import javax.faces.el.VariableResolver;
@@ -118,9 +120,9 @@
selectedIndex = -1;
}
- public List getEntries()
+ public DataModel getEntries()
{
- return new ArrayList(entryMap.values());
+ return new ListDataModel(new ArrayList(entryMap.values()));
}
public int getSize()
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editProperties.xhtml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editProperties.xhtml 2007-08-14
11:44:12 UTC (rev 7916)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editProperties.xhtml 2007-08-14
11:45:55 UTC (rev 7917)
@@ -80,49 +80,38 @@
<h:form>
<!-- defines layout of property table -->
- <table width="100%">
- <thead class="portlet-section-header">
- <tr>
- <th>Name</th>
- <th>Description</th>
- <th>Inherited</th>
- <th>Value</th>
- <th>Delete</th>
- </tr>
- </thead>
- <tbody>
- <c:forEach items="#{properties.entries}"
var="prop" varStatus="status">
- <tr class="#{status.index % 2 == 0 ?
'portlet-section-body' : 'portlet-section-alternate'}">
- <td>
- <h:outputText title="#{prop.name}"
value="#{prop.displayName}"/>
- </td>
- <td>
+ <h:dataTable value="#{properties.entries}"
rowClasses="portlet-section-body, portlet-section-alternate"
var="prop">
+ <h:column>
+ <f:facet
name="header">Name</f:facet>
+ <h:outputText title="#{prop.type}"
value="#{prop.displayName}"/>
+ </h:column>
+ <h:column>
+ <f:facet
name="header">Description</f:facet>
<h:outputText>#{prop.description}</h:outputText>
- </td>
- <td>#{prop.inherited ? 'Yes' :
'No'}</td>
- <td>
- <c:choose>
- <c:when test="#{prop.type ==
'java.lang.Boolean'}">
- <h:selectBooleanCheckbox
value="#{prop.value}"
-
readonly="#{prop.readOnly}"/>
- </c:when>
- <c:otherwise>
- <h:inputText
styleClass="portlet-form-input-field" value="#{prop.value}"
-
readonly="#{prop.readOnly}"/>
- </c:otherwise>
- </c:choose>
- </td>
- <td>
+ </h:column>
+ <h:column>
+ <f:facet
name="header">Inherited</f:facet>
+ <h:outputText>#{prop.inherited ? 'Yes' :
'No'}</h:outputText>
+ </h:column>
+ <h:column>
+ <f:facet
name="header">Value</f:facet>
+ <h:selectBooleanCheckbox
value="#{prop.value}"
+
readonly="#{prop.readOnly}"
+ rendered="#{prop.type ==
'java.lang.Boolean'}"/>
+ <h:inputText
styleClass="portlet-form-input-field" value="#{prop.value}"
+ readonly="#{prop.readOnly}"
+ rendered="#{prop.type ==
'java.lang.String'}"/>
+ </h:column>
+ <h:column>
+ <f:facet
name="header">Delete</f:facet>
<h:commandLink
action="#{properties.action.removeProperty}"
rendered="#{!prop.inherited}">
<h:outputText value="Delete"/>
<f:param name="name"
value="#{prop.name}"/>
</h:commandLink>
- </td>
- </tr>
- </c:forEach>
- </tbody>
- </table>
+ </h:column>
+ </h:dataTable>
+
<!-- ends property list -->
<h:commandButton value="Update"
styleClass="portlet-form-button portlet-section-buttonrow"/></h:form>
Show replies by date