Author: wesleyhales
Date: 2008-08-08 16:09:19 -0400 (Fri, 08 Aug 2008)
New Revision: 11681
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/jsf/editCoordination.xhtml
Log:
coordination ui updates
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
17:27:04 UTC (rev 11680)
+++
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/CoordinationAction.java 2008-08-08
20:09:19 UTC (rev 11681)
@@ -37,6 +37,7 @@
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>
@@ -53,11 +54,11 @@
private Map<String, PortalObjectId> windows;
- private Collection<EventWiringInfo> eventWirings;
+ private Map<String, String> eventWirings;
- private Map<String, Collection<QName>> eventSources;
+ private Map<String, QName> eventSources;
- private Map<String, Collection<QName>> eventDestinations;
+ private Map<String, QName> eventDestinations;
private Map<String, String> aliasBindings;
@@ -110,40 +111,44 @@
this.pomb = pomb;
}
- public Collection<EventWiringInfo> getEventWirings()
+ public Map<String, String> getEventWirings()
{
+ if (eventWirings == null)
+ {
+ eventWirings = new HashMap<String, String>();
+ }
return eventWirings;
}
- public void setEventWirings(Collection<EventWiringInfo> eventWirings)
+ public void setEventWirings(Map<String, String> eventWirings)
{
this.eventWirings = eventWirings;
}
- public Map<String, Collection<QName>> getEventSources()
+ public Map<String, QName> getEventSources()
{
if (eventSources == null)
{
- eventSources = new HashMap<String, Collection<QName>>();
+ eventSources = new HashMap<String, QName>();
}
return eventSources;
}
- public void setEventSources(Map<String, Collection<QName>> eventSources)
+ public void setEventSources(Map<String, QName> eventSources)
{
this.eventSources = eventSources;
}
- public Map<String, Collection<QName>> getEventDestinations()
+ public Map<String, QName> getEventDestinations()
{
if (eventDestinations == null)
{
- eventDestinations = new HashMap<String, Collection<QName>>();
+ eventDestinations = new HashMap<String, QName>();
}
return eventDestinations;
}
- public void setEventDestinations(Map<String, Collection<QName>>
eventDestinations)
+ public void setEventDestinations(Map<String, QName> eventDestinations)
{
this.eventDestinations = eventDestinations;
}
@@ -185,9 +190,33 @@
try
{
- eventWirings =
pomb.getCoordinationService().getEventWirings((Page)selectedObject);
- //aliasbindings ready for ui
+ //eventwirings prep for ui
+ for (Object o :
pomb.getCoordinationService().getEventWirings((Page)selectedObject))
+ {
+ EventWiringInfo ewInfo = (EventWiringInfo)o;
+ getEventWirings().put(ewInfo.getName(),ewInfo.getName());
+
+ //prep sources
+ for (Object o1 : ewInfo.getSources().entrySet())
+ {
+ Map.Entry entry = (Map.Entry)o1;
+ Window paramName = (Window)entry.getKey();
+ QName paramValue = (QName)entry.getValue();
+ getEventSources().put(paramName.getName(), paramValue);
+ }
+
+ //prep destinations
+ for (Object o1 : ewInfo.getDestinations().entrySet())
+ {
+ Map.Entry entry = (Map.Entry)o1;
+ Window paramName = (Window)entry.getKey();
+ QName paramValue = (QName)entry.getValue();
+ getEventDestinations().put(paramName.getName(), paramValue);
+ }
+ }
+
+ //aliasbindings prep for ui
for (Object o :
pomb.getCoordinationService().getAliasBindings((Page)selectedObject))
{
AliasBindingInfo abInfo = (AliasBindingInfo)o;
@@ -195,34 +224,26 @@
{
getAliasBindings().put(name.getNamespaceURI(),
name.getNamespaceURI());
}
-
}
- //windowbindings ready for ui
+ //windowbindings prep for ui
for (Object o :
pomb.getCoordinationService().getWindowBindings((Page)selectedObject))
{
WindowBindingInfo wbInfo = (WindowBindingInfo)o;
getWindowBindings().putAll(wbInfo.getWindows());
-
}
- //System.out.println("-----------ew-" + eventWirings.size());
-
- //System.out.println("-----------ab-" + aliasBindings.size());
-
- //System.out.println("-----------wb-" + windowBindings.size());
-
for (PortalObject portalObject : selectedObject.getChildren())
{
if (portalObject.getType() == PortalObject.TYPE_WINDOW)
{
getWindows().put(portalObject.getName(), portalObject.getId());
- if (eventWirings.size() > 0)
- {
+ //if (eventWirings.size() > 0)
+ //{
//getEventSources().put(portalObject.getName(),pomb.getCoordinationService().getEventDestinationWirings((Window)portalObject));
//getEventDestinations().put(portalObject.getName(),pomb.getCoordinationService().getEventSourceWirings((Window)portalObject));
- }
+ //}
}
else
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
17:27:04 UTC (rev 11680)
+++
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editCoordination.xhtml 2008-08-08
20:09:19 UTC (rev 11681)
@@ -37,22 +37,34 @@
<hr/>
Event Wirings
+ <h:selectManyListbox size="5"
value="#{addDisplayNameAction.newLocale}">
+ <f:selectItems value="#{coordinationAction.eventWirings}"/>
+ </h:selectManyListbox>
+ <br/>
<ui:repeat var="eventWirings"
value="#{coordinationAction.eventWirings}">
#{eventWirings}
</ui:repeat>
<hr/>
- <f:subview rendered="#{not empty coordinationAction.eventWirings}"
id="events">
+
eventSources
+ <h:selectManyListbox size="5"
value="#{addDisplayNameAction.newLocale}">
+ <f:selectItems value="#{coordinationAction.eventSources}"/>
+ </h:selectManyListbox>
+ <br/>
<ui:repeat var="eventSources"
value="#{coordinationAction.eventSources}">
#{eventSources}
</ui:repeat>
<hr/>
eventDestinations
+ <h:selectManyListbox size="5"
value="#{addDisplayNameAction.newLocale}">
+ <f:selectItems value="#{coordinationAction.eventDestinations}"/>
+ </h:selectManyListbox>
+ <br/>
<ui:repeat var="eventDestinations"
value="#{coordinationAction.eventDestinations}">
#{eventDestinations}
</ui:repeat>
- </f:subview>
+
<ui:remove>
<h:selectOneMenu id="locales"
value="#{addDisplayNameAction.newLocale}">
Show replies by date