JBoss Portal SVN: r9148 - branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-11-28 02:58:20 -0500 (Wed, 28 Nov 2007)
New Revision: 9148
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RefreshResult.java
Log:
- Minor.
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RefreshResult.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RefreshResult.java 2007-11-28 07:57:28 UTC (rev 9147)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/RefreshResult.java 2007-11-28 07:58:20 UTC (rev 9148)
@@ -80,7 +80,7 @@
}
else
{
- status.append("\n").append(message);
+ status.append(".\n").append(message);
}
return status;
16 years, 7 months
JBoss Portal SVN: r9147 - branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/registration.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-11-28 02:57:28 -0500 (Wed, 28 Nov 2007)
New Revision: 9147
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/registration/LocalizedString.java
Log:
- Chain constructors and use setValue in them instead of setting the value directly.
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/registration/LocalizedString.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/registration/LocalizedString.java 2007-11-28 04:45:46 UTC (rev 9146)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/registration/LocalizedString.java 2007-11-28 07:57:28 UTC (rev 9147)
@@ -41,15 +41,14 @@
public LocalizedString(String value, Locale locale)
{
- this.value = value;
+ setValue(value);
this.locale = locale;
}
public LocalizedString(String value)
{
- this.value = value;
- this.locale = Locale.getDefault();
+ this(value, Locale.getDefault());
}
public LocalizedString()
16 years, 7 months
JBoss Portal SVN: r9146 - branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-11-27 23:45:46 -0500 (Tue, 27 Nov 2007)
New Revision: 9146
Removed:
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/producer.xhtml
Log:
- Removed moved file.
Deleted: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/producer.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/producer.xhtml 2007-11-28 02:02:22 UTC (rev 9145)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/producer.xhtml 2007-11-28 04:45:46 UTC (rev 9146)
@@ -1,94 +0,0 @@
-<div class="wsrp-consumers-ui"
- 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:c="http://java.sun.com/jstl/core">
-
- <h:form>
- <ul class="topnav">
- <li><h:commandLink action="#{consumersMgr.listConsumers}" value="Consumers Configuration"/></li>
- <li id="currentTab">Producer Configuration</li>
- <li>Producer Data</li>
- </ul>
- </h:form>
-
-
- <ui:decorate template="common/tabContainer.xhtml">
- <ui:define name="tab-container-content">
-
- <h3 class="sectionTitle">Producer configuration</h3>
-
- <!-- Status message -->
- <h:message id="status" for="status" infoClass="portlet-msg-success" errorClass="portlet-msg-error"
- fatalClass="portlet-msg-error" warnClass="portlet-msg-alert"/>
-
- <h:form>
- <h:panelGrid columns="2" width="100%">
- <h:selectBooleanCheckbox value="#{producer.registrationRequiredForFullDescription}"/>
- <h:outputText value="Access to full service description requires consumers to be registered."/>
-
- <h:selectBooleanCheckbox value="#{producer.registrationRequired}"/>
- <h:outputText value="Requires registration."/>
-
- <h:outputText value=" " rendered="#{producer.registrationRequired}"/>
- <h:panelGroup>
- <h:panelGrid columns="2" rendered="#{producer.registrationRequired}" width="100%">
- <h:outputLabel value="Registration policy class name:" for="registrationPolicy"/>
- <h:inputText id="registrationPolicy" value="#{producer.registrationPolicyClassName}" size="80"/>
-
- <h:outputLabel value="Registration property validator class name:" for="validator"
- rendered="#{producer.defaultRegistrationPolicy}"/>
- <h:inputText id="validator" value="#{producer.validatorClassName}" size="80"
- rendered="#{producer.defaultRegistrationPolicy}"/>
-
- </h:panelGrid>
- </h:panelGroup>
-
- <h:outputText value=" " rendered="#{producer.registrationRequired}"/>
- <h:panelGroup rendered="#{producer.registrationRequired}">
- <h:outputText styleClass="portlet-area-header" value="Registration properties"/>
- <h:panelGroup styleClass="portlet-area-body">
- <c:choose>
- <c:when test="#{!empty producer.registrationProperties}">
- <h:dataTable var="property" id="registrationProperties" width="100%"
- value="#{producer.registrationProperties}"
- rendered="#{producer.registrationRequired}"
- headerClass="portlet-section-header">
- <h:column>
- <f:facet name="header">Name</f:facet>
- <h:inputText value="#{property.nameAsString}" size="30"/>
- </h:column>
- <h:column>
- <f:facet name="header">Type</f:facet>
- <h:selectOneListbox disabled="true">
- <f:selectItems value="#{producer.supportedPropertyTypes}"/>
- </h:selectOneListbox>
- </h:column>
- <h:column>
- <f:facet name="header">Label</f:facet>
- <h:inputText value="#{property.label}" size="50"/>
- </h:column>
- <h:column>
- <f:facet name="header">Hint</f:facet>
- <h:inputText value="#{property.hint}" size="50"/>
- </h:column>
- </h:dataTable>
- </c:when>
- <c:otherwise>
- <h:outputText value="No specified required registration properties."/>
- </c:otherwise>
- </c:choose>
- <h:commandLink action="#{producer.addRegistrationProperty}" value="Add property"
- styleClass="portlet-form-button"/>
- </h:panelGroup>
- </h:panelGroup>
-
- <h:outputText value=" "/>
- <h:commandButton action="#{producer.save}" value="Save" styleClass="portlet-form-button"/>
- </h:panelGrid>
- </h:form>
-
- </ui:define>
- </ui:decorate>
-</div>
\ No newline at end of file
16 years, 7 months
JBoss Portal SVN: r9145 - branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2007-11-27 21:02:22 -0500 (Tue, 27 Nov 2007)
New Revision: 9145
Modified:
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/displayNameObject.xhtml
Log:
JBPORTAL-1805 Let a user define multiple display-name for a portal object in the admin portlet
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/displayNameObject.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/displayNameObject.xhtml 2007-11-28 01:29:39 UTC (rev 9144)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/displayNameObject.xhtml 2007-11-28 02:02:22 UTC (rev 9145)
@@ -12,13 +12,58 @@
<p class="portlet-area-header">Current Display Names</p>
<div class="portlet-area-body">
+
+ <ui:remove>
<c:forEach items="#{addDisplayNameAction.currentLocales}" var="locale">
- <ui:remove>
- <!--We should be able to do something like with el-->
- #{locale.key} - #{locale.value}
- </ui:remove>
- #{locale}<br/>
+ <!--We should be able to do something like with el,
+ but it's not working so I printed out all languages :)-->
+ #{locale.key} - #{locale.value}
+ #{locale}<br/>
</c:forEach>
+ </ui:remove>
+
+ <ul>
+ <f:subview id="ar_view" rendered="#{addDisplayNameAction.currentLocales['ar'] ne null}"><li>ar - #{addDisplayNameAction.currentLocales['ar']}</li></f:subview>
+ <f:subview id="be_view" rendered="#{addDisplayNameAction.currentLocales['be'] ne null}"><li>be - #{addDisplayNameAction.currentLocales['be']}</li></f:subview>
+ <f:subview id="bg_view" rendered="#{addDisplayNameAction.currentLocales['bg'] ne null}"><li>bg - #{addDisplayNameAction.currentLocales['bg']}</li></f:subview>
+ <f:subview id="ca_view" rendered="#{addDisplayNameAction.currentLocales['ca'] ne null}"><li>ca - #{addDisplayNameAction.currentLocales['ca']}</li></f:subview>
+ <f:subview id="cs_view" rendered="#{addDisplayNameAction.currentLocales['cs'] ne null}"><li>cs - #{addDisplayNameAction.currentLocales['cs']}</li></f:subview>
+ <f:subview id="da_view" rendered="#{addDisplayNameAction.currentLocales['da'] ne null}"><li>da - #{addDisplayNameAction.currentLocales['da']}</li></f:subview>
+ <f:subview id="de_view" rendered="#{addDisplayNameAction.currentLocales['de'] ne null}"><li>de - #{addDisplayNameAction.currentLocales['de']}</li></f:subview>
+ <f:subview id="el_view" rendered="#{addDisplayNameAction.currentLocales['el'] ne null}"><li>el - #{addDisplayNameAction.currentLocales['el']}</li></f:subview>
+ <f:subview id="en_view" rendered="#{addDisplayNameAction.currentLocales['en'] ne null}"><li>en - #{addDisplayNameAction.currentLocales['en']}</li></f:subview>
+ <f:subview id="es_view" rendered="#{addDisplayNameAction.currentLocales['es'] ne null}"><li>es - #{addDisplayNameAction.currentLocales['es']}</li></f:subview>
+ <f:subview id="et_view" rendered="#{addDisplayNameAction.currentLocales['et'] ne null}"><li>et - #{addDisplayNameAction.currentLocales['et']}</li></f:subview>
+ <f:subview id="fi_view" rendered="#{addDisplayNameAction.currentLocales['fi'] ne null}"><li>fi - #{addDisplayNameAction.currentLocales['fi']}</li></f:subview>
+ <f:subview id="fr_view" rendered="#{addDisplayNameAction.currentLocales['fr'] ne null}"><li>fr - #{addDisplayNameAction.currentLocales['fr']}</li></f:subview>
+ <f:subview id="hi_view" rendered="#{addDisplayNameAction.currentLocales['hi'] ne null}"><li>hi - #{addDisplayNameAction.currentLocales['hi']}</li></f:subview>
+ <f:subview id="hr_view" rendered="#{addDisplayNameAction.currentLocales['hr'] ne null}"><li>hr - #{addDisplayNameAction.currentLocales['hr']}</li></f:subview>
+ <f:subview id="hu_view" rendered="#{addDisplayNameAction.currentLocales['hu'] ne null}"><li>hu - #{addDisplayNameAction.currentLocales['hu']}</li></f:subview>
+ <f:subview id="is_view" rendered="#{addDisplayNameAction.currentLocales['is'] ne null}"><li>is - #{addDisplayNameAction.currentLocales['is']}</li></f:subview>
+ <f:subview id="it_view" rendered="#{addDisplayNameAction.currentLocales['it'] ne null}"><li>it - #{addDisplayNameAction.currentLocales['it']}</li></f:subview>
+ <f:subview id="iw_view" rendered="#{addDisplayNameAction.currentLocales['iw'] ne null}"><li>iw - #{addDisplayNameAction.currentLocales['iw']}</li></f:subview>
+ <f:subview id="ja_view" rendered="#{addDisplayNameAction.currentLocales['ja'] ne null}"><li>ja - #{addDisplayNameAction.currentLocales['ja']}</li></f:subview>
+ <f:subview id="ko_view" rendered="#{addDisplayNameAction.currentLocales['ko'] ne null}"><li>ko - #{addDisplayNameAction.currentLocales['ko']}</li></f:subview>
+ <f:subview id="lt_view" rendered="#{addDisplayNameAction.currentLocales['lt'] ne null}"><li>lt - #{addDisplayNameAction.currentLocales['lt']}</li></f:subview>
+ <f:subview id="lv_view" rendered="#{addDisplayNameAction.currentLocales['lv'] ne null}"><li>lv - #{addDisplayNameAction.currentLocales['lv']}</li></f:subview>
+ <f:subview id="mk_view" rendered="#{addDisplayNameAction.currentLocales['mk'] ne null}"><li>mk - #{addDisplayNameAction.currentLocales['mk']}</li></f:subview>
+ <f:subview id="nl_view" rendered="#{addDisplayNameAction.currentLocales['nl'] ne null}"><li>nl - #{addDisplayNameAction.currentLocales['nl']}</li></f:subview>
+ <f:subview id="no_view" rendered="#{addDisplayNameAction.currentLocales['no'] ne null}"><li>no - #{addDisplayNameAction.currentLocales['no']}</li></f:subview>
+ <f:subview id="pl_view" rendered="#{addDisplayNameAction.currentLocales['pl'] ne null}"><li>pl - #{addDisplayNameAction.currentLocales['pl']}</li></f:subview>
+ <f:subview id="pt_view" rendered="#{addDisplayNameAction.currentLocales['pt'] ne null}"><li>pt - #{addDisplayNameAction.currentLocales['pt']}</li></f:subview>
+ <f:subview id="ro_view" rendered="#{addDisplayNameAction.currentLocales['ro'] ne null}"><li>ro - #{addDisplayNameAction.currentLocales['ro']}</li></f:subview>
+ <f:subview id="ru_view" rendered="#{addDisplayNameAction.currentLocales['ru'] ne null}"><li>ru - #{addDisplayNameAction.currentLocales['ru']}</li></f:subview>
+ <f:subview id="sk_view" rendered="#{addDisplayNameAction.currentLocales['sk'] ne null}"><li>sk - #{addDisplayNameAction.currentLocales['sk']}</li></f:subview>
+ <f:subview id="sl_view" rendered="#{addDisplayNameAction.currentLocales['sl'] ne null}"><li>sl - #{addDisplayNameAction.currentLocales['sl']}</li></f:subview>
+ <f:subview id="sq_view" rendered="#{addDisplayNameAction.currentLocales['sq'] ne null}"><li>sq - #{addDisplayNameAction.currentLocales['sq']}</li></f:subview>
+ <f:subview id="sv_view" rendered="#{addDisplayNameAction.currentLocales['sv'] ne null}"><li>sv - #{addDisplayNameAction.currentLocales['sv']}</li></f:subview>
+ <f:subview id="th_view" rendered="#{addDisplayNameAction.currentLocales['th'] ne null}"><li>th - #{addDisplayNameAction.currentLocales['th']}</li></f:subview>
+ <f:subview id="tr_view" rendered="#{addDisplayNameAction.currentLocales['tr'] ne null}"><li>tr - #{addDisplayNameAction.currentLocales['tr']}</li></f:subview>
+ <f:subview id="uk_view" rendered="#{addDisplayNameAction.currentLocales['uk'] ne null}"><li>uk - #{addDisplayNameAction.currentLocales['uk']}</li></f:subview>
+ <f:subview id="vi_view" rendered="#{addDisplayNameAction.currentLocales['vi'] ne null}"><li>vi - #{addDisplayNameAction.currentLocales['vi']}</li></f:subview>
+ <f:subview id="zh_view" rendered="#{addDisplayNameAction.currentLocales['zh'] ne null}"><li>zh - #{addDisplayNameAction.currentLocales['zh']}</li></f:subview>
+ </ul>
+
</div>
<p class="portlet-area-header">Add Display Names</p>
<div class="portlet-area-body">
16 years, 7 months
JBoss Portal SVN: r9144 - in branches/presentation/presentation/src/main/org/jboss/portal/presentation: model and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-11-27 20:29:39 -0500 (Tue, 27 Nov 2007)
New Revision: 9144
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/UIObjectImpl.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/UIObject.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockModel.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockObject.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/ModelTestCase.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/UIModelTester.java
Log:
- test case for an update of a non existing state
Modified: branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/UIObjectImpl.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/UIObjectImpl.java 2007-11-28 01:12:14 UTC (rev 9143)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/UIObjectImpl.java 2007-11-28 01:29:39 UTC (rev 9144)
@@ -321,7 +321,7 @@
// /**
// *
// */
-// public void destroyChild(String name)
+// public void removeChild(String name)
// {
// //Make sure all children are loaded
// this.getChildren();
Modified: branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/UIObject.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/UIObject.java 2007-11-28 01:12:14 UTC (rev 9143)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/UIObject.java 2007-11-28 01:29:39 UTC (rev 9144)
@@ -77,7 +77,7 @@
*
* @param name
*/
-// public void destroyChild(String name);
+// public void removeChild(String name);
/**
*
Modified: branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockModel.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockModel.java 2007-11-28 01:12:14 UTC (rev 9143)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockModel.java 2007-11-28 01:29:39 UTC (rev 9144)
@@ -22,10 +22,12 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.state.NoSuchStateException;
+import org.jboss.portal.presentation.model.state.StateChangeVetoException;
+import org.jboss.portal.presentation.model.state.StateException;
+import org.jboss.portal.presentation.model.state.structural.StructuralState;
import org.jboss.portal.presentation.model.state.structural.StructuralStateManager;
-import org.jboss.portal.presentation.model.state.structural.StructuralState;
-import org.jboss.portal.presentation.model.state.StateChangeVetoException;
-import org.jboss.portal.presentation.model.UIObject;
import java.util.ArrayList;
import java.util.HashMap;
@@ -37,7 +39,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 630 $
*/
-public class MockModel implements StructuralStateManager
+public class MockModel
{
/** . */
@@ -49,24 +51,111 @@
/** . */
private final MockObjectImpl context = new MockObjectImpl();
+ private final StructuralStateManager manager = new StructuralStateManager()
+ {
+ public StructuralState load(String objectId) throws IllegalArgumentException
+ {
+ if (objectId == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ MockObjectImpl object = universe.get(objectId);
+ return object != null ? object.takeSnapshot() : null;
+ }
+
+ public String getRootId()
+ {
+ return context.id;
+ }
+
+ public StructuralState create(String parentId, Class<? extends UIObject> type, String name, Map<String, String> properties) throws StateChangeVetoException
+ {
+ throw new StateChangeVetoException();
+ }
+
+ public void destroy(String objectId) throws StateChangeVetoException
+ {
+ throw new StateChangeVetoException();
+ }
+
+ public void move(String objectId, String parentId) throws StateChangeVetoException
+ {
+ throw new StateChangeVetoException();
+ }
+
+ public void update(String objectId, Map<String, String> changes) throws StateChangeVetoException
+ {
+ if (objectId == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (changes == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ MockObjectImpl object = universe.get(objectId);
+ if (object == null)
+ {
+ throw new NoSuchStateException();
+ }
+
+ //
+ for (Map.Entry<String, String> entry : changes.entrySet())
+ {
+ String propertyName = entry.getKey();
+ MockObject.UpdateBehavior behavior = object.propertyBehaviors.get(propertyName);
+ if (behavior instanceof MockObject.Veto)
+ {
+ throw new StateChangeVetoException("Cannot modify non behavior property");
+ }
+ else if (behavior instanceof MockObject.Failure)
+ {
+ MockObject.Failure failure = (MockObject.Failure)behavior;
+ failure.throwAs(IllegalArgumentException.class).
+ throwAs(StateChangeVetoException.class).
+ throwAs(StateException.class);
+ }
+ else
+ {
+ String propertyValue = entry.getValue();
+ if (propertyValue != null)
+ {
+ object.propertyValues.put(propertyName, propertyValue);
+ }
+ else
+ {
+ object.propertyValues.remove(propertyName);
+ }
+ }
+ }
+ }
+ };
+
+ public StructuralStateManager getManager()
+ {
+ return manager;
+ }
+
public MockObject getContext()
{
return context;
}
- public StructuralState load(String objectId) throws IllegalArgumentException
+ public void destroy(String objectId)
{
- if (objectId == null)
+ MockObjectImpl object = universe.remove(objectId);
+ if (object.parent != null)
{
- throw new IllegalArgumentException();
+ object.parent.children.remove(object.id);
}
- MockObjectImpl object = universe.get(objectId);
- return object != null ? object.takeSnapshot() : null;
- }
- public String getRootId()
- {
- return context.id;
+ //
+ for (String childId : new ArrayList<String>(object.children.keySet()))
+ {
+ destroy(childId);
+ }
}
private class MockObjectImpl implements MockObject
@@ -85,7 +174,7 @@
private final Map<String, String> propertyValues;
/** . */
- private final Map<String, Boolean> propertyMutables;
+ private final Map<String, UpdateBehavior> propertyBehaviors;
/** . */
private final Map<String, MockObjectImpl> children;
@@ -100,7 +189,7 @@
this.type = MockObject.Type.CONTEXT;
this.children = new LinkedHashMap<String, MockObjectImpl>();
this.propertyValues = new HashMap<String, String>();
- this.propertyMutables = new HashMap<String, Boolean>();
+ this.propertyBehaviors = new HashMap<String, UpdateBehavior>();
//
universe.put(id, this);
@@ -118,7 +207,7 @@
this.type = type;
this.children = new LinkedHashMap<String, MockObjectImpl>();
this.propertyValues = new HashMap<String, String>();
- this.propertyMutables = new HashMap<String, Boolean>();
+ this.propertyBehaviors = new HashMap<String, UpdateBehavior>();
//
this.parent = parent;
@@ -174,25 +263,25 @@
return propertyValues.keySet();
}
- public void setPropertyMutable(String propertyName, Boolean propertyMutable)
+ public void setPropertyBehavior(String propertyName, UpdateBehavior propertyBehavior)
{
if (propertyName == null)
{
throw new IllegalArgumentException();
}
- if (propertyMutable != null)
+ if (propertyBehavior != null)
{
- propertyMutables.put(name, propertyMutable);
+ propertyBehaviors.put(name, propertyBehavior);
}
else
{
- propertyMutables.remove(name);
+ propertyBehaviors.remove(name);
}
}
- public Boolean isPropertyMutable(String propertyName)
+ public UpdateBehavior getPropertyBehavior(String propertyName)
{
- return propertyMutables.get(propertyName);
+ return propertyBehaviors.get(propertyName);
}
public void setPropertyValue(String propertyName, String propertyValue)
@@ -211,58 +300,4 @@
}
}
}
-
- public StructuralState create(String parentId, Class<? extends UIObject> type, String name, Map<String, String> properties) throws StateChangeVetoException
- {
- throw new StateChangeVetoException();
- }
-
- public void destroy(String objectId) throws StateChangeVetoException
- {
- throw new StateChangeVetoException();
- }
-
- public void move(String objectId, String parentId) throws StateChangeVetoException
- {
- throw new StateChangeVetoException();
- }
-
- public void update(String objectId, Map<String, String> changes) throws StateChangeVetoException
- {
- if (objectId == null)
- {
- throw new IllegalArgumentException();
- }
- if (changes == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- MockObjectImpl object = universe.get(objectId);
- if (object == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- for (Map.Entry<String, String> entry : changes.entrySet())
- {
- String propertyName = entry.getKey();
- Boolean mutable = object.propertyMutables.get(propertyName);
- if (Boolean.FALSE.equals(mutable))
- {
- throw new StateChangeVetoException("Cannot modify non mutable property");
- }
- String propertyValue = entry.getValue();
- if (propertyValue != null)
- {
- object.propertyValues.put(propertyName, propertyValue);
- }
- else
- {
- object.propertyValues.remove(propertyName);
- }
- }
- }
}
Modified: branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockObject.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockObject.java 2007-11-28 01:12:14 UTC (rev 9143)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockObject.java 2007-11-28 01:29:39 UTC (rev 9144)
@@ -55,6 +55,43 @@
}
}
+ public abstract static class UpdateBehavior
+ {
+ public static UpdateBehavior veto()
+ {
+ return new Veto();
+ }
+ public static UpdateBehavior failure(Throwable throwable)
+ {
+ return new Failure(throwable);
+ }
+ }
+
+ static class Veto extends UpdateBehavior
+ {
+ }
+
+ static class Failure extends UpdateBehavior
+ {
+
+ /** . */
+ final Throwable throwable;
+
+ public Failure(Throwable throwable)
+ {
+ this.throwable = throwable;
+ }
+
+ public <T extends Throwable> Failure throwAs(Class<T> type) throws T
+ {
+ if (type.isInstance(throwable))
+ {
+ throw type.cast(throwable);
+ }
+ return this;
+ }
+ }
+
Type getType();
String getName();
@@ -63,9 +100,9 @@
String getPropertyValue(String propertyName);
- void setPropertyMutable(String propertyName, Boolean propertyMutable);
+ void setPropertyBehavior(String propertyName, UpdateBehavior propertyBehavior);
- Boolean isPropertyMutable(String propertyName);
+ UpdateBehavior getPropertyBehavior(String propertyName);
void setPropertyValue(String propertyName, String propertyValue);
Modified: branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/ModelTestCase.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/ModelTestCase.java 2007-11-28 01:12:14 UTC (rev 9143)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/ModelTestCase.java 2007-11-28 01:29:39 UTC (rev 9144)
@@ -31,8 +31,8 @@
import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.model.UIPage;
import org.jboss.portal.presentation.model.UIPortal;
+import org.jboss.portal.presentation.model.state.NoSuchStateException;
import org.jboss.portal.presentation.model.state.StateChangeVetoException;
-import org.jboss.portal.presentation.model.state.StateException;
import java.util.Collections;
import java.util.List;
@@ -135,14 +135,14 @@
UIWindow window = container.createChild("defaultWindow", UIWindow.class);
//Destroy the container. When this is done, both container and window must be destroyed from the UIObject tree
- page.destroyChild(container.getName());
+ page.removeChild(container.getName());
List<UIObject> pageChildren = page.getChildren();
assertTrue(pageChildren == null || pageChildren.size() == 0);
}*/
public void testSetPropertyThrowsIAE()
{
- UIContext context = new UIContextImpl(model);
+ UIContext context = new UIContextImpl(model.getManager());
//
try
@@ -167,7 +167,7 @@
public void testGetPropertyThrowsIAE()
{
- UIContext context = new UIContextImpl(model);
+ UIContext context = new UIContextImpl(model.getManager());
//
try
@@ -194,7 +194,7 @@
{
MockObject mockDefaultPortal = model.getContext().addChild("defaultPortal", MockObject.Type.PORTAL);
MockObject mockSomeOtherPortal = model.getContext().addChild("someOtherPortal", MockObject.Type.PORTAL);
- UIContext context = new UIContextImpl(model);
+ UIContext context = new UIContextImpl(model.getManager());
//
List<UIObject> children = context.getChildren();
@@ -224,7 +224,7 @@
{
MockObject mockDefaultPortal = model.getContext().addChild("defaultPortal", MockObject.Type.PORTAL);
MockObject mockDefaultPage = mockDefaultPortal.addChild("defaultPage", MockObject.Type.PAGE);
- UIContext context = new UIContextImpl(model);
+ UIContext context = new UIContextImpl(model.getManager());
//
UIPage defaultPage = (UIPage)context.getObject(mockDefaultPage.getId());
@@ -276,12 +276,29 @@
Assert.assertEquals(null, object.getProperty(scopeType, propertyName, Blah.class)); }
}
- public void testExistingMutableStructuralProperty()
+ public void testUpdatePropertyNonExistingObject()
{
+ UIContext context = new UIContextImpl(model.getManager());
MockObject mockFoo = model.getContext().addChild("foo", MockObject.Type.PORTAL);
+ UIPortal foo = (UIPortal)context.getObject(mockFoo.getId());
+ model.destroy(mockFoo.getId());
+
+ //
+ try
+ {
+ foo.setProperty(StateScopeType.STRUCTURAL, "foo", "foo_value");
+ fail();
+ }
+ catch (NoSuchStateException e)
+ {
+ }
+ }
+
+ public void testUpdateExistingMutableStructuralProperty()
+ {
+ MockObject mockFoo = model.getContext().addChild("foo", MockObject.Type.PORTAL);
mockFoo.setPropertyValue("foo", "foo_value");
- mockFoo.setPropertyMutable("foo", true);
- UIContext context = new UIContextImpl(model);
+ UIContext context = new UIContextImpl(model.getManager());
// Check initial state
UIPortal foo = (UIPortal)context.getObject(mockFoo.getId());
@@ -304,12 +321,12 @@
fooAssert.assertStructuralEquals("foo", "foo_new_value");
}
- public void testExistingNonMutableStructuralProperty()
+ public void testUpdateExistingNonMutableStructuralProperty()
{
MockObject mockFoo = model.getContext().addChild("foo", MockObject.Type.PORTAL);
mockFoo.setPropertyValue("foo", "foo_value");
- mockFoo.setPropertyMutable("foo", false);
- UIContext context = new UIContextImpl(model);
+ mockFoo.setPropertyBehavior("foo", MockObject.Failure.veto());
+ UIContext context = new UIContextImpl(model.getManager());
// Check initial state
UIPortal foo = (UIPortal)context.getObject(mockFoo.getId());
@@ -339,11 +356,10 @@
fooAssert.assertStructuralEquals("foo", "foo_value");
}
- public void testNonExistingMutableStructuralProperty()
+ public void testUpdateNonExistingMutableStructuralProperty()
{
MockObject mockFoo = model.getContext().addChild("foo", MockObject.Type.PORTAL);
- mockFoo.setPropertyMutable("foo", true);
- UIContext context = new UIContextImpl(model);
+ UIContext context = new UIContextImpl(model.getManager());
// Check initial state
UIPortal foo = (UIPortal)context.getObject(mockFoo.getId());
@@ -366,11 +382,11 @@
fooAssert.assertStructuralEquals("foo", "foo_new_value");
}
- public void testNonExistingNonMutableStructuralProperty()
+ public void testUpdateNonExistingNonMutableStructuralProperty()
{
MockObject mockFoo = model.getContext().addChild("foo", MockObject.Type.PORTAL);
- mockFoo.setPropertyMutable("foo", false);
- UIContext context = new UIContextImpl(model);
+ mockFoo.setPropertyBehavior("foo", MockObject.Failure.veto());
+ UIContext context = new UIContextImpl(model.getManager());
// Check initial state
UIPortal foo = (UIPortal)context.getObject(mockFoo.getId());
@@ -400,10 +416,10 @@
fooAssert.assertStructuralEquals("foo", null);
}
- public void testContentProperty()
+ public void testUpdateContentProperty()
{
MockObject mockFoo = model.getContext().addChild("foo", MockObject.Type.PORTAL);
- UIContext context = new UIContextImpl(model);
+ UIContext context = new UIContextImpl(model.getManager());
// Check initial state
UIPortal foo = (UIPortal)context.getObject(mockFoo.getId());
@@ -419,10 +435,10 @@
fooAssert.assertContentEquals("foo", 2, Integer.class);
}
- public void testNavigationalProperty()
+ public void testUpdateNavigationalProperty()
{
MockObject mockFoo = model.getContext().addChild("foo", MockObject.Type.PORTAL);
- UIContext context = new UIContextImpl(model);
+ UIContext context = new UIContextImpl(model.getManager());
// Check initial state
UIPortal foo = (UIPortal)context.getObject(mockFoo.getId());
Modified: branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/UIModelTester.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/UIModelTester.java 2007-11-28 01:12:14 UTC (rev 9143)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/UIModelTester.java 2007-11-28 01:29:39 UTC (rev 9144)
@@ -42,7 +42,7 @@
*/
protected void setUp() throws Exception
{
- this.uiContext = new UIContextImpl(new MockModel());
+ this.uiContext = new UIContextImpl(new MockModel().getManager());
}
/**
@@ -113,7 +113,7 @@
UIWindow window = container.createChild("defaultWindow", UIWindow.class);
//Destroy the container. When this is done, both container and window must be destroyed from the UIObject tree
- page.destroyChild(container.getName());
+ page.removeChild(container.getName());
List<UIObject> pageChildren = page.getChildren();
assertTrue(pageChildren == null || pageChildren.size() == 0);
}*/
16 years, 7 months
JBoss Portal SVN: r9143 - in branches/JBoss_Portal_Branch_2_6/core-admin/src: resources/portal-admin-war/WEB-INF/jsf and 1 other directory.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2007-11-27 20:12:14 -0500 (Tue, 27 Nov 2007)
New Revision: 9143
Modified:
branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PortalObjectDisplayNameAction.java
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/displayNameObject.xhtml
Log:
JBPORTAL-1805 Let a user define multiple display-name for a portal object in the admin portlet
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PortalObjectDisplayNameAction.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PortalObjectDisplayNameAction.java 2007-11-28 00:52:22 UTC (rev 9142)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PortalObjectDisplayNameAction.java 2007-11-28 01:12:14 UTC (rev 9143)
@@ -55,16 +55,12 @@
private String displayNameByLocale;
-
public void addDisplayName() throws ConversionException
{
- if (newText != null || newText.equals(""))
+ if (newText != null)
{
- if (bean instanceof PortalObjectManagerBean)
- {
- selectedObject = ((PortalObjectManagerBean) bean).getSelectedObject();
- }
+ getSelectedObject();
Locale locale = LocaleFormat.DEFAULT.getLocale(newLocale);
Map map = new HashMap();
LocalizedString.Value lsv = new LocalizedString.Value(locale, newText);
@@ -80,6 +76,10 @@
public PortalObject getSelectedObject()
{
+ if (bean instanceof PortalObjectManagerBean)
+ {
+ selectedObject = ((PortalObjectManagerBean) bean).getSelectedObject();
+ }
return selectedObject;
}
@@ -100,15 +100,15 @@
public SortedMap getLocales()
{
- SortedMap set = new TreeMap();
+ SortedMap smap = new TreeMap();
Locale[] localList = (Locale[]) LocaleManager.getLocales().toArray(new Locale[0]);
for (int i = 0; i < localList.length; i++)
{
Locale thisLocale = localList[i];
- set.put(thisLocale.getLanguage(), thisLocale.getLanguage());
+ smap.put(thisLocale.getLanguage(), thisLocale.getLanguage());
}
- return set;
+ return smap;
}
public void setLocales(SortedMap locales)
@@ -144,6 +144,11 @@
return null;
}
+ public void setCurrentLocales(Map currentLocales)
+ {
+ this.currentLocales = currentLocales;
+ }
+
public String getDisplayNameByLocale(Locale locale)
{
Map displayNames = selectedObject.getDisplayName().getValues();
@@ -153,7 +158,8 @@
public String editDisplayNames() throws ConversionException
{
- getCurrentLocales();
+ getSelectedObject();
+ getCurrentLocales();
return "editDisplayNames";
}
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/displayNameObject.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/displayNameObject.xhtml 2007-11-28 00:52:22 UTC (rev 9142)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/displayNameObject.xhtml 2007-11-28 01:12:14 UTC (rev 9143)
@@ -22,7 +22,7 @@
</div>
<p class="portlet-area-header">Add Display Names</p>
<div class="portlet-area-body">
- <h:inputText id="newName" value="#{addDisplayNameAction.newText}"/>
+ <h:inputText id="newName" value="#{addDisplayNameAction.newText}" required="true"/>
<h:selectOneMenu id="locales" value="#{addDisplayNameAction.newLocale}">
<f:selectItems value="#{addDisplayNameAction.locales}"/>
</h:selectOneMenu>
16 years, 7 months
JBoss Portal SVN: r9142 - in branches/presentation/presentation/src/main/org/jboss/portal/presentation: model and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-11-27 19:52:22 -0500 (Tue, 27 Nov 2007)
New Revision: 9142
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/UIObjectImpl.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/UIObject.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/ModelTestCase.java
Log:
- added a bunch of IAE testing exceptions (trivial)
Modified: branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/UIObjectImpl.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/UIObjectImpl.java 2007-11-28 00:41:54 UTC (rev 9141)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/UIObjectImpl.java 2007-11-28 00:52:22 UTC (rev 9142)
@@ -129,6 +129,18 @@
public <T> T getProperty(StateScopeType scopeType, String propertyName, Class<T> propertyType)
{
+ if (scopeType == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (propertyName == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (propertyType == null)
+ {
+ throw new IllegalArgumentException();
+ }
Map map;
switch (scopeType)
{
@@ -154,6 +166,14 @@
public <T> void setProperty(StateScopeType scopeType, String propertyName, T propertyValue) throws StateChangeVetoException
{
+ if (scopeType == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (propertyName == null)
+ {
+ throw new IllegalArgumentException();
+ }
switch (scopeType)
{
case CONTENT:
Modified: branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/UIObject.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/UIObject.java 2007-11-28 00:41:54 UTC (rev 9141)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/UIObject.java 2007-11-28 00:52:22 UTC (rev 9142)
@@ -23,6 +23,7 @@
package org.jboss.portal.presentation.model;
import org.jboss.portal.presentation.model.state.StateChangeVetoException;
+import org.jboss.portal.presentation.model.state.StateException;
import java.util.List;
@@ -57,14 +58,10 @@
/**
* Equivalent to call <code>getPropertyValue(StateScopeType,String,Class)</code> with the <code>Object.class</code>
* literal.
- *
- * @param scopeType
- * @param propertyName
- * @return
*/
- Object getProperty(StateScopeType scopeType, String propertyName);
+ Object getProperty(StateScopeType scopeType, String propertyName) throws IllegalArgumentException, StateException, StateChangeVetoException;
- <T> void setProperty(StateScopeType scopeType, String propertyName, T propertyValue) throws StateChangeVetoException;
+ <T> void setProperty(StateScopeType scopeType, String propertyName, T propertyValue) throws IllegalArgumentException, StateException, StateChangeVetoException;
/**
* Create a child with a specified type.
Modified: branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/ModelTestCase.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/ModelTestCase.java 2007-11-28 00:41:54 UTC (rev 9141)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/ModelTestCase.java 2007-11-28 00:52:22 UTC (rev 9142)
@@ -32,6 +32,7 @@
import org.jboss.portal.presentation.model.UIPage;
import org.jboss.portal.presentation.model.UIPortal;
import org.jboss.portal.presentation.model.state.StateChangeVetoException;
+import org.jboss.portal.presentation.model.state.StateException;
import java.util.Collections;
import java.util.List;
@@ -138,7 +139,57 @@
List<UIObject> pageChildren = page.getChildren();
assertTrue(pageChildren == null || pageChildren.size() == 0);
}*/
+
+ public void testSetPropertyThrowsIAE()
+ {
+ UIContext context = new UIContextImpl(model);
+
+ //
+ try
+ {
+ context.setProperty(null, "foo", "foo_value");
+ fail();
+ }
+ catch (IllegalArgumentException ignore)
+ {
+ }
+
+ //
+ try
+ {
+ context.setProperty(StateScopeType.STRUCTURAL, null, "foo_value");
+ fail();
+ }
+ catch (IllegalArgumentException ignore)
+ {
+ }
+ }
+ public void testGetPropertyThrowsIAE()
+ {
+ UIContext context = new UIContextImpl(model);
+
+ //
+ try
+ {
+ context.getProperty(null, "foo");
+ fail();
+ }
+ catch (IllegalArgumentException ignore)
+ {
+ }
+
+ //
+ try
+ {
+ context.getProperty(StateScopeType.STRUCTURAL, null);
+ fail();
+ }
+ catch (IllegalArgumentException ignore)
+ {
+ }
+ }
+
public void testLoadChildren() throws Exception
{
MockObject mockDefaultPortal = model.getContext().addChild("defaultPortal", MockObject.Type.PORTAL);
16 years, 7 months
JBoss Portal SVN: r9141 - in branches/presentation: presentation/src/main/org/jboss/portal/presentation/model/state and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-11-27 19:41:54 -0500 (Tue, 27 Nov 2007)
New Revision: 9141
Added:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/state/DuplicateStateException.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/state/NoSuchStateException.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/state/StateException.java
Removed:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/state/structural/ObjectState.java
Modified:
branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/model/StructuralStateManagerImpl.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/state/structural/StructuralStateManager.java
Log:
- added a bunch of state exceptions
- completed javadoc for structural state manager CRUD operations
Modified: branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/model/StructuralStateManagerImpl.java
===================================================================
--- branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/model/StructuralStateManagerImpl.java 2007-11-28 00:40:25 UTC (rev 9140)
+++ branches/presentation/core-presentation/src/main/org/jboss/portal/core/presentation/model/StructuralStateManagerImpl.java 2007-11-28 00:41:54 UTC (rev 9141)
@@ -172,7 +172,7 @@
throw new StateChangeVetoException();
}
- public void update(String objectId, Map<String, String> properties) throws StateChangeVetoException
+ public void update(String objectId, Map<String, String> changes) throws StateChangeVetoException
{
throw new StateChangeVetoException();
}
Added: branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/state/DuplicateStateException.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/state/DuplicateStateException.java (rev 0)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/state/DuplicateStateException.java 2007-11-28 00:41:54 UTC (rev 9141)
@@ -0,0 +1,31 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model.state;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class DuplicateStateException extends StateException
+{
+}
Added: branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/state/NoSuchStateException.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/state/NoSuchStateException.java (rev 0)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/state/NoSuchStateException.java 2007-11-28 00:41:54 UTC (rev 9141)
@@ -0,0 +1,31 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model.state;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class NoSuchStateException extends StateException
+{
+}
Added: branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/state/StateException.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/state/StateException.java (rev 0)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/state/StateException.java 2007-11-28 00:41:54 UTC (rev 9141)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model.state;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class StateException extends RuntimeException
+{
+ public StateException()
+ {
+ }
+
+ public StateException(String s)
+ {
+ super(s);
+ }
+
+ public StateException(String s, Throwable throwable)
+ {
+ super(s, throwable);
+ }
+
+ public StateException(Throwable throwable)
+ {
+ super(throwable);
+ }
+}
Deleted: branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/state/structural/ObjectState.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/state/structural/ObjectState.java 2007-11-28 00:40:25 UTC (rev 9140)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/state/structural/ObjectState.java 2007-11-28 00:41:54 UTC (rev 9141)
@@ -1,86 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.state.structural;
-
-import org.jboss.portal.presentation.model.UIObject;
-
-import java.io.Serializable;
-import java.util.Map;
-import java.util.List;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class ObjectState implements Serializable
-{
-
- /** . */
- private final Class<? extends UIObject> type;
-
- /** . */
- private final String name;
-
- /** . */
- private final Map<String, String> properties;
-
- /** . */
- private final String parentId;
-
- /** . */
- private final List<String> childrenIds;
-
- public ObjectState(Class<? extends UIObject> type, String name, Map<String, String> properties, String parentId, List<String> childrenIds)
- {
- this.type = type;
- this.name = name;
- this.properties = properties;
- this.parentId = parentId;
- this.childrenIds = childrenIds;
- }
-
- public Class<? extends UIObject> getType()
- {
- return type;
- }
-
- public String getName()
- {
- return name;
- }
-
- public Map<String, String> getProperties()
- {
- return properties;
- }
-
- public String getParentId()
- {
- return parentId;
- }
-
- public List<String> getChildrenIds()
- {
- return childrenIds;
- }
-}
Modified: branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/state/structural/StructuralStateManager.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/state/structural/StructuralStateManager.java 2007-11-28 00:40:25 UTC (rev 9140)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/state/structural/StructuralStateManager.java 2007-11-28 00:41:54 UTC (rev 9141)
@@ -24,6 +24,8 @@
import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.model.state.StateChangeVetoException;
+import org.jboss.portal.presentation.model.state.StateException;
+import org.jboss.portal.presentation.model.state.NoSuchStateException;
import java.util.Map;
@@ -45,14 +47,65 @@
*/
StructuralState load(String objectId) throws IllegalArgumentException;
+ /**
+ * Returns the id of the root object.
+ *
+ * @return the id of the root object.
+ */
String getRootId();
- StructuralState create(String parentId, Class<? extends UIObject> type, String name, Map<String, String> properties) throws StateChangeVetoException;
+ /**
+ * Create an object.
+ *
+ * @param parentId the id of the parent object
+ * @param type the type of the child
+ * @param name the name of the child
+ * @param properties the initial properties of the child
+ * @return the structural state of the child
+ * @throws StateChangeVetoException if the creation is vetoed
+ * @throws StateException a generic state exception
+ * @throws NoSuchStateException if the parent id does not point a valid state
+ * @throws IllegalArgumentException if an argument is null or not valid
+ */
+ StructuralState create(String parentId, Class<? extends UIObject> type, String name, Map<String, String> properties) throws StateChangeVetoException, StateException, IllegalArgumentException;
- void destroy(String objectId) throws StateChangeVetoException;
+ /**
+ * Destroy a specified object.
+ *
+ * @param objectId the object id to destroy
+ * @throws StateChangeVetoException if the creation is vetoed
+ * @throws StateException a generic state exception
+ * @throws NoSuchStateException if the object id does not point a valid state
+ * @throws IllegalArgumentException if an argument is null or not valid
+ */
+ void destroy(String objectId) throws StateChangeVetoException, StateException, IllegalArgumentException;
- void move(String objectId, String parentId) throws StateChangeVetoException;
+ /**
+ * Move an object to a new parent.
+ *
+ * @param objectId the object id to move
+ * @param parentId the id of the new parent
+ * @throws StateChangeVetoException if the creation is vetoed
+ * @throws StateException a generic state exception
+ * @throws NoSuchStateException if the object id does not point a valid state
+ * @throws IllegalArgumentException if an argument is null or not valid
+ */
+ void move(String objectId, String parentId) throws StateChangeVetoException, StateException, IllegalArgumentException;
- void update(String objectId, Map<String, String> properties) throws StateChangeVetoException;
+ /**
+ * Update the state of a specified object. The <code>Map</code> values are interpreted as follow:
+ * <ul>
+ * <li>Each non null value will replace an existing value of create a new one</li>
+ * <li>Each null value will destroy an existing value</li>
+ * </ul>
+ *
+ * @param objectId the id of the object to udpate
+ * @param changes the changes
+ * @throws StateChangeVetoException if the creation is vetoed
+ * @throws StateException a generic state exception
+ * @throws NoSuchStateException if the object id does not point a valid state
+ * @throws IllegalArgumentException if an argument is null or not valid
+ */
+ void update(String objectId, Map<String, String> changes) throws StateChangeVetoException, StateException, IllegalArgumentException;
}
16 years, 7 months
JBoss Portal SVN: r9140 - in branches/JBoss_Portal_Branch_2_6/core-admin/src: resources/portal-admin-war/WEB-INF and 1 other directories.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2007-11-27 19:40:25 -0500 (Tue, 27 Nov 2007)
New Revision: 9140
Modified:
branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PortalObjectDisplayNameAction.java
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/displayNameObject.xhtml
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPage.xhtml
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml
Log:
JBPORTAL-1805 Let a user define multiple display-name for a portal object in the admin portlet
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PortalObjectDisplayNameAction.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PortalObjectDisplayNameAction.java 2007-11-28 00:13:09 UTC (rev 9139)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PortalObjectDisplayNameAction.java 2007-11-28 00:40:25 UTC (rev 9140)
@@ -56,11 +56,13 @@
private String displayNameByLocale;
- public void addDisplayName() throws ConversionException {
+ public void addDisplayName() throws ConversionException
+ {
- if (newText != null)
+ if (newText != null || newText.equals(""))
{
- if (bean instanceof PortalObjectManagerBean) {
+ if (bean instanceof PortalObjectManagerBean)
+ {
selectedObject = ((PortalObjectManagerBean) bean).getSelectedObject();
}
Locale locale = LocaleFormat.DEFAULT.getLocale(newLocale);
@@ -76,52 +78,63 @@
}
- public PortalObject getSelectedObject() {
+ public PortalObject getSelectedObject()
+ {
return selectedObject;
}
- public void setSelectedObject(PortalObject selectedObject) {
+ public void setSelectedObject(PortalObject selectedObject)
+ {
this.selectedObject = selectedObject;
}
- public String getNewText() {
+ public String getNewText()
+ {
return newText;
}
- public void setNewText(String newText) {
+ public void setNewText(String newText)
+ {
this.newText = newText;
}
- public SortedMap getLocales() {
+ public SortedMap getLocales()
+ {
SortedMap set = new TreeMap();
Locale[] localList = (Locale[]) LocaleManager.getLocales().toArray(new Locale[0]);
- for (int i = 0; i < localList.length; i++) {
+ for (int i = 0; i < localList.length; i++)
+ {
Locale thisLocale = localList[i];
set.put(thisLocale.getLanguage(), thisLocale.getLanguage());
}
return set;
}
- public void setLocales(SortedMap locales) {
+ public void setLocales(SortedMap locales)
+ {
this.locales = locales;
}
- public String getNewLocale() {
+ public String getNewLocale()
+ {
return newLocale;
}
- public void setNewLocale(String newLocale) {
+ public void setNewLocale(String newLocale)
+ {
this.newLocale = newLocale;
}
public Map getCurrentLocales()
{
- if (selectedObject != null && selectedObject.getDisplayName() != null) {
+ if (selectedObject != null && selectedObject.getDisplayName() != null)
+ {
currentLocales = new HashMap();
Map displayNames = selectedObject.getDisplayName().getValues();
Iterator it = displayNames.entrySet().iterator();
- while (it.hasNext()) {
+ while (it.hasNext())
+ {
Map.Entry pairs = (Map.Entry) it.next();
Locale thisLocale = (Locale)pairs.getKey();
currentLocales.put(thisLocale.getLanguage(),getDisplayNameByLocale(thisLocale));
@@ -131,12 +144,19 @@
return null;
}
- public String getDisplayNameByLocale(Locale locale) {
+ public String getDisplayNameByLocale(Locale locale)
+ {
Map displayNames = selectedObject.getDisplayName().getValues();
LocalizedString.Value lsv = (LocalizedString.Value)displayNames.get(locale);
return lsv.getString();
}
+ public String editDisplayNames() throws ConversionException
+ {
+ getCurrentLocales();
+ return "editDisplayNames";
+ }
+
}
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-11-28 00:13:09 UTC (rev 9139)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-11-28 00:40:25 UTC (rev 9140)
@@ -309,18 +309,10 @@
<managed-bean-name>addDisplayNameAction</managed-bean-name>
<managed-bean-class>org.jboss.portal.core.admin.ui.actions.PortalObjectDisplayNameAction</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
- <!--<managed-property>
- <property-name>pageContainer</property-name>
- <value>#{portalobjectmgr.selectedObject}</value>
- </managed-property>-->
<managed-property>
<property-name>bean</property-name>
<value>#{portalobjectmgr}</value>
</managed-property>
- <!--<managed-property>
- <property-name>domainConfigurator</property-name>
- <value>#{applicationScope.AuthorizationDomainRegistry.portalobject.configurator}</value>
- </managed-property>-->
</managed-bean>
<managed-bean>
@@ -430,7 +422,7 @@
<to-view-id>/WEB-INF/jsf/renameObject.xhtml</to-view-id>
</navigation-case>
<navigation-case>
- <from-outcome>setDisplayName</from-outcome>
+ <from-outcome>editDisplayNames</from-outcome>
<to-view-id>/WEB-INF/jsf/displayNameObject.xhtml</to-view-id>
</navigation-case>
<navigation-case>
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/displayNameObject.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/displayNameObject.xhtml 2007-11-28 00:13:09 UTC (rev 9139)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/displayNameObject.xhtml 2007-11-28 00:40:25 UTC (rev 9140)
@@ -9,17 +9,25 @@
<ui:define name="content">
<h3>Add Display Name</h3>
<h:form id="displayNameForm">
- <h:messages/>
+
+ <p class="portlet-area-header">Current Display Names</p>
+ <div class="portlet-area-body">
<c:forEach items="#{addDisplayNameAction.currentLocales}" var="locale">
- #{locale} - #{locale}<br/>
+ <ui:remove>
+ <!--We should be able to do something like with el-->
+ #{locale.key} - #{locale.value}
+ </ui:remove>
+ #{locale}<br/>
</c:forEach>
- <p>
+ </div>
+ <p class="portlet-area-header">Add Display Names</p>
+ <div class="portlet-area-body">
<h:inputText id="newName" value="#{addDisplayNameAction.newText}"/>
<h:selectOneMenu id="locales" value="#{addDisplayNameAction.newLocale}">
<f:selectItems value="#{addDisplayNameAction.locales}"/>
</h:selectOneMenu>
<h:commandButton value="Add Name" action="#{addDisplayNameAction.addDisplayName}" styleClass="portlet-form-button"/>
- </p>
+ </div>
</h:form>
</ui:define>
</ui:composition>
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPage.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPage.xhtml 2007-11-28 00:13:09 UTC (rev 9139)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPage.xhtml 2007-11-28 00:40:25 UTC (rev 9140)
@@ -39,7 +39,7 @@
</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.name == 'default')))}"><h:commandLink
- action="setDisplayName" actionListener="#{portalobjectmgr.selectObject}" styleClass="actionDisplayName">
+ action="#{addDisplayNameAction.editDisplayNames}" actionListener="#{portalobjectmgr.selectObject}" styleClass="actionDisplayName">
<f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
Display Names
</h:commandLink> | </h:panelGroup><h:commandLink action="confirm" styleClass="actionDelete"
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml 2007-11-28 00:13:09 UTC (rev 9139)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml 2007-11-28 00:40:25 UTC (rev 9140)
@@ -48,7 +48,7 @@
</h:panelGroup>
<h:panelGroup
rendered="#{(object.name != 'admin') and (object.name != 'template') and (object.name != 'default')}">
- | <h:commandLink action="setDisplayName" actionListener="#{portalobjectmgr.selectObject}">
+ | <h:commandLink action="#{addDisplayNameAction.editDisplayNames}" actionListener="#{portalobjectmgr.selectObject}">
<h:outputText value="Display Names"/>
<f:param name="id" value="#{object.id}"/>
</h:commandLink>
@@ -107,7 +107,7 @@
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{object.id}"/>
Rename
- </h:commandLink> | <h:commandLink action="setDisplayName" styleClass="actionRename"
+ </h:commandLink> | <h:commandLink action="#{addDisplayNameAction.editDisplayNames}" styleClass="actionRename"
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{object.id}"/>
Display Names
@@ -187,7 +187,7 @@
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{object.id}"/>
Rename
- </h:commandLink> | <h:commandLink action="setDisplayName" styleClass="actionRename"
+ </h:commandLink> | <h:commandLink action="#{addDisplayNameAction.editDisplayNames}" styleClass="actionRename"
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{object.id}"/>
Display Names
16 years, 7 months
JBoss Portal SVN: r9139 - in branches/JBoss_Portal_Branch_2_6: core/src/resources/portal-core-war/WEB-INF/jsp/header and 6 other directories.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2007-11-27 19:13:09 -0500 (Tue, 27 Nov 2007)
New Revision: 9139
Added:
branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/css/
branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/css/style.css
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/displayNameObject.xhtml
Removed:
branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/style.css
Modified:
branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PortalObjectDisplayNameAction.java
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jboss-portlet.xml
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPage.xhtml
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/newWindowTpl.xhtml
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp
Log:
JBPORTAL-1805 Let a user define multiple display-name for a portal object in the admin portlet
Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2007-11-27 20:56:08 UTC (rev 9138)
+++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2007-11-28 00:13:09 UTC (rev 9139)
@@ -158,7 +158,12 @@
{
throw new IllegalArgumentException("No null display name accepted");
}
- displayNames = new HashMap();
+
+ if (displayNames == null)
+ {
+ displayNames = new HashMap();
+ }
+
Map map = displayName.getValues();
Iterator it = map.values().iterator();
while (it.hasNext())
Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp 2007-11-27 20:56:08 UTC (rev 9138)
+++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp 2007-11-28 00:13:09 UTC (rev 9139)
@@ -22,7 +22,6 @@
}else{
document.write('<a href=\"<%= loginURL %>\">Login</a>');
}
-
</script>
<noscript>
Copied: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/css/style.css (from rev 9042, branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/style.css)
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/css/style.css (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/css/style.css 2007-11-28 00:13:09 UTC (rev 9139)
@@ -0,0 +1,507 @@
+/* Redefine spacing for tables. */
+
+a {
+ color: #446688;
+ text-decoration: none;
+}
+
+a:hover {
+ color: #5078aa;
+ text-decoration: underline;
+}
+
+div.admin-ui div.tab-container {
+ border-bottom: 1px solid #B3C0C7;
+ border-right: 1px solid #B3C0C7;
+ border-left: 1px solid #B3C0C7;
+ padding: 15px 0 10px 0;
+}
+
+.admin-ui table {
+ border: 0;
+}
+
+.admin-ui th {
+ text-align: left;
+ border: 0;
+ border-bottom: 1px solid;
+ padding-bottom: 2px;
+ padding-top: 2px;
+ font-size: 11px;
+}
+
+.admin-ui td {
+ padding-bottom: 2px;
+ padding-top: 2px;
+}
+
+/* Pagination. */
+
+.admin-ui ul.pagination {
+ margin: 0;
+ padding: .2em;
+}
+
+.admin-ui ul.pagination li {
+ text-align: center;
+ list-style-type: none;
+ display: inline;
+ margin-right: 2px;
+}
+
+.admin-ui ul.pagination li.selected {
+ font-weight: bold;
+ background-color: #eef;
+ border-bottom: 2px solid #656565;
+}
+
+.pagination a, .pagination a:visited, .pagination a:hover {
+ text-decoration: none;
+}
+
+/* Top nav. */
+
+.admin-ui ul.topnav {
+ padding: 4px 0px 3px;
+ border-bottom: 1px solid #b3c0c7;
+ margin: 0;
+}
+
+.admin-ui ul.topnav li {
+ list-style-type: none;
+ display: inline;
+ margin: 0;
+ padding: 3px 0.5em;
+ margin-left: 5px;
+ border: 1px solid #b3c0c7;
+ border-bottom: none;
+ background-color: #f2f4f5;
+}
+
+.admin-ui ul.topnav li:hover {
+ background-color: #fff;
+}
+
+.admin-ui ul.topnav li#currentTab {
+ background-color: white;
+ border-bottom: 1px solid white;
+}
+
+.admin-ui ul.topnav li#currentTab a:hover {
+}
+
+/* Object path. */
+
+.admin-ui ul.objectpath {
+ list-style-type: none;
+ font-size: 11px;
+ border: solid 1px #bbb;
+ border-left: solid 1px #eee;
+ border-right: solid 1px #eee;
+ background-color: #d5d5d5;
+ background-image: url( ../img/pathBackground.png );
+ background-position: left;
+ background-repeat: repeat-x;
+ height: 21px;
+ margin: 0px;
+ padding: 0px;
+ padding-left: 2px;
+}
+
+.admin-ui ul.objectpath li {
+ list-style-type: none;
+ display: block;
+ float: left;
+}
+
+.admin-ui ul li.pathItem {
+ padding-top: 4px;
+ padding-left: 3px;
+ padding-right: 2px;
+}
+
+/*
+.admin-ui ul.li.pathSeparator {
+ background-image: url(img/pathSeparator.png);
+ background-position: center center;
+ background-repeat: no-repeat;
+ width: 7px;
+}
+*/
+
+.admin-ui ul.objectpath li.selected {
+ font-weight: bold;
+ padding-top: 4px;
+ padding-left: 3px;
+ padding-right: 2px;
+}
+
+.admin-ui ul.objectpath a {
+ color: #333333;
+ text-decoration: none;
+}
+
+.admin-ui ul.objectpath a:hover {
+ color: #5078aa;
+ text-decoration: none;
+}
+
+/* Resize combo lists */
+.admin-ui select {
+ padding: 2px 4px 2px 1px;
+}
+
+.admin-ui select.contentType {
+ width: 8em;
+}
+
+.admin-ui select.instanceList {
+ width: 11em;
+}
+
+.admin-ui select.windowList {
+ width: 95%;
+ overflow: auto;
+}
+
+/* Style a table for form layout */
+.admin-ui table form {
+ margin: 0;
+}
+
+.admin-ui table form td.label {
+ text-align: right;
+ vertical-align: top;
+ padding-top: 0.4em;
+}
+
+.admin-ui table form td.widget {
+ text-align: left;
+}
+
+/* Area header. */
+
+.admin-ui .portlet-area-header {
+ border: 1px solid #54708c;
+ font-weight: bold;
+ color: #fff;
+ font-size: 11px;
+ background-color: #5986b3;
+ padding: 2px;
+ padding-left: 4px;
+ margin: 0;
+}
+
+.admin-ui .portlet-area-body {
+ border: 1px solid #d5d5d5;
+ border-top: 0px;
+ background-color: #fff;
+ padding: 4px;
+ margin: 0;
+}
+
+/* Styles updated and enhanced from the main portal css */
+
+.admin-ui th.portlet-section-title {
+ font-weight: bold;
+ color: #656565;
+ font-size: 11px;
+ border: 1px solid #999;
+ background-color: #ebf2f5;
+ padding-left: 6px;
+}
+
+.admin-ui h3.sectionTitle {
+ font-weight: bold;
+ color: #656565;
+ font-size: 11px;
+ border-top: 1px solid #999;
+ background-color: #ebf2f5;
+ padding: 2px;
+ padding-left: 4px;
+}
+
+.admin-ui .portlet-section-header {
+ background-image: url( ../img/pathBackground.png );
+ background-position: left;
+ background-repeat: repeat-x;
+ font-weight: bold;
+ color: #656565;
+ font-size: 10px;
+ border-top: 1px solid #ddd;
+ border-bottom: 1px solid #999;
+ padding-left: 4px;
+}
+
+.admin-ui .portlet-section-header th {
+ background-image: url( ../img/pathBackground.png );
+ background-position: left;
+ background-repeat: repeat-x;
+ font-weight: bold;
+ color: #656565;
+ font-size: 10px;
+ border-top: 1px solid #ddd;
+ border-bottom: 1px solid #999;
+ padding-left: 4px;
+}
+
+.admin-ui .portlet-section-body {
+ color: #656565;
+ border: 1px solid #d5d5d5;
+ border-top: 0px;
+}
+
+.admin-ui .portlet-section-alternate {
+ background-color: #F2F2F2;
+ border: 1px solid #d5d5d5;
+}
+
+.admin-ui .portlet-section-selected {
+ background-color: #CBD4E6;
+}
+
+.admin-ui .actionDetails {
+ background-image: url( ../img/actionIcon_Details.gif );
+ background-position: left;
+ background-repeat: no-repeat;
+ line-height: 14px;
+ padding-left: 18px;
+ white-space: nowrap;
+}
+
+.admin-ui .actionLayout {
+ background-image: url( ../img/actionIcon_Layout.gif );
+ background-position: left;
+ background-repeat: no-repeat;
+ line-height: 14px;
+ padding-left: 18px;
+ white-space: nowrap;
+}
+
+.admin-ui .actionSecurity {
+ background-image: url( ../img/actionIcon_Security.gif );
+ background-position: left;
+ background-repeat: no-repeat;
+ line-height: 14px;
+ padding-left: 18px;
+ white-space: nowrap;
+}
+
+.admin-ui .actionProperties {
+ background-image: url( ../img/actionIcon_Properties.gif );
+ background-position: left;
+ background-repeat: no-repeat;
+ padding-top: 2px;
+ padding-bottom: 2px;
+ padding-left: 18px;
+ white-space: nowrap;
+ height: 22px;
+}
+
+.admin-ui .actionTheme {
+ background-image: url( ../img/actionIcon_Theme.gif );
+ background-position: left;
+ background-repeat: no-repeat;
+ padding-top: 2px;
+ padding-bottom: 2px;
+ line-height: 18px;
+ padding-left: 18px;
+ white-space: nowrap;
+}
+
+.admin-ui .actionRename {
+ background-image: url( ../img/actionIcon_Rename.gif );
+ background-position: left;
+ background-repeat: no-repeat;
+ padding-top: 2px;
+ padding-bottom: 2px;
+ line-height: 18px;
+ padding-left: 18px;
+ white-space: nowrap;
+}
+
+.admin-ui .actionDelete {
+ background-image: url( ../img/actionIcon_Delete.gif );
+ background-position: left;
+ background-repeat: no-repeat;
+ padding-top: 2px;
+ padding-bottom: 2px;
+ line-height: 18px;
+ padding-left: 18px;
+ white-space: nowrap;
+}
+
+.admin-ui .actionMakeDefault {
+ background-image: url( ../img/actionIcon_MakeDefault.gif );
+ background-position: left;
+ background-repeat: no-repeat;
+ padding-top: 2px;
+ padding-bottom: 2px;
+ line-height: 18px;
+ padding-left: 18px;
+ white-space: nowrap;
+}
+
+.admin-ui .actionDefault {
+ background-image: url( ../img/actionIcon_IsDefault.gif );
+ background-position: left;
+ background-repeat: no-repeat;
+ padding-top: 2px;
+ padding-bottom: 2px;
+ line-height: 18px;
+ padding-left: 18px;
+ white-space: nowrap;
+}
+
+.admin-ui .actionPreferences {
+ background-image: url( ../img/actionIcon_Properties.gif );
+ background-position: left;
+ background-repeat: no-repeat;
+ padding-top: 2px;
+ padding-bottom: 2px;
+ line-height: 18px;
+ padding-left: 18px;
+ white-space: nowrap;
+}
+
+.admin-ui .actionCreateInstance {
+ background-image: url( ../img/actionIcon_CreateInstance.gif );
+ background-position: left;
+ background-repeat: no-repeat;
+ padding-top: 2px;
+ padding-bottom: 2px;
+ line-height: 18px;
+ padding-left: 18px;
+ white-space: nowrap;
+}
+
+.admin-ui .portlet-content-center {
+ padding: 0;
+ margin: 0;
+}
+
+.admin-ui .portlet-body {
+ padding: 0;
+ margin: 0;
+}
+
+.admin-ui .portlet-content-right {
+ padding: 0;
+ margin: 0;
+}
+
+.admin-ui .portlet-footer-left {
+ padding: 0;
+ margin: 0;
+}
+
+.admin-ui .portlet-table-header {
+ background-color: #eef;
+}
+
+.admin-ui .portlet-section-buttonrow {
+ margin-top: 6px;
+ margin-bottom: 6px;
+ float: right;
+}
+
+/* Change dashed line to solid. */
+
+.admin-ui hr {
+ border-top-style: solid;
+}
+
+div.admin-ui div.wizard-tab-container {
+ border-bottom: 1px solid #B3C0C7;
+ border-right: 1px solid #B3C0C7;
+ border-left: 1px solid #B3C0C7;
+ padding: 0 0 10px 0;
+ margin: 10px 0 0 0;
+}
+
+.admin-ui .wizardStepBox {
+ display: inline;
+ float: left;
+ border: 1px solid #98B7C6;
+ height: 7em;
+ width: 9em;
+ background-color: #DFE8ED;
+ margin: .5em;
+}
+
+.admin-ui .wizardButtonBox {
+ margin: 1em;
+}
+
+.admin-ui .wizardContent {
+ clear: both;
+}
+
+.admin-ui form {
+ padding: 0;
+ margin: 0;
+}
+
+.admin-ui #selected.wizardStepBox {
+ background-color: #C8DCC4;
+ border: 1px solid black;
+ border-bottom: 5px solid black;
+}
+
+.admin-ui .stepNumber {
+ font-size: 2em;
+ text-align: center;
+ margin-top: 5px;
+ margin-bottom: 0;
+}
+
+.admin-ui .stepText {
+ text-align: center;
+}
+
+.admin-ui .layout-button {
+ width: 50px;
+ margin: 2px;
+ padding: 2px;
+}
+
+.admin-ui .createObjectForm {
+ display: block;
+ padding: 1em 0 0 0;
+}
+
+.admin-ui .objectList {
+ width: 100%;
+}
+
+.admin-ui .objectList .objectNameColumn {
+ width: 25%;
+}
+
+.admin-ui .objectList .objectActionColumn {
+ width: 75%;
+}
+
+.admin-ui .portlet-msg {
+ border: 1px solid #bbb;
+ margin: 2em auto;
+ padding: 1em;
+ width: 60%;
+}
+
+.admin-ui .portlet-msg-body {
+ position: relative;
+ top: -3em;
+ left: 3em;
+ width: 95%;
+}
+
+.admin-label {
+ padding: 0 4px 3px 0;
+ display: inline-block;
+ vertical-align: middle;
+}
+
+.admin-ui .objectList img.windowStateIcon {
+ margin: 0 5px 0 0;
+}
Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/css/style.css
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ LastChangedDate LastChangedBy LastChangedRevision Id
Deleted: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/style.css
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/style.css 2007-11-27 20:56:08 UTC (rev 9138)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/style.css 2007-11-28 00:13:09 UTC (rev 9139)
@@ -1,507 +0,0 @@
-/* Redefine spacing for tables. */
-
-a {
- color: #446688;
- text-decoration: none;
-}
-
-a:hover {
- color: #5078aa;
- text-decoration: underline;
-}
-
-div.admin-ui div.tab-container {
- border-bottom: 1px solid #B3C0C7;
- border-right: 1px solid #B3C0C7;
- border-left: 1px solid #B3C0C7;
- padding: 15px 0 10px 0;
-}
-
-.admin-ui table {
- border: 0;
-}
-
-.admin-ui th {
- text-align: left;
- border: 0;
- border-bottom: 1px solid;
- padding-bottom: 2px;
- padding-top: 2px;
- font-size: 11px;
-}
-
-.admin-ui td {
- padding-bottom: 2px;
- padding-top: 2px;
-}
-
-/* Pagination. */
-
-.admin-ui ul.pagination {
- margin: 0;
- padding: .2em;
-}
-
-.admin-ui ul.pagination li {
- text-align: center;
- list-style-type: none;
- display: inline;
- margin-right: 2px;
-}
-
-.admin-ui ul.pagination li.selected {
- font-weight: bold;
- background-color: #eef;
- border-bottom: 2px solid #656565;
-}
-
-.pagination a, .pagination a:visited, .pagination a:hover {
- text-decoration: none;
-}
-
-/* Top nav. */
-
-.admin-ui ul.topnav {
- padding: 4px 0px 3px;
- border-bottom: 1px solid #b3c0c7;
- margin: 0;
-}
-
-.admin-ui ul.topnav li {
- list-style-type: none;
- display: inline;
- margin: 0;
- padding: 3px 0.5em;
- margin-left: 5px;
- border: 1px solid #b3c0c7;
- border-bottom: none;
- background-color: #f2f4f5;
-}
-
-.admin-ui ul.topnav li:hover {
- background-color: #fff;
-}
-
-.admin-ui ul.topnav li#currentTab {
- background-color: white;
- border-bottom: 1px solid white;
-}
-
-.admin-ui ul.topnav li#currentTab a:hover {
-}
-
-/* Object path. */
-
-.admin-ui ul.objectpath {
- list-style-type: none;
- font-size: 11px;
- border: solid 1px #bbb;
- border-left: solid 1px #eee;
- border-right: solid 1px #eee;
- background-color: #d5d5d5;
- background-image: url( img/pathBackground.png );
- background-position: left;
- background-repeat: repeat-x;
- height: 21px;
- margin: 0px;
- padding: 0px;
- padding-left: 2px;
-}
-
-.admin-ui ul.objectpath li {
- list-style-type: none;
- display: block;
- float: left;
-}
-
-.admin-ui ul li.pathItem {
- padding-top: 4px;
- padding-left: 3px;
- padding-right: 2px;
-}
-
-/*
-.admin-ui ul.li.pathSeparator {
- background-image: url(img/pathSeparator.png);
- background-position: center center;
- background-repeat: no-repeat;
- width: 7px;
-}
-*/
-
-.admin-ui ul.objectpath li.selected {
- font-weight: bold;
- padding-top: 4px;
- padding-left: 3px;
- padding-right: 2px;
-}
-
-.admin-ui ul.objectpath a {
- color: #333333;
- text-decoration: none;
-}
-
-.admin-ui ul.objectpath a:hover {
- color: #5078aa;
- text-decoration: none;
-}
-
-/* Resize combo lists */
-.admin-ui select {
- padding: 2px 4px 2px 1px;
-}
-
-.admin-ui select.contentType {
- width: 8em;
-}
-
-.admin-ui select.instanceList {
- width: 11em;
-}
-
-.admin-ui select.windowList {
- width: 95%;
- overflow: auto;
-}
-
-/* Style a table for form layout */
-.admin-ui table form {
- margin: 0;
-}
-
-.admin-ui table form td.label {
- text-align: right;
- vertical-align: top;
- padding-top: 0.4em;
-}
-
-.admin-ui table form td.widget {
- text-align: left;
-}
-
-/* Area header. */
-
-.admin-ui .portlet-area-header {
- border: 1px solid #54708c;
- font-weight: bold;
- color: #fff;
- font-size: 11px;
- background-color: #5986b3;
- padding: 2px;
- padding-left: 4px;
- margin: 0;
-}
-
-.admin-ui .portlet-area-body {
- border: 1px solid #d5d5d5;
- border-top: 0px;
- background-color: #fff;
- padding: 4px;
- margin: 0;
-}
-
-/* Styles updated and enhanced from the main portal css */
-
-.admin-ui th.portlet-section-title {
- font-weight: bold;
- color: #656565;
- font-size: 11px;
- border: 1px solid #999;
- background-color: #ebf2f5;
- padding-left: 6px;
-}
-
-.admin-ui h3.sectionTitle {
- font-weight: bold;
- color: #656565;
- font-size: 11px;
- border-top: 1px solid #999;
- background-color: #ebf2f5;
- padding: 2px;
- padding-left: 4px;
-}
-
-.admin-ui .portlet-section-header {
- background-image: url( img/pathBackground.png );
- background-position: left;
- background-repeat: repeat-x;
- font-weight: bold;
- color: #656565;
- font-size: 10px;
- border-top: 1px solid #ddd;
- border-bottom: 1px solid #999;
- padding-left: 4px;
-}
-
-.admin-ui .portlet-section-header th {
- background-image: url( img/pathBackground.png );
- background-position: left;
- background-repeat: repeat-x;
- font-weight: bold;
- color: #656565;
- font-size: 10px;
- border-top: 1px solid #ddd;
- border-bottom: 1px solid #999;
- padding-left: 4px;
-}
-
-.admin-ui .portlet-section-body {
- color: #656565;
- border: 1px solid #d5d5d5;
- border-top: 0px;
-}
-
-.admin-ui .portlet-section-alternate {
- background-color: #F2F2F2;
- border: 1px solid #d5d5d5;
-}
-
-.admin-ui .portlet-section-selected {
- background-color: #CBD4E6;
-}
-
-.admin-ui .actionDetails {
- background-image: url( img/actionIcon_Details.gif );
- background-position: left;
- background-repeat: no-repeat;
- line-height: 14px;
- padding-left: 18px;
- white-space: nowrap;
-}
-
-.admin-ui .actionLayout {
- background-image: url( img/actionIcon_Layout.gif );
- background-position: left;
- background-repeat: no-repeat;
- line-height: 14px;
- padding-left: 18px;
- white-space: nowrap;
-}
-
-.admin-ui .actionSecurity {
- background-image: url( img/actionIcon_Security.gif );
- background-position: left;
- background-repeat: no-repeat;
- line-height: 14px;
- padding-left: 18px;
- white-space: nowrap;
-}
-
-.admin-ui .actionProperties {
- background-image: url( img/actionIcon_Properties.gif );
- background-position: left;
- background-repeat: no-repeat;
- padding-top: 2px;
- padding-bottom: 2px;
- padding-left: 18px;
- white-space: nowrap;
- height: 22px;
-}
-
-.admin-ui .actionTheme {
- background-image: url( img/actionIcon_Theme.gif );
- background-position: left;
- background-repeat: no-repeat;
- padding-top: 2px;
- padding-bottom: 2px;
- line-height: 18px;
- padding-left: 18px;
- white-space: nowrap;
-}
-
-.admin-ui .actionRename {
- background-image: url( img/actionIcon_Rename.gif );
- background-position: left;
- background-repeat: no-repeat;
- padding-top: 2px;
- padding-bottom: 2px;
- line-height: 18px;
- padding-left: 18px;
- white-space: nowrap;
-}
-
-.admin-ui .actionDelete {
- background-image: url( img/actionIcon_Delete.gif );
- background-position: left;
- background-repeat: no-repeat;
- padding-top: 2px;
- padding-bottom: 2px;
- line-height: 18px;
- padding-left: 18px;
- white-space: nowrap;
-}
-
-.admin-ui .actionMakeDefault {
- background-image: url( img/actionIcon_MakeDefault.gif );
- background-position: left;
- background-repeat: no-repeat;
- padding-top: 2px;
- padding-bottom: 2px;
- line-height: 18px;
- padding-left: 18px;
- white-space: nowrap;
-}
-
-.admin-ui .actionDefault {
- background-image: url( img/actionIcon_IsDefault.gif );
- background-position: left;
- background-repeat: no-repeat;
- padding-top: 2px;
- padding-bottom: 2px;
- line-height: 18px;
- padding-left: 18px;
- white-space: nowrap;
-}
-
-.admin-ui .actionPreferences {
- background-image: url( img/actionIcon_Properties.gif );
- background-position: left;
- background-repeat: no-repeat;
- padding-top: 2px;
- padding-bottom: 2px;
- line-height: 18px;
- padding-left: 18px;
- white-space: nowrap;
-}
-
-.admin-ui .actionCreateInstance {
- background-image: url( img/actionIcon_CreateInstance.gif );
- background-position: left;
- background-repeat: no-repeat;
- padding-top: 2px;
- padding-bottom: 2px;
- line-height: 18px;
- padding-left: 18px;
- white-space: nowrap;
-}
-
-.admin-ui .portlet-content-center {
- padding: 0;
- margin: 0;
-}
-
-.admin-ui .portlet-body {
- padding: 0;
- margin: 0;
-}
-
-.admin-ui .portlet-content-right {
- padding: 0;
- margin: 0;
-}
-
-.admin-ui .portlet-footer-left {
- padding: 0;
- margin: 0;
-}
-
-.admin-ui .portlet-table-header {
- background-color: #eef;
-}
-
-.admin-ui .portlet-section-buttonrow {
- margin-top: 6px;
- margin-bottom: 6px;
- float: right;
-}
-
-/* Change dashed line to solid. */
-
-.admin-ui hr {
- border-top-style: solid;
-}
-
-div.admin-ui div.wizard-tab-container {
- border-bottom: 1px solid #B3C0C7;
- border-right: 1px solid #B3C0C7;
- border-left: 1px solid #B3C0C7;
- padding: 0 0 10px 0;
- margin: 10px 0 0 0;
-}
-
-.admin-ui .wizardStepBox {
- display: inline;
- float: left;
- border: 1px solid #98B7C6;
- height: 7em;
- width: 9em;
- background-color: #DFE8ED;
- margin: .5em;
-}
-
-.admin-ui .wizardButtonBox {
- margin: 1em;
-}
-
-.admin-ui .wizardContent {
- clear: both;
-}
-
-.admin-ui form {
- padding: 0;
- margin: 0;
-}
-
-.admin-ui #selected.wizardStepBox {
- background-color: #C8DCC4;
- border: 1px solid black;
- border-bottom: 5px solid black;
-}
-
-.admin-ui .stepNumber {
- font-size: 2em;
- text-align: center;
- margin-top: 5px;
- margin-bottom: 0;
-}
-
-.admin-ui .stepText {
- text-align: center;
-}
-
-.admin-ui .layout-button {
- width: 50px;
- margin: 2px;
- padding: 2px;
-}
-
-.admin-ui .createObjectForm {
- display: block;
- padding: 1em 0 0 0;
-}
-
-.admin-ui .objectList {
- width: 100%;
-}
-
-.admin-ui .objectList .objectNameColumn {
- width: 25%;
-}
-
-.admin-ui .objectList .objectActionColumn {
- width: 75%;
-}
-
-.admin-ui .portlet-msg {
- border: 1px solid #bbb;
- margin: 2em auto;
- padding: 1em;
- width: 60%;
-}
-
-.admin-ui .portlet-msg-body {
- position: relative;
- top: -3em;
- left: 3em;
- width: 95%;
-}
-
-.admin-label {
- padding: 0 4px 3px 0;
- display: inline-block;
- vertical-align: middle;
-}
-
-.admin-ui .objectList img.windowStateIcon {
- margin: 0 5px 0 0;
-}
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PortalObjectDisplayNameAction.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PortalObjectDisplayNameAction.java 2007-11-27 20:56:08 UTC (rev 9138)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PortalObjectDisplayNameAction.java 2007-11-28 00:13:09 UTC (rev 9139)
@@ -22,34 +22,121 @@
******************************************************************************/
package org.jboss.portal.core.admin.ui.actions;
-import java.util.Locale;
-import java.util.Map;
-
+import org.jboss.portal.common.i18n.LocaleFormat;
+import org.jboss.portal.common.i18n.LocaleManager;
import org.jboss.portal.common.i18n.LocalizedString;
+import org.jboss.portal.common.util.ConversionException;
+import org.jboss.portal.core.admin.ui.PortalObjectManagerBean;
+import org.jboss.portal.core.impl.model.portal.PortalObjectImpl;
import org.jboss.portal.core.model.portal.PortalObject;
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+import java.util.*;
+
/**
* @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @author <a href="mailto:whales@redhat.com">Wesley Hales</a>
* @version $Revision$
*/
-public class PortalObjectDisplayNameAction
-{
+public class PortalObjectDisplayNameAction {
private PortalObject selectedObject;
-
- private Locale newLocale;
-
+
+ public Object bean;
+
+ private String newLocale;
+
private String newText;
-
- public void addDisplayName()
+
+ private SortedMap locales;
+
+ private Map currentLocales;
+
+ private String displayNameByLocale;
+
+
+ public void addDisplayName() throws ConversionException {
+
+ if (newText != null)
+ {
+ if (bean instanceof PortalObjectManagerBean) {
+ selectedObject = ((PortalObjectManagerBean) bean).getSelectedObject();
+ }
+ Locale locale = LocaleFormat.DEFAULT.getLocale(newLocale);
+ Map map = new HashMap();
+ LocalizedString.Value lsv = new LocalizedString.Value(locale, newText);
+ map.put(locale, lsv.getString());
+ LocalizedString newLocalizedString = new LocalizedString(map, Locale.ENGLISH);
+ selectedObject.setDisplayName(newLocalizedString);
+ }else{
+ FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, "You must enter a name", "You must enter a name");
+ FacesContext.getCurrentInstance().addMessage("status", message);
+ }
+
+ }
+
+ public PortalObject getSelectedObject() {
+ return selectedObject;
+ }
+
+ public void setSelectedObject(PortalObject selectedObject) {
+ this.selectedObject = selectedObject;
+ }
+
+ public String getNewText() {
+ return newText;
+ }
+
+ public void setNewText(String newText) {
+ this.newText = newText;
+ }
+
+ public SortedMap getLocales() {
+ SortedMap set = new TreeMap();
+ Locale[] localList = (Locale[]) LocaleManager.getLocales().toArray(new Locale[0]);
+
+ for (int i = 0; i < localList.length; i++) {
+ Locale thisLocale = localList[i];
+ set.put(thisLocale.getLanguage(), thisLocale.getLanguage());
+ }
+ return set;
+ }
+
+ public void setLocales(SortedMap locales) {
+ this.locales = locales;
+ }
+
+ public String getNewLocale() {
+ return newLocale;
+ }
+
+ public void setNewLocale(String newLocale) {
+ this.newLocale = newLocale;
+ }
+
+ public Map getCurrentLocales()
{
- LocalizedString localizedString = selectedObject.getDisplayName();
- Map map = localizedString.getValues();
- map.put(newLocale, new LocalizedString.Value(newLocale, newText));
- LocalizedString newLocalizedString = new LocalizedString(map, Locale.ENGLISH);
- selectedObject.setDisplayName(newLocalizedString);
+ if (selectedObject != null && selectedObject.getDisplayName() != null) {
+ currentLocales = new HashMap();
+ Map displayNames = selectedObject.getDisplayName().getValues();
+ Iterator it = displayNames.entrySet().iterator();
+ while (it.hasNext()) {
+ Map.Entry pairs = (Map.Entry) it.next();
+ Locale thisLocale = (Locale)pairs.getKey();
+ currentLocales.put(thisLocale.getLanguage(),getDisplayNameByLocale(thisLocale));
+ }
+ return currentLocales;
+ }
+ return null;
}
-
-
+
+ public String getDisplayNameByLocale(Locale locale) {
+ Map displayNames = selectedObject.getDisplayName().getValues();
+ LocalizedString.Value lsv = (LocalizedString.Value)displayNames.get(locale);
+ return lsv.getString();
+ }
+
+
}
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-11-27 20:56:08 UTC (rev 9138)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-11-28 00:13:09 UTC (rev 9139)
@@ -306,6 +306,24 @@
</managed-bean>
<managed-bean>
+ <managed-bean-name>addDisplayNameAction</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.core.admin.ui.actions.PortalObjectDisplayNameAction</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <!--<managed-property>
+ <property-name>pageContainer</property-name>
+ <value>#{portalobjectmgr.selectedObject}</value>
+ </managed-property>-->
+ <managed-property>
+ <property-name>bean</property-name>
+ <value>#{portalobjectmgr}</value>
+ </managed-property>
+ <!--<managed-property>
+ <property-name>domainConfigurator</property-name>
+ <value>#{applicationScope.AuthorizationDomainRegistry.portalobject.configurator}</value>
+ </managed-property>-->
+ </managed-bean>
+
+ <managed-bean>
<managed-bean-name>renameDashboardPageAction</managed-bean-name>
<managed-bean-class>org.jboss.portal.core.admin.ui.actions.RenameAction</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
@@ -411,8 +429,11 @@
<from-outcome>renameObject</from-outcome>
<to-view-id>/WEB-INF/jsf/renameObject.xhtml</to-view-id>
</navigation-case>
-
<navigation-case>
+ <from-outcome>setDisplayName</from-outcome>
+ <to-view-id>/WEB-INF/jsf/displayNameObject.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
<from-outcome>editWindowTheme</from-outcome>
<to-view-id>/WEB-INF/jsf/editWindowTheme.xhtml</to-view-id>
</navigation-case>
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jboss-portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jboss-portlet.xml 2007-11-27 20:56:08 UTC (rev 9138)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jboss-portlet.xml 2007-11-28 00:13:09 UTC (rev 9139)
@@ -35,7 +35,7 @@
<trans-attribute>Required</trans-attribute>
</transaction>
<header-content>
- <link rel="stylesheet" type="text/css" href="/style.css" media="screen"/>
+ <link rel="stylesheet" type="text/css" href="/css/style.css" media="screen"/>
</header-content>
<portlet-info>
<icon>
@@ -53,7 +53,7 @@
<trans-attribute>Required</trans-attribute>
</transaction>
<header-content>
- <link rel="stylesheet" type="text/css" href="/style.css" media="screen"/>
+ <link rel="stylesheet" type="text/css" href="/css/style.css" media="screen"/>
</header-content>
<portlet-info>
<icon>
Copied: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/displayNameObject.xhtml (from rev 9138, branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/renameObject.xhtml)
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/displayNameObject.xhtml (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/displayNameObject.xhtml 2007-11-28 00:13:09 UTC (rev 9139)
@@ -0,0 +1,26 @@
+<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:c="http://java.sun.com/jstl/core">
+ <ui:composition template="/WEB-INF/jsf/objectTemplate.xhtml">
+ <ui:param name="portalObjectScreen" value="Rename"/>
+ <ui:define name="content">
+ <h3>Add Display Name</h3>
+ <h:form id="displayNameForm">
+ <h:messages/>
+ <c:forEach items="#{addDisplayNameAction.currentLocales}" var="locale">
+ #{locale} - #{locale}<br/>
+ </c:forEach>
+ <p>
+ <h:inputText id="newName" value="#{addDisplayNameAction.newText}"/>
+ <h:selectOneMenu id="locales" value="#{addDisplayNameAction.newLocale}">
+ <f:selectItems value="#{addDisplayNameAction.locales}"/>
+ </h:selectOneMenu>
+ <h:commandButton value="Add Name" action="#{addDisplayNameAction.addDisplayName}" styleClass="portlet-form-button"/>
+ </p>
+ </h:form>
+ </ui:define>
+ </ui:composition>
+</div>
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPage.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPage.xhtml 2007-11-27 20:56:08 UTC (rev 9138)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPage.xhtml 2007-11-28 00:13:09 UTC (rev 9139)
@@ -2,6 +2,7 @@
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
xmlns:h="http://java.sun.com/jsf/html">
<ui:composition template="objectTemplate.xhtml">
@@ -11,6 +12,8 @@
<h3 class="sectionTitle">Manage <span class="objectName">#{portalobjectmgr.selectedObject.name}</span>
#{portalobjectmgr.selectedObject.typeName}</h3>
+
+
<h:form>
<h:panelGroup rendered="#{portalobjectmgr.selectedObject.type == PortalObject.TYPE_PAGE}"><h:commandLink
action="editPageLayout" actionListener="#{portalobjectmgr.selectObject}" styleClass="actionLayout">
@@ -33,6 +36,12 @@
action="renameObject" actionListener="#{portalobjectmgr.selectObject}" styleClass="actionRename">
<f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
Rename
+ </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.name == 'default')))}"><h:commandLink
+ action="setDisplayName" actionListener="#{portalobjectmgr.selectObject}" styleClass="actionDisplayName">
+ <f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
+ Display Names
</h:commandLink> | </h:panelGroup><h:commandLink action="confirm" styleClass="actionDelete"
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{portalobjectmgr.selectedObject.id}"/>
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml 2007-11-27 20:56:08 UTC (rev 9138)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml 2007-11-28 00:13:09 UTC (rev 9139)
@@ -45,7 +45,15 @@
<h:outputText value="Rename"/>
<f:param name="id" value="#{object.id}"/>
</h:commandLink>
- </h:panelGroup> | <h:commandLink action="confirm" styleClass="actionDelete"
+ </h:panelGroup>
+ <h:panelGroup
+ rendered="#{(object.name != 'admin') and (object.name != 'template') and (object.name != 'default')}">
+ | <h:commandLink action="setDisplayName" actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Display Names"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink>
+ </h:panelGroup>
+ | <h:commandLink action="confirm" styleClass="actionDelete"
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{object.id}"/>
Delete
@@ -99,9 +107,13 @@
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{object.id}"/>
Rename
- </h:commandLink> | <h:commandLink action="confirm" styleClass="actionDelete"
+ </h:commandLink> | <h:commandLink action="setDisplayName" styleClass="actionRename"
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{object.id}"/>
+ Display Names
+ </h:commandLink> |<h:commandLink action="confirm" styleClass="actionDelete"
+ actionListener="#{portalobjectmgr.selectObject}">
+ <f:param name="id" value="#{object.id}"/>
Delete
</h:commandLink>
<h:panelGroup rendered="#{not object.default}"> | <h:commandLink styleClass="actionMakeDefault"
@@ -175,6 +187,10 @@
actionListener="#{portalobjectmgr.selectObject}">
<f:param name="id" value="#{object.id}"/>
Rename
+ </h:commandLink> | <h:commandLink action="setDisplayName" styleClass="actionRename"
+ actionListener="#{portalobjectmgr.selectObject}">
+ <f:param name="id" value="#{object.id}"/>
+ Display Names
</h:commandLink> | <h:commandLink action="confirm" actionListener="#{portalobjectmgr.selectObject}"
styleClass="actionDelete">
<f:param name="id" value="#{object.id}"/>
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/newWindowTpl.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/newWindowTpl.xhtml 2007-11-27 20:56:08 UTC (rev 9138)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/newWindowTpl.xhtml 2007-11-28 00:13:09 UTC (rev 9139)
@@ -6,7 +6,7 @@
xmlns:c="http://java.sun.com/jstl/core"
class="admin-ui">
-<link rel="stylesheet" type="text/css" href="/portal-admin/style.css" media="screen"/>
+<link rel="stylesheet" type="text/css" href="/portal-admin/css/style.css" media="screen"/>
<div class="wizard-tab-container">
<h3 class="sectionTitle">
16 years, 7 months