Author: chris.laprun(a)jboss.com
Date: 2008-08-10 16:04:17 -0400 (Sun, 10 Aug 2008)
New Revision: 11683
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/CoordinationAction.java
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource.properties
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editCoordination.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPage.xhtml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objectNavigation.xhtml
Log:
- Started coordination internalization.
- Some minor improvements to CoordinationAction code.
- Added coordination link at the top of page.
- display name action should use displayNamesAction CSS class (and needs icon).
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/CoordinationAction.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/CoordinationAction.java 2008-08-08
20:44:42 UTC (rev 11682)
+++
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/CoordinationAction.java 2008-08-10
20:04:17 UTC (rev 11683)
@@ -34,10 +34,8 @@
import javax.faces.event.ActionEvent;
import javax.xml.namespace.QName;
-import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
-import java.util.Iterator;
/**
* @author <a href="mailto:whales@redhat.com">Wesley Hales</a>
@@ -45,11 +43,6 @@
*/
public class CoordinationAction
{
-
- private PortalObjectId selectedObjectId;
-
- private PortalObject selectedObject;
-
private PortalObjectManagerBean pomb;
private Map<String, PortalObjectId> windows;
@@ -67,26 +60,14 @@
public PortalObjectId getSelectedObjectId()
{
- selectedObjectId = pomb.getSelectedPortalObjectId();
- return selectedObjectId;
+ return pomb.getSelectedPortalObjectId();
}
- public void setSelectedObjectId(PortalObjectId selectedObjectId)
- {
- this.selectedObjectId = selectedObjectId;
- }
-
public PortalObject getSelectedObject()
{
- selectedObject = pomb.getPortalObjectContainer().getObject(getSelectedObjectId());
- return selectedObject;
+ return pomb.getPortalObjectContainer().getObject(getSelectedObjectId());
}
- public void setSelectedObject(PortalObject selectedObject)
- {
- this.selectedObject = selectedObject;
- }
-
public Map<String, PortalObjectId> getWindows()
{
if (windows == null)
@@ -183,19 +164,21 @@
public String editCoordination(ActionEvent event) throws ConversionException
{
- getSelectedObject();
+ PortalObject portalObject = getSelectedObject();
- if (selectedObject.getType() == PortalObject.TYPE_PAGE)
+ if (portalObject.getType() == PortalObject.TYPE_PAGE)
{
+ Page page = (Page) portalObject;
+
try
{
//eventwirings prep for ui
- for (Object o :
pomb.getCoordinationService().getEventWirings((Page)selectedObject))
+ for (Object o : pomb.getCoordinationService().getEventWirings(page))
{
EventWiringInfo ewInfo = (EventWiringInfo)o;
- getEventWirings().put(ewInfo.getName(),ewInfo.getName());
+ getEventWirings().put(ewInfo.getName(), ewInfo.getName());
//prep sources
for (Object o1 : ewInfo.getSources().entrySet())
@@ -217,7 +200,7 @@
}
//aliasbindings prep for ui
- for (Object o :
pomb.getCoordinationService().getAliasBindings((Page)selectedObject))
+ for (Object o : pomb.getCoordinationService().getAliasBindings(page))
{
AliasBindingInfo abInfo = (AliasBindingInfo)o;
for (QName name : abInfo.getNames())
@@ -227,29 +210,21 @@
}
//windowbindings prep for ui
- for (Object o :
pomb.getCoordinationService().getWindowBindings((Page)selectedObject))
+ for (Object o : pomb.getCoordinationService().getWindowBindings(page))
{
WindowBindingInfo wbInfo = (WindowBindingInfo)o;
getWindowBindings().putAll(wbInfo.getWindows());
}
- for (PortalObject portalObject : selectedObject.getChildren())
+ // process only windows...
+ for (PortalObject windows : page.getChildren(PortalObject.WINDOW_MASK))
{
-
- if (portalObject.getType() == PortalObject.TYPE_WINDOW)
- {
- getWindows().put(portalObject.getName(), portalObject.getId());
- //if (eventWirings.size() > 0)
- //{
-
//getEventSources().put(portalObject.getName(),pomb.getCoordinationService().getEventDestinationWirings((Window)portalObject));
-
//getEventDestinations().put(portalObject.getName(),pomb.getCoordinationService().getEventSourceWirings((Window)portalObject));
- //}
-
- }
- else
- {
-
- }
+ getWindows().put(windows.getName(), windows.getId());
+ //if (eventWirings.size() > 0)
+ //{
+
//getEventSources().put(portalObject.getName(),pomb.getCoordinationService().getEventDestinationWirings((Window)portalObject));
+
//getEventDestinations().put(portalObject.getName(),pomb.getCoordinationService().getEventSourceWirings((Window)portalObject));
+ //}
}
}
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource.properties
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource.properties 2008-08-08
20:44:42 UTC (rev 11682)
+++
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource.properties 2008-08-10
20:04:17 UTC (rev 11683)
@@ -266,4 +266,16 @@
CONTROL_POLICY_PORTAL_RESOURCE_URI_NAME=On error redirect to this resource
CONTROL_POLICY_PORTAL_RESOURCE_URI_DESCRIPTION=On error redirect to this resource
-NO_BOUND_LISTENER=no bound listener
\ No newline at end of file
+NO_BOUND_LISTENER=no bound listener
+
+COORDINATION_COORDINATION=Coordination
+COORDINATION_PARAMETER_BINDINGS=Parameter bindings
+COORDINATION_CREATE_PARAMETER_BINDING=Create new parameter binding
+COORDINATION_PARAMETER_IMPLICIT_MODE=Parameter implicit mode
+
+COORDINATION_WINDOWS=Windows
+COORDINATION_ALIAS_BINDINGS=Alias bindings
+COORDINATION_WINDOW_BINDINGS=Window bindings
+
+COORDINATION_EVENT_WIRINGS=Event wirings
+COORDINATION_EVENT_IMPLICIT_MODE=Event implicit mode
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editCoordination.xhtml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editCoordination.xhtml 2008-08-08
20:44:42 UTC (rev 11682)
+++
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editCoordination.xhtml 2008-08-10
20:04:17 UTC (rev 11683)
@@ -1,4 +1,4 @@
-<ui:composition template="/jsf/objectTemplate.xhtml"
+<ui:composition template="objectTemplate.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
@@ -6,17 +6,16 @@
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
xmlns:pfc="http://www.jboss.com/portal/facelet/common"
xmlns:c="http://java.sun.com/jstl/core">
+ <ui:param name="portalObjectScreen"
value="#{bundle.COORDINATION_COORDINATION}"/>
<ui:define name="content">
-
- <f:loadBundle basename="Resource" var="bundle"/>
<div class="tenpx-top-bottom">
- <h2
class="portlet-area-header">#{coordinationAction.selectedObject.name}
Parameter Coordination</h2>
- <h3 class="sectionTitle tenpx-top-bottom">Create New Parameter
Bindings</h3>
- Parameter Implicit Mode
#{coordinationAction.selectedObject.properties['coordination.parameter.implicit_mode']}
+ <h2
class="portlet-area-header">#{coordinationAction.selectedObject.name}
#{bundle.COORDINATION_PARAMETER_BINDINGS}</h2>
+ <h3 class="sectionTitle
tenpx-top-bottom">#{bundle.COORDINATION_CREATE_PARAMETER_BINDING}</h3>
+ #{bundle.COORDINATION_PARAMETER_IMPLICIT_MODE}
#{coordinationAction.selectedObject.properties['coordination.parameter.implicit_mode']}
<hr/>
- Event Implicit Mode
#{coordinationAction.selectedObject.properties['coordination.event.implicit_mode']}
+ #{bundle.COORDINATION_EVENT_IMPLICIT_MODE}
#{coordinationAction.selectedObject.properties['coordination.event.implicit_mode']}
<hr/>
- Windows
+ #{bundle.COORDINATION_WINDOWS}
<h:selectManyListbox size="5"
value="#{addDisplayNameAction.newLocale}">
<f:selectItems value="#{coordinationAction.windows}"/>
</h:selectManyListbox>
@@ -24,21 +23,21 @@
<hr/>
- Alias Bindings
+ #{bundle.COORDINATION_ALIAS_BINDINGS}
<h:selectManyListbox size="5"
value="#{addDisplayNameAction.newLocale}">
<f:selectItems value="#{coordinationAction.aliasBindings}"/>
</h:selectManyListbox>
<br/>
<hr/>
- Window Bindings
+ #{bundle.COORDINATION_WINDOW_BINDINGS}
<h:selectManyListbox size="5"
value="#{addDisplayNameAction.newLocale}">
<f:selectItems value="#{coordinationAction.windowBindings}"/>
</h:selectManyListbox>
<h3 class="portlet-section-title
tenpx-top-bottom">#{coordinationAction.selectedObject.name} Event
Coordination</h3>
- Event Wirings
+ #{bundle.COORDINATION_EVENT_WIRINGS}
<h:selectManyListbox size="5"
value="#{addDisplayNameAction.newLocale}">
<f:selectItems value="#{coordinationAction.eventWirings}"/>
</h:selectManyListbox>
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPage.xhtml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPage.xhtml 2008-08-08
20:44:42 UTC (rev 11682)
+++
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editPage.xhtml 2008-08-10
20:04:17 UTC (rev 11683)
@@ -37,10 +37,18 @@
#{bundle.RENAME}
</h:commandLink></h:panelGroup>
| <h:commandLink
- action="#{addDisplayNameAction.editDisplayNames}"
actionListener="#{portalobjectmgr.selectObject}"
styleClass="actionRename">
+ action="#{addDisplayNameAction.editDisplayNames}"
actionListener="#{portalobjectmgr.selectObject}"
styleClass="actionDisplayNames">
<f:param name="id"
value="#{portalobjectmgr.selectedObject.id}" />
#{bundle.DISPLAY_NAMES}
</h:commandLink>
+ <h:panelGroup rendered="#{'page' eq
portalobjectmgr.selectedObjectType}">
+ | <h:commandLink action="editCoordination"
+
actionListener="#{coordinationAction.editCoordination}"
+ styleClass="actionCoordination">
+ <f:param name="id"
value="#{portalobjectmgr.selectedObject.id}" />
+ #{bundle.COORDINATION_COORDINATION}
+ </h:commandLink>
+ </h:panelGroup>
<h:panelGroup
rendered="#{!((portalobjectmgr.selectedObject.type ==
PortalObject.TYPE_PORTAL) and ((portalobjectmgr.selectedObject.name == 'admin') or
(portalobjectmgr.selectedObject.name == 'template') or
(portalobjectmgr.selectedObject.default)))}">
| <h:commandLink action="confirm"
styleClass="actionDelete"
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objectNavigation.xhtml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objectNavigation.xhtml 2008-08-08
20:44:42 UTC (rev 11682)
+++
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/objectNavigation.xhtml 2008-08-10
20:04:17 UTC (rev 11683)
@@ -106,14 +106,14 @@
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{object.id}"/>
#{bundle.RENAME}
- </h:commandLink> | <h:commandLink
action="#{addDisplayNameAction.editDisplayNames}"
styleClass="actionRename"
+ </h:commandLink> | <h:commandLink
action="#{addDisplayNameAction.editDisplayNames}"
styleClass="actionDisplayNames"
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{object.id}"/>
#{bundle.DISPLAY_NAMES}
</h:commandLink> | <h:commandLink action="editCoordination"
styleClass="actionCoordination"
actionListener="#{coordinationAction.editCoordination}">
<f:param name="id" value="#{object.id}"/>
- Coordination
+ #{bundle.COORDINATION_COORDINATION}
</h:commandLink>
<h:panelGroup
rendered="#{not object.default}"> | <h:commandLink
action="confirm" styleClass="actionDelete"