Author: julien(a)jboss.com
Date: 2007-06-14 20:05:08 -0400 (Thu, 14 Jun 2007)
New Revision: 7430
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objects.xhtml
trunk/faces/src/main/org/jboss/portal/faces/el/ClassConstantPublisherBean.java
Log:
- fix in ClassConstantPublisherBean config
- use ClassConstantPublisherBean for PortalObject constants used in the objects.xhtml
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-06-14
23:44:39 UTC (rev 7429)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-06-15
00:05:08 UTC (rev 7430)
@@ -268,9 +268,19 @@
<property-name>domainConfigurator</property-name>
<value>#{applicationScope.AuthorizationDomainRegistry.portalobject.configurator}</value>
</managed-property>
-
</managed-bean>
+ <!-- Constants -->
+ <managed-bean>
+ <managed-bean-name>PortalObject</managed-bean-name>
+
<managed-bean-class>org.jboss.portal.faces.el.ClassConstantPublisherBean</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>className</property-name>
+ <value>org.jboss.portal.core.model.portal.PortalObject</value>
+ </managed-property>
+ </managed-bean>
+
<navigation-rule>
<navigation-case>
<from-outcome>index</from-outcome>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objects.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objects.xhtml 2007-06-14
23:44:39 UTC (rev 7429)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objects.xhtml 2007-06-15
00:05:08 UTC (rev 7430)
@@ -5,16 +5,16 @@
xmlns:c="http://java.sun.com/jstl/core">
<c:choose>
- <c:when test="#{portalobjectmgr.selectedObject.type == 0}">
+ <c:when test="#{portalobjectmgr.selectedObject.type ==
PortalObject.TYPE_CONTEXT}">
<ui:include src="editContext.xhtml"/>
</c:when>
- <c:when test="#{portalobjectmgr.selectedObject.type == 1}">
+ <c:when test="#{portalobjectmgr.selectedObject.type ==
PortalObject.TYPE_PORTAL}">
<ui:include src="editPage.xhtml"/>
</c:when>
- <c:when test="#{portalobjectmgr.selectedObject.type == 2}">
+ <c:when test="#{portalobjectmgr.selectedObject.type ==
PortalObject.TYPE_PAGE}">
<ui:include src="editPage.xhtml"/>
</c:when>
- <c:when test="#{portalobjectmgr.selectedObject.type == 3}">
+ <c:when test="#{portalobjectmgr.selectedObject.type ==
PortalObject.TYPE_WINDOW}">
<ui:include src="editWindow.xhtml"/>
</c:when>
<c:otherwise>FIXME</c:otherwise>
Modified: trunk/faces/src/main/org/jboss/portal/faces/el/ClassConstantPublisherBean.java
===================================================================
---
trunk/faces/src/main/org/jboss/portal/faces/el/ClassConstantPublisherBean.java 2007-06-14
23:44:39 UTC (rev 7429)
+++
trunk/faces/src/main/org/jboss/portal/faces/el/ClassConstantPublisherBean.java 2007-06-15
00:05:08 UTC (rev 7430)
@@ -96,6 +96,12 @@
public Class getType(Object propertyName) throws IllegalArgumentException
{
+ if ("className".equals(propertyName))
+ {
+ return String.class;
+ }
+
+ //
Map entries = getEntries();
Object value = entries.get(propertyName);
return value != null ? value.getClass() : null;