Author: chris.laprun(a)jboss.com
Date: 2008-08-26 12:14:49 -0400 (Tue, 26 Aug 2008)
New Revision: 11740
Added:
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/confirmDeleteCoordination.xhtml
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/WEB-INF/faces-config.xml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editCoordination.xhtml
Log:
- Properly reset structures each time editCoordination is called.
- Ask for confirmation before deleting wiring. Basis for generic handling of deletion
confirmation of Coordination objects.
- Select only one event.
- Clean-ups.
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-26
16:08:32 UTC (rev 11739)
+++
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/CoordinationAction.java 2008-08-26
16:14:49 UTC (rev 11740)
@@ -48,6 +48,7 @@
import javax.faces.event.ValueChangeEvent;
import javax.faces.model.SelectItem;
import javax.xml.namespace.QName;
+import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -57,7 +58,9 @@
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
+import java.util.ResourceBundle;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
@@ -85,24 +88,29 @@
private String stringStub;
- private PortalObject selectedObject;
+ private Page selectedPage;
private PortalObjectId selectedObjectId;
private String windowBindingName;
- private Map<String, EventWiringInfo> eventWirings;
private Map<String, DisplayEventWiring> displayEventWirings;
-
private Map<QNameSelectItem, SortedSet<WindowSelectItem>>
eventNameToWindowSources;
private Map<QNameSelectItem, SortedSet<WindowSelectItem>>
eventNameToWindowDestinations;
- private List<String> selectedSourceEvents;
+ private String selectedSourceEvent;
private List<String> selectedSourceWindows;
- private List<String> selectedDestinationEvents;
+ private String selectedDestinationEvent;
private List<String> selectedDestinationWindows;
private EventWiringInfoCreator currentWiring;
+ private String selectedForDeletionName;
+ private String selectedForDeletionType;
+ private static final String RESOURCE_NAME = "Resource";
+ private static final String COORDINATION_UNKNOWN = "COORDINATION_UNKNOWN";
+ private static final String COORDINATION_WIRING = "COORDINATION_WIRING";
+ private static final String COORDINATION_PARAMETER =
"COORDINATION_PARAMETER";
+
public PortalObjectId getSelectedObjectId()
{
//since this backing bean is in session, always check for new object request
@@ -123,19 +131,21 @@
this.selectedObjectId = selectedObjectId;
}
- public PortalObject getSelectedObject()
+ public Page getSelectedPage()
{
- selectedObject = pomb.getPortalObjectContainer().getObject(getSelectedObjectId());
+ PortalObject portalObject =
pomb.getPortalObjectContainer().getObject(getSelectedObjectId());
+ if (portalObject.getType() != PortalObject.TYPE_PAGE)
+ {
+ throw new IllegalArgumentException("Coordination can only be dealt with at
the page level!");
+ }
+
+ selectedPage = (Page) portalObject;
+
//perform surgery on portalobjectmanager
-
pomb.selectObject(pomb.getPortalObjectContainer().getObject(selectedObject.getId()));
- return selectedObject;
+
pomb.selectObject(pomb.getPortalObjectContainer().getObject(selectedPage.getId()));
+ return selectedPage;
}
- public void setSelectedObject(PortalObject selectedObject)
- {
- this.selectedObject = selectedObject;
- }
-
public Map<String, String> getWindows()
{
return windows;
@@ -232,33 +242,32 @@
public String editCoordination() throws ConversionException
{
- PortalObject portalObject = getSelectedObject();
- if (portalObject.getType() == PortalObject.TYPE_PAGE)
+ Page page = getSelectedPage();
+ try
{
+ loadEventWirings(page);
+ loadWindowBindings(page);
- Page page = (Page)portalObject;
-
- try
+ //aliasbindings prep for ui
+ for (AliasBindingInfo abInfo :
pomb.getCoordinationService().getAliasBindings(page))
{
- loadEventWirings();
- loadWindowBindings();
-
- //aliasbindings prep for ui
- for (AliasBindingInfo abInfo :
pomb.getCoordinationService().getAliasBindings(page))
+ for (QName name : abInfo.getNames())
{
- for (QName name : abInfo.getNames())
- {
- getAliasBindings().put(name.getNamespaceURI(),
name.getNamespaceURI());
- }
+ getAliasBindings().put(name.getNamespaceURI(), name.getNamespaceURI());
}
+ }
- // Extract metadata only on window children
+ // Extract metadata only on window children
+ Collection<PortalObject> children =
page.getChildren(PortalObject.WINDOW_MASK);
+ if (!children.isEmpty())
+ {
availableRenderParameters = new LinkedHashMap<String, String>();
- windows = new LinkedHashMap<String, String>();
- for (PortalObject po : page.getChildren(PortalObject.WINDOW_MASK))
+ this.windows = new LinkedHashMap<String, String>(children.size());
+
+ for (PortalObject po : children)
{
Window window = (Window)po;
- windows.put(window.getName(),
window.getId().toString(PortalObjectPath.LEGACY_BASE64_FORMAT));
+ this.windows.put(window.getName(),
window.getId().toString(PortalObjectPath.LEGACY_BASE64_FORMAT));
if (ContentType.PORTLET.equals(window.getContentType()))
{
PortletContent pc = (PortletContent)window.getContent();
@@ -278,14 +287,14 @@
eventNameToWindowDestinations = addEventInfoFor(window,
eventingInfo.getConsumedEvents(), eventNameToWindowDestinations);
}
}
+ }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
}
-
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+
return "editCoordination";
}
@@ -345,78 +354,63 @@
// Event Wirings methods
- private void loadEventWirings()
+ private void loadEventWirings(Page page)
{
- PortalObject portalObject = getSelectedObject();
- if (portalObject.getType() == PortalObject.TYPE_PAGE)
+ Collection<EventWiringInfo> wiringInfos =
pomb.getCoordinationService().getEventWirings(page);
+ if (!wiringInfos.isEmpty())
{
- Page page = (Page)portalObject;
- Collection<EventWiringInfo> wiringInfos =
pomb.getCoordinationService().getEventWirings(page);
- if (!wiringInfos.isEmpty())
+ displayEventWirings = new HashMap<String,
DisplayEventWiring>(wiringInfos.size());
+ for (EventWiringInfo ewInfo : wiringInfos)
{
- if (eventWirings == null)
- {
- eventWirings = new HashMap<String,
EventWiringInfo>(wiringInfos.size());
- }
-
- if (displayEventWirings == null)
- {
- displayEventWirings = new HashMap<String, DisplayEventWiring>();
- }
-
- for (EventWiringInfo ewInfo : wiringInfos)
- {
- eventWirings.put(ewInfo.getName(), ewInfo);
- displayEventWirings.put(ewInfo.getName(), new
DisplayEventWiring(ewInfo));
- }
+ displayEventWirings.put(ewInfo.getName(), new DisplayEventWiring(ewInfo));
}
}
+ else
+ {
+ displayEventWirings = Collections.emptyMap();
+ }
}
public boolean isExplicitEventsUsed()
{
- PortalObject portalObject = getSelectedObject();
boolean enabled = false;
- if (portalObject.getType() == PortalObject.TYPE_PAGE)
+ Page page = getSelectedPage();
+ if (pomb.getCoordinationService().isEventWiringImplicitModeEnabled(page) != null)
{
- Page page = (Page)portalObject;
- if (pomb.getCoordinationService().isEventWiringImplicitModeEnabled(page) !=
null)
- {
- enabled =
pomb.getCoordinationService().isEventWiringImplicitModeEnabled(page);
- }
-
+ enabled =
!pomb.getCoordinationService().isEventWiringImplicitModeEnabled(page);
}
return enabled;
}
- /**
- * Listener for explicit event checkbox
- *
- * @param event
- * @throws org.jboss.portal.core.controller.coordination.IllegalCoordinationException
- *
- */
- public void explicitEventsListener(ValueChangeEvent event) throws
IllegalCoordinationException
+ public void setExplicitEventsUsed(boolean usingExplicitEvents)
{
- PortalObject portalObject = getSelectedObject();
- String newValue = event.getNewValue().toString();
- if (portalObject.getType() == PortalObject.TYPE_PAGE)
+ try
{
- Page page = (Page)portalObject;
- pomb.getCoordinationService().setEventWiringImplicitMode(page,
Boolean.parseBoolean(newValue));
+ pomb.getCoordinationService().setEventWiringImplicitMode(getSelectedPage(),
usingExplicitEvents);
}
+ catch (IllegalCoordinationException e)
+ {
+ e.printStackTrace(); //To change body of catch statement use File | Settings |
File Templates.
+ }
}
+ public void selectSourceEvent(ValueChangeEvent event)
+ {
+ System.out.println("selectSourceEvent");
+ System.out.println("old value = " + event.getOldValue());
+ System.out.println("new value = " + event.getNewValue());
+ }
+
public void selectSourceWindows(ValueChangeEvent event)
{
- System.out.println("selectWindows");
+ System.out.println("selectSourceWindows");
System.out.println("old value = " + event.getOldValue());
System.out.println("new value = " + event.getNewValue());
}
- public void selectDestinationEvents(ValueChangeEvent event)
+ public void selectDestinationEvent(ValueChangeEvent event)
{
- System.out.println("selectDestinationEvents");
+ System.out.println("selectDestinationEvent");
System.out.println("old value = " + event.getOldValue());
System.out.println("new value = " + event.getNewValue());
}
@@ -453,7 +447,7 @@
public List<QNameSelectItem> getDestinationEvents()
{
// at this point, we have the sources selected, populate new wiring
- Map<Window, QName> sources = getMappingForWiring(selectedSourceWindows,
selectedSourceEvents);
+ Map<Window, QName> sources = getMappingForWiring(selectedSourceWindows,
selectedSourceEvent);
currentWiring.setSources(sources);
return getPossibleEvents(eventNameToWindowDestinations);
@@ -476,14 +470,14 @@
* Format selected information into something that can be used to construct a new
event wiring.
*
* @param selectedWindows
- * @param selectedEvents
+ * @param selectedEvent
* @return
*/
- private Map<Window, QName> getMappingForWiring(List<String>
selectedWindows, List<String> selectedEvents)
+ private Map<Window, QName> getMappingForWiring(List<String>
selectedWindows, String selectedEvent)
{
if (selectedWindows != null)
{
- if (selectedObject == null)
+ if (selectedPage == null)
{
throw new IllegalStateException("A page should have been
selected!");
}
@@ -491,8 +485,8 @@
Map<Window, QName> windowQNameMap = new HashMap<Window,
QName>(selectedWindows.size());
for (String windowName : selectedWindows)
{
- Window window = (Window)selectedObject.getChild(windowName);
- windowQNameMap.put(window, QName.valueOf(selectedEvents.get(0)));
+ Window window = (Window)selectedPage.getChild(windowName);
+ windowQNameMap.put(window, QName.valueOf(selectedEvent));
}
return windowQNameMap;
@@ -503,29 +497,25 @@
public List<WindowSelectItem> getSourceWindows()
{
- return getPossibleWindows(eventNameToWindowSources, selectedSourceEvents);
+ return getPossibleWindows(eventNameToWindowSources, selectedSourceEvent);
}
public List<WindowSelectItem> getDestinationWindows()
{
- return getPossibleWindows(eventNameToWindowDestinations,
selectedDestinationEvents);
+ return getPossibleWindows(eventNameToWindowDestinations,
selectedDestinationEvent);
}
- private List<WindowSelectItem> getPossibleWindows(Map<QNameSelectItem,
SortedSet<WindowSelectItem>> eventNameToWindows, List<String>
selectedEventNames)
+ private List<WindowSelectItem> getPossibleWindows(Map<QNameSelectItem,
SortedSet<WindowSelectItem>> eventNameToWindows, String selectedEventName)
{
if (eventNameToWindows == null)
{
return Collections.emptyList();
}
- if (selectedEventNames != null)
+ if (selectedEventName != null)
{
List<WindowSelectItem> result = new LinkedList<WindowSelectItem>();
- for (String qNameAsString : selectedEventNames)
- {
- result.addAll(eventNameToWindows.get(new
QNameSelectItem(QName.valueOf(qNameAsString))));
- }
-
+ result.addAll(eventNameToWindows.get(new
QNameSelectItem(QName.valueOf(selectedEventName))));
Collections.sort(result);
return result;
}
@@ -533,14 +523,14 @@
return Collections.emptyList();
}
- public List<String> getSelectedSourceEvents()
+ public String getSelectedSourceEvent()
{
- return selectedSourceEvents;
+ return selectedSourceEvent;
}
- public void setSelectedSourceEvents(List<String> selectedSourceEvents)
+ public void setSelectedSourceEvent(String selectedSourceEvent)
{
- this.selectedSourceEvents = selectedSourceEvents;
+ this.selectedSourceEvent = selectedSourceEvent;
}
public List<String> getSelectedSourceWindows()
@@ -553,14 +543,14 @@
this.selectedSourceWindows = selectedSourceWindows;
}
- public List<String> getSelectedDestinationEvents()
+ public String getSelectedDestinationEvent()
{
- return selectedDestinationEvents;
+ return selectedDestinationEvent;
}
- public void setSelectedDestinationEvents(List<String>
selectedDestinationEvents)
+ public void setSelectedDestinationEvent(String selectedDestinationEvent)
{
- this.selectedDestinationEvents = selectedDestinationEvents;
+ this.selectedDestinationEvent = selectedDestinationEvent;
}
public List<String> getSelectedDestinationWindows()
@@ -590,7 +580,7 @@
currentWiring.setName(eventWiringName);
// we also now have the information to build the destinations
- Map<Window, QName> destinations =
getMappingForWiring(selectedDestinationWindows, selectedDestinationEvents);
+ Map<Window, QName> destinations =
getMappingForWiring(selectedDestinationWindows, selectedDestinationEvent);
currentWiring.setDestinations(destinations);
}
}
@@ -614,51 +604,89 @@
public String cancelWiring()
{
currentWiring = null;
- selectedSourceEvents = null;
+ selectedSourceEvent = null;
selectedSourceWindows = null;
- selectedDestinationEvents = null;
+ selectedDestinationEvent = null;
selectedDestinationWindows = null;
return null;
}
- public String deleteWiring()
+ public String getSelectedForDeletionName()
{
- String wiring = getFacesParam("wiring");
- EventWiringInfo event = eventWirings.get(wiring);
- try
+ return selectedForDeletionName;
+ }
+
+ public String getSelectedForDeletionType()
+ {
+ Locale locale =
FacesContext.getCurrentInstance().getExternalContext().getRequestLocale();
+ ResourceBundle rb = ResourceBundle.getBundle(RESOURCE_NAME, locale);
+ String localizationKey = COORDINATION_UNKNOWN;
+ if ("wiring".equals(selectedForDeletionType))
{
- pomb.getCoordinationService().removeEventWiring(event);
- displayEventWirings.remove(wiring);
+ localizationKey = COORDINATION_WIRING;
}
- catch (IllegalCoordinationException e)
+ else if ("parameter".equals(selectedForDeletionType))
{
- e.printStackTrace(); //To change body of catch statement use File | Settings |
File Templates.
+ localizationKey = COORDINATION_PARAMETER;
}
+ return MessageFormat.format(rb.getString(localizationKey), null);
+ }
+
+ public void selectWiringForDeletion(ActionEvent event)
+ {
+ selectedForDeletionName = getFacesParam("wiring");
+ selectedForDeletionType = getFacesParam("type");
+ }
+
+ public String deleteWiring(ActionEvent actionEvent)
+ {
+ DisplayEventWiring displayEvent =
displayEventWirings.get(selectedForDeletionName);
+
+ if (displayEvent != null)
+ {
+ EventWiringInfo event = displayEvent.getEventInfo();
+ try
+ {
+ pomb.getCoordinationService().removeEventWiring(event);
+ displayEventWirings.remove(selectedForDeletionName);
+ }
+ catch (IllegalCoordinationException e)
+ {
+ e.printStackTrace(); //To change body of catch statement use File | Settings
| File Templates.
+ }
+
+ // reset selected values
+ selectedForDeletionName = null;
+ selectedForDeletionType = null;
+ }
return null;
}
public String renameWiring()
{
String wiring = getFacesParam("wiring");
- EventWiringInfo event = eventWirings.get(wiring);
- //todo: implement, rename operation should be on CoordinationConfigurator
+ DisplayEventWiring displayEvent = displayEventWirings.get(wiring);
+ if (displayEvent != null)
+ {
+ //todo: implement, rename operation should be on CoordinationConfigurator
+ }
throw new NotYetImplemented("renameWiring not yet implemented!");
}
public static class DisplayEventWiring implements Comparable
{
- private String name;
private Set<Window> sourceWindows;
private Set<QName> sourceEvents;
private Set<Window> destinationWindows;
private Set<QName> destinationEvents;
+ private EventWiringInfo eventInfo;
DisplayEventWiring(EventWiringInfo eventInfo)
{
- name = eventInfo.getName();
+ this.eventInfo = eventInfo;
Map<Window, QName> sources = eventInfo.getSources();
sourceWindows = new HashSet<Window>(sources.keySet());
@@ -669,9 +697,14 @@
destinationEvents = new HashSet<QName>(destinations.values());
}
+ public EventWiringInfo getEventInfo()
+ {
+ return eventInfo;
+ }
+
public String getName()
{
- return name;
+ return eventInfo.getName();
}
public Set<Window> getSourceWindows()
@@ -697,7 +730,7 @@
public int compareTo(Object o)
{
DisplayEventWiring other = (DisplayEventWiring)o;
- return name.compareTo(other.getName());
+ return getName().compareTo(other.getName());
}
}
@@ -816,16 +849,11 @@
// Parameter Binding
public boolean isParameterImplicitEnabled()
{
- PortalObject portalObject = getSelectedObject();
boolean enabled = false;
- if (portalObject.getType() == PortalObject.TYPE_PAGE)
+ Page page = getSelectedPage();
+ if (pomb.getCoordinationService().isParameterBindingImplicitModeEnabled(page) !=
null)
{
- Page page = (Page)portalObject;
- if (pomb.getCoordinationService().isParameterBindingImplicitModeEnabled(page) !=
null)
- {
- enabled =
pomb.getCoordinationService().isParameterBindingImplicitModeEnabled(page);
- }
-
+ enabled =
pomb.getCoordinationService().isParameterBindingImplicitModeEnabled(page);
}
return enabled;
}
@@ -839,13 +867,8 @@
*/
public void implicitParameterListener(ValueChangeEvent event) throws
IllegalCoordinationException
{
- PortalObject portalObject = getSelectedObject();
String newValue = event.getNewValue().toString();
- if (portalObject.getType() == PortalObject.TYPE_PAGE)
- {
- Page page = (Page)portalObject;
- pomb.getCoordinationService().setParameterBindingImplicitMode(page,
Boolean.parseBoolean(newValue));
- }
+ pomb.getCoordinationService().setParameterBindingImplicitMode(getSelectedPage(),
Boolean.parseBoolean(newValue));
}
@@ -911,23 +934,19 @@
this.displayParameterBindings = displayParameterBindings;
}
- private void loadWindowBindings()
+ private void loadWindowBindings(Page page)
{
- PortalObject portalObject = getSelectedObject();
- if (portalObject.getType() == PortalObject.TYPE_PAGE)
+ Collection<? extends WindowBindingInfo> windowBindingInfos =
pomb.getCoordinationService().getWindowBindings(page);
+ if (windowBindingInfos != null && !windowBindingInfos.isEmpty())
{
- Page page = (Page)portalObject;
- displayParameterBindings = new ArrayList<DisplayParameterBinding>();
- for (Object o : pomb.getCoordinationService().getWindowBindings(page))
+ displayParameterBindings = new
ArrayList<DisplayParameterBinding>(windowBindingInfos.size());
+ for (WindowBindingInfo wbInfo : windowBindingInfos)
{
- WindowBindingInfo wbInfo = (WindowBindingInfo)o;
DisplayParameterBinding dpb = new DisplayParameterBinding();
- for (Object o1 : wbInfo.getWindows().entrySet())
+ for (Map.Entry<Window,QName> entry : wbInfo.getWindows().entrySet())
{
-
- Map.Entry entry = (Map.Entry)o1;
- Window paramName = (Window)entry.getKey();
- QName paramValue = (QName)entry.getValue();
+ Window paramName = entry.getKey();
+ QName paramValue = entry.getValue();
//quick filter for duplicate binding ids
dpb.getWindows().add(paramName);
if (dpb.getWindows().size() < 2)
@@ -939,11 +958,15 @@
displayParameterBindings.add(dpb);
}
}
+ else
+ {
+ displayParameterBindings = Collections.emptyList();
+ }
}
public void createWindowBinding(ActionEvent event) throws
IllegalCoordinationException
{
- Map<Window, QName> windowBinding = null;
+ Map<Window, QName> windowBinding;
for (String window : selectedWindows)
{
windowBinding = new HashMap<Window, QName>();
@@ -956,6 +979,6 @@
}
}
//refresh data
- loadWindowBindings();
+ loadWindowBindings(getSelectedPage());
}
}
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-26
16:08:32 UTC (rev 11739)
+++
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource.properties 2008-08-26
16:14:49 UTC (rev 11740)
@@ -293,3 +293,6 @@
COORDINATION_EVENT_CREATE_STEP4=4. Select destination windows consuming event
''{0}'':
COORDINATION_EVENT_CREATE_STEP5=5. Name wiring:
COORDINATION_EVENT_CREATE_CREATE=Create wiring
+
+COORDINATION_WIRING=event wiring
+COORDINATION_PARAMETER=parameter binding
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2008-08-26
16:08:32 UTC (rev 11739)
+++
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2008-08-26
16:14:49 UTC (rev 11740)
@@ -517,6 +517,11 @@
<from-outcome>confirmDeleteInstance</from-outcome>
<to-view-id>/jsf/confirmDeleteInstance.xhtml</to-view-id>
</navigation-case>
+
+ <navigation-case>
+ <from-outcome>confirmCoordinationDeletion</from-outcome>
+ <to-view-id>/jsf/confirmDeleteCoordination.xhtml</to-view-id>
+ </navigation-case>
</navigation-rule>
<lifecycle>
Added:
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/confirmDeleteCoordination.xhtml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/confirmDeleteCoordination.xhtml
(rev 0)
+++
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/confirmDeleteCoordination.xhtml 2008-08-26
16:14:49 UTC (rev 11740)
@@ -0,0 +1,53 @@
+<div
+
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:jbp="http://www.jboss.org/portal"
+
xmlns:c="http://java.sun.com/jstl/core"
+ class="admin-ui">
+
+ <ui:composition template="objectTemplate.xhtml">
+
+ <ui:param name="portalObjectScreen"
value="#{bundle.COMMON_DELETE}"/>
+ <ui:define name="content">
+
+ <f:subview rendered="#{empty
coordinationAction.selectedForDeletionName}">
+ <p
class="portlet-msg-error">#{bundle.COMMON_INCONSISTENT_STATE}</p>
+ </f:subview>
+
+ <f:subview rendered="#{not empty
coordinationAction.selectedForDeletionName}">
+ <div class="portlet-msg">
+ <div class="portlet-msg-icon"><h:graphicImage
url="/img/msgIcon_Warning.gif" alt="/!\"/></div>
+ <div class="portlet-msg-body">
+ <h3>#{bundle.COMMON_DELETE}  <h:outputText
value="#{coordinationAction.selectedForDeletionType}"/></h3>
+
+ <p class="portlet-msg-alert">
+ #{bundle.COMMON_DELETING}
+ <span
class="objectName">#{coordinationAction.selectedForDeletionName}</span>
+ #{coordinationAction.selectedForDeletionType} #{bundle.COMMON_FROM}
+ <c:if test="#{not empty
portalobjectmgr.selectedObjectParent.name}">
+ <span
class="objectName">#{portalobjectmgr.selectedObject.name}</span>
+ </c:if>
+ #{portalobjectmgr.selectedObject.typeName}!
+ </p>
+
+ <p class="portlet-class">#{bundle.COMMON_SURE_DELETE}
#{coordinationAction.selectedForDeletionType}?</p>
+
+ <h:form>
+ <h:commandButton value="#{bundle.COMMON_DELETE}"
action="editCoordination"
+
actionListener="#{coordinationAction.deleteWiring}"
+ styleClass="portlet-form-button
portlet-section-buttonrow">
+ </h:commandButton>
+ <h:commandButton value="#{bundle.COMMON_CANCEL}"
action="editCoordination"
+ styleClass="portlet-form-button
portlet-section-buttonrow"/>
+ </h:form>
+ </div>
+ </div>
+ </f:subview>
+
+ </ui:define>
+
+ </ui:composition>
+
+</div>
\ No newline at end of file
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-26
16:08:32 UTC (rev 11739)
+++
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/editCoordination.xhtml 2008-08-26
16:14:49 UTC (rev 11740)
@@ -10,7 +10,7 @@
<ui:define name="content">
<div class="tenpx-top-bottom">
- <h2
class="portlet-area-header">#{coordinationAction.selectedObject.name}
#{bundle.COORDINATION_PARAMETER_BINDINGS}</h2>
+ <h2
class="portlet-area-header">#{coordinationAction.selectedPage.name}
#{bundle.COORDINATION_PARAMETER_BINDINGS}</h2>
<!-- Create parameter binding -->
<h3 class="sectionTitle
tenpx-top-bottom">#{bundle.COORDINATION_CREATE_PARAMETER_BINDING}</h3>
@@ -99,14 +99,12 @@
</div>
<!-- Event wirings -->
- <h2
class="portlet-area-header">#{coordinationAction.selectedObject.name}
#{bundle.COORDINATION_EVENT_WIRINGS}</h2>
+ <h2
class="portlet-area-header">#{coordinationAction.selectedPage.name}
#{bundle.COORDINATION_EVENT_WIRINGS}</h2>
<h:form>
<h:selectBooleanCheckbox id="useExplicitEvents"
value="#{coordinationAction.explicitEventsUsed}"
- onchange="this.form.submit()"
-
valueChangeListener="#{coordinationAction.explicitEventsListener}"
- immediate="true"/> Enable Event Implicit
Mode
+ onchange="this.form.submit()"
immediate="true"/>#{bundle.COORDINATION_EVENT_EXPLICIT_MODE}
</h:form>
@@ -115,35 +113,39 @@
<h:form>
<h:panelGroup>
#{bundle.COORDINATION_EVENT_CREATE_STEP1}
- <h:selectManyListbox size="5"
value="#{coordinationAction.selectedSourceEvents}" immediate="true"
-
valueChangeListener="#{coordinationAction.selectSourceWindows}"
onchange="this.form.submit()">
+ <h:selectOneListbox id="sourceEvent" size="5"
value="#{coordinationAction.selectedSourceEvent}" immediate="true"
+
valueChangeListener="#{coordinationAction.selectSourceEvent}"
onchange="this.form.submit()">
<f:selectItems value="#{coordinationAction.sourceEvents}"/>
- </h:selectManyListbox>
+ </h:selectOneListbox>
</h:panelGroup>
- <h:panelGroup rendered="#{!empty
coordinationAction.selectedSourceEvents}" >
- <h:selectManyListbox size="5"
value="#{coordinationAction.selectedSourceWindows}" immediate="true"
-
valueChangeListener="#{coordinationAction.selectDestinationEvents}"
onchange="this.form.submit()">
+ <h:panelGroup rendered="#{!empty
coordinationAction.selectedSourceEvent}">
+ #{bundle.COORDINATION_EVENT_CREATE_STEP2}
+ <h:selectManyListbox id="sourceWindows" size="5"
value="#{coordinationAction.selectedSourceWindows}" immediate="true"
+
valueChangeListener="#{coordinationAction.selectSourceWindows}"
onchange="this.form.submit()">
<f:selectItems value="#{coordinationAction.sourceWindows}"/>
</h:selectManyListbox>
</h:panelGroup>
<h:panelGroup rendered="#{!empty
coordinationAction.selectedSourceWindows}">
- <h:selectManyListbox size="5"
value="#{coordinationAction.selectedDestinationEvents}"
immediate="true"
-
valueChangeListener="#{coordinationAction.selectDestinationEvents}"
onchange="this.form.submit()">
+ #{bundle.COORDINATION_EVENT_CREATE_STEP3}
+ <h:selectOneListbox id="destEvent" size="5"
value="#{coordinationAction.selectedDestinationEvent}"
immediate="true"
+
valueChangeListener="#{coordinationAction.selectDestinationEvent}"
onchange="this.form.submit()">
<f:selectItems
value="#{coordinationAction.destinationEvents}"/>
- </h:selectManyListbox>
+ </h:selectOneListbox>
</h:panelGroup>
- <h:panelGroup rendered="#{!empty
coordinationAction.selectedDestinationEvents}">
- <h:selectManyListbox size="5"
value="#{coordinationAction.selectedDestinationWindows}"
immediate="true"
+ <h:panelGroup rendered="#{!empty
coordinationAction.selectedDestinationEvent}">
+ #{bundle.COORDINATION_EVENT_CREATE_STEP4}
+ <h:selectManyListbox id="destWindows" size="5"
value="#{coordinationAction.selectedDestinationWindows}"
immediate="true"
valueChangeListener="#{coordinationAction.selectDestinationWindows}"
onchange="this.form.submit()">
<f:selectItems
value="#{coordinationAction.destinationWindows}"/>
</h:selectManyListbox>
</h:panelGroup>
<h:panelGroup rendered="#{!empty
coordinationAction.selectedDestinationWindows}">
- <h:inputText value="#{coordinationAction.wiringName}"/>
+ #{bundle.COORDINATION_EVENT_CREATE_STEP5}
+ <h:inputText id="wiringName"
value="#{coordinationAction.wiringName}"/>
<h:commandButton value="#{bundle.COORDINATION_EVENT_CREATE_CREATE}"
action="#{coordinationAction.createWiring}"
styleClass="portlet-form-button"/>
<h:commandButton value="#{bundle.COMMON_CANCEL}"
action="#{coordinationAction.cancelWiring}"
@@ -200,9 +202,10 @@
<h:outputText styleClass="actionRename"
value="#{bundle.RENAME}"/>
<f:param name="wiring" value="#{wiring.name}"/>
</h:commandLink> |
- <h:commandLink action="#{coordinationAction.deleteWiring}">
+ <h:commandLink action="confirmCoordinationDeletion"
actionListener="#{coordinationAction.selectWiringForDeletion}">
<h:outputText styleClass="actionDelete"
value="#{bundle.COMMON_DELETE}"/>
<f:param name="wiring" value="#{wiring.name}"/>
+ <f:param name="type" value="wiring"/>
</h:commandLink>
</h:column>
</h:dataTable>