JBoss Portal SVN: r6435 - in trunk/core-admin/src: resources/portal-admin-war/WEB-INF/jsp/management and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-02-27 16:24:14 -0500 (Tue, 27 Feb 2007)
New Revision: 6435
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/AssignWindowsAction.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/editPageLayout.xhtml
Log:
Display error messages
Modified: trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/AssignWindowsAction.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/AssignWindowsAction.java 2007-02-27 19:59:29 UTC (rev 6434)
+++ trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/AssignWindowsAction.java 2007-02-27 21:24:14 UTC (rev 6435)
@@ -216,7 +216,7 @@
if (windowName.length() == 0)
{
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Window name cannot be blank!", null);
- FacesContext.getCurrentInstance().addMessage("windowName", message);
+ FacesContext.getCurrentInstance().addMessage("layoutForm:windowName", message);
return false;
}
@@ -225,7 +225,7 @@
if (page.getWindow(windowName) != null)
{
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Duplicate window name found on this page!", null);
- FacesContext.getCurrentInstance().addMessage("windowName", message);
+ FacesContext.getCurrentInstance().addMessage("layoutForm:windowName", message);
return false;
}
@@ -234,7 +234,7 @@
if (contentType == null)
{
FacesMessage message = new FacesMessage("No content type provided!", null);
- FacesContext.getCurrentInstance().addMessage("instanceId", message);
+ FacesContext.getCurrentInstance().addMessage("layoutForm:instanceId", message);
return false;
}
@@ -243,7 +243,7 @@
if (contentURI == null)
{
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, "No portlet selected!", null);
- FacesContext.getCurrentInstance().addMessage("instanceId", message);
+ FacesContext.getCurrentInstance().addMessage("layoutForm:instanceId", message);
return false;
}
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/editPageLayout.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/editPageLayout.xhtml 2007-02-27 19:59:29 UTC (rev 6434)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/editPageLayout.xhtml 2007-02-27 21:24:14 UTC (rev 6435)
@@ -16,7 +16,7 @@
<hr />
- <h:form>
+ <h:form id="layoutForm">
<h:panelGroup>
<table>
<tr>
@@ -30,8 +30,8 @@
styleClass="portlet-form-field">
<f:selectItems value="#{registry.availableTypes}"/>
</h:selectOneMenu>
- <h:message for="instanceId"/>
<h:commandButton value="Change content type" styleClass="portlet-form-button"/>
+ <br/><h:message for="instanceId" errorStyle="color:red;"/>
</td>
</tr>
<tr>
@@ -47,7 +47,7 @@
<h:outputText value="Window Name: " styleClass="portlet-form-field-label"/>
</h:outputLabel>
<h:inputText id="windowName" value="#{assignWindowsAction.windowName}" styleClass="portlet-form-input-field"/>
- <h:message for="windowName" showSummary="true" showDetail="true" />
+ <br/><h:message for="windowName" errorStyle="color:red;"/>
</td>
</tr>
</table>
17 years, 3 months
JBoss Portal SVN: r6434 - in trunk: core-admin and 3 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-02-27 14:59:29 -0500 (Tue, 27 Feb 2007)
New Revision: 6434
Modified:
trunk/core-admin/.classpath
trunk/core-cms/.classpath
trunk/core/.classpath
trunk/test/.classpath
trunk/wsrp/.classpath
Log:
Modified: trunk/core/.classpath
===================================================================
--- trunk/core/.classpath 2007-02-27 17:44:10 UTC (rev 6433)
+++ trunk/core/.classpath 2007-02-27 19:59:29 UTC (rev 6434)
@@ -30,7 +30,6 @@
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jnpserver.jar"/>
<classpathentry kind="lib" path="/thirdparty/jwebunit/lib/jwebunit-1.2.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-log4j/lib/log4j.jar"/>
- <classpathentry kind="lib" path="/thirdparty/apache-tomahawk/lib/tomahawk.jar"/>
<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/faces"/>
<classpathentry combineaccessrules="false" kind="src" path="/portlet"/>
Modified: trunk/core-admin/.classpath
===================================================================
--- trunk/core-admin/.classpath 2007-02-27 17:44:10 UTC (rev 6433)
+++ trunk/core-admin/.classpath 2007-02-27 19:59:29 UTC (rev 6434)
@@ -13,7 +13,6 @@
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-common.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/theme"/>
<classpathentry combineaccessrules="false" kind="src" path="/portlet-federation"/>
- <classpathentry kind="lib" path="/thirdparty/apache-tomahawk/lib/tomahawk.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/jems"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-system.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-jmx.jar"/>
Modified: trunk/core-cms/.classpath
===================================================================
--- trunk/core-cms/.classpath 2007-02-27 17:44:10 UTC (rev 6433)
+++ trunk/core-cms/.classpath 2007-02-27 19:59:29 UTC (rev 6434)
@@ -21,5 +21,7 @@
<classpathentry combineaccessrules="false" kind="src" path="/search"/>
<classpathentry combineaccessrules="false" kind="src" path="/security"/>
<classpathentry kind="lib" path="/thirdparty/jbpm/jaronly/lib/jbpm.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/apache-myfaces/lib/myfaces-api.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/core-admin"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: trunk/test/.classpath
===================================================================
--- trunk/test/.classpath 2007-02-27 17:44:10 UTC (rev 6433)
+++ trunk/test/.classpath 2007-02-27 19:59:29 UTC (rev 6434)
@@ -26,9 +26,6 @@
<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-microcontainer.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-log4j/lib/log4j.jar"/>
<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
- <classpathentry kind="lib" path="/thirdparty/apache-directory/lib/apacheds-core-1.0-RC4.jar"/>
- <classpathentry kind="lib" path="/thirdparty/apache-directory/lib/apacheds-protocol-shared-1.0-RC4.jar"/>
- <classpathentry kind="lib" path="/thirdparty/apache-directory/lib/apacheds-server-jndi-1.0-RC4.jar"/>
<classpathentry kind="lib" path="/thirdparty/sun-opends/lib/OpenDS.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: trunk/wsrp/.classpath
===================================================================
--- trunk/wsrp/.classpath 2007-02-27 17:44:10 UTC (rev 6433)
+++ trunk/wsrp/.classpath 2007-02-27 19:59:29 UTC (rev 6434)
@@ -28,5 +28,6 @@
<classpathentry combineaccessrules="false" kind="src" path="/core"/>
<classpathentry combineaccessrules="false" kind="src" path="/registration"/>
<classpathentry combineaccessrules="false" kind="src" path="/portlet-federation"/>
+ <classpathentry kind="lib" path="/thirdparty/hibernate/lib/hibernate3.jar"/>
<classpathentry kind="output" path="output/classes"/>
</classpath>
17 years, 3 months
JBoss Portal SVN: r6433 - in trunk: build/ide/intellij/idea60/modules/core-admin and 2 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-27 12:44:10 -0500 (Tue, 27 Feb 2007)
New Revision: 6433
Modified:
trunk/build/ide/intellij/idea60/modules/core-admin/core-admin.iml
trunk/build/ide/intellij/idea60/modules/core/core.iml
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/PropertyAction.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml
Log:
minor fixes after fattomahawk removal
Modified: trunk/build/ide/intellij/idea60/modules/core/core.iml
===================================================================
--- trunk/build/ide/intellij/idea60/modules/core/core.iml 2007-02-27 17:27:14 UTC (rev 6432)
+++ trunk/build/ide/intellij/idea60/modules/core/core.iml 2007-02-27 17:44:10 UTC (rev 6433)
@@ -176,15 +176,6 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-tomahawk/lib/tomahawk.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-log4j/lib/log4j.jar!/" />
</CLASSES>
<JAVADOC />
Modified: trunk/build/ide/intellij/idea60/modules/core-admin/core-admin.iml
===================================================================
--- trunk/build/ide/intellij/idea60/modules/core-admin/core-admin.iml 2007-02-27 17:27:14 UTC (rev 6432)
+++ trunk/build/ide/intellij/idea60/modules/core-admin/core-admin.iml 2007-02-27 17:44:10 UTC (rev 6433)
@@ -65,15 +65,6 @@
</orderEntry>
<orderEntry type="module" module-name="faces" />
<orderEntry type="module" module-name="core" />
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/apache-tomahawk/lib/tomahawk.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
<orderEntry type="module" module-name="identity" />
<orderEntry type="module" module-name="portlet" />
<orderEntry type="module" module-name="common" />
Modified: trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/PropertyAction.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/PropertyAction.java 2007-02-27 17:27:14 UTC (rev 6432)
+++ trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/PropertyAction.java 2007-02-27 17:44:10 UTC (rev 6433)
@@ -22,7 +22,6 @@
******************************************************************************/
package org.jboss.portal.core.portlet.management.actions;
-import org.apache.myfaces.component.html.ext.HtmlDataTable;
import org.jboss.portal.core.portlet.management.PortalObjectManagerBean;
import javax.faces.application.FacesMessage;
@@ -39,8 +38,6 @@
/** . */
private PortalObjectManagerBean pomgr;
- private HtmlDataTable propertyDataTable;
-
private String selectedProperty;
private String propertyValue;
@@ -73,16 +70,6 @@
this.selectedProperty = selectedProperty;
}
- public HtmlDataTable getPropertyDataTable()
- {
- return propertyDataTable;
- }
-
- public void setPropertyDataTable(HtmlDataTable propertyDataTable)
- {
- this.propertyDataTable = propertyDataTable;
- }
-
public String getPropertyValue()
{
return propertyValue;
@@ -110,15 +97,10 @@
public void selectProperty()
{
- String[] property = (String[])getPropertyDataTable().getRowData();
- selectedProperty = property[0];
- propertyValue = property[1];
}
public void removeProperty()
{
- String[] property = (String[])getPropertyDataTable().getRowData();
- getPortalObjectManager().getSelectedObject().setDeclaredProperty(property[0], null);
}
public void updateProperty()
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml 2007-02-27 17:27:14 UTC (rev 6432)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml 2007-02-27 17:44:10 UTC (rev 6433)
@@ -67,44 +67,6 @@
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
- <!-- Extensions Filter -->
- <filter>
- <filter-name>extensionsFilter</filter-name>
- <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
- <init-param>
- <description>Set the size limit for uploaded files.
- Format: 10 - 10 bytes
- 10k - 10 KB
- 10m - 10 MB
- 1g - 1 GB
- </description>
- <param-name>uploadMaxFileSize</param-name>
- <param-value>100m</param-value>
- </init-param>
- <init-param>
- <description>Set the threshold size - files
- below this limit are stored in memory, files above
- this limit are stored on disk.
-
- Format: 10 - 10 bytes
- 10k - 10 KB
- 10m - 10 MB
- 1g - 1 GB
- </description>
- <param-name>uploadThresholdSize</param-name>
- <param-value>100k</param-value>
- </init-param>
- <!-- <init-param>
- <description>Set the path where the intermediary files will be stored.
- </description>
- <param-name>uploadRepositoryPath</param-name>
- <param-value>/temp</param-value>
- </init-param>-->
- </filter>
- <filter-mapping>
- <filter-name>extensionsFilter</filter-name>
- <url-pattern>/faces/*</url-pattern>
- </filter-mapping>
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
17 years, 3 months
JBoss Portal SVN: r6432 - in trunk: core and 8 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-02-27 12:27:14 -0500 (Tue, 27 Feb 2007)
New Revision: 6432
Removed:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/tomahawk.taglib.xml
Modified:
trunk/build/build-thirdparty.xml
trunk/core-admin/.classpath
trunk/core-admin/build.xml
trunk/core-cms/build.xml
trunk/core-management/build.xml
trunk/core-samples/build.xml
trunk/core-search/build.xml
trunk/core/build.xml
trunk/faces/src/resources/portal-faces-lib-jar/META-INF/portal.taglib.xml
trunk/testsuite/build.xml
Log:
removed all (?) references to Tomahawk
Modified: trunk/build/build-thirdparty.xml
===================================================================
--- trunk/build/build-thirdparty.xml 2007-02-27 17:26:17 UTC (rev 6431)
+++ trunk/build/build-thirdparty.xml 2007-02-27 17:27:14 UTC (rev 6432)
@@ -61,7 +61,6 @@
<componentref name="apache-logging" version="1.0.5.SP1-jboss"/>
<componentref name="apache-lucene" version="1.4.3"/>
<componentref name="apache-net" version="1.4.1"/>
- <componentref name="apache-tomahawk" version="1.1.1"/>
<componentref name="apache-xerces" version="2.7.1"/>
<componentref name="asm" version="1.5.3"/>
<componentref name="beanshell" version="1.3.0"/>
Modified: trunk/core/build.xml
===================================================================
--- trunk/core/build.xml 2007-02-27 17:26:17 UTC (rev 6431)
+++ trunk/core/build.xml 2007-02-27 17:27:14 UTC (rev 6432)
@@ -93,7 +93,6 @@
<path refid="hibernate.hibernate.classpath"/>
<path refid="apache.ant.classpath"/>
<path refid="apache.myfaces.classpath"/>
- <path refid="apache.tomahawk.classpath"/>
<path refid="apache.log4j.classpath"/>
<path refid="junit.junit.classpath"/>
<path refid="sun.servlet.classpath"/>
@@ -344,7 +343,6 @@
<fileset dir="${apache.lang.lib}" includes="commons-lang-2.0.jar"/>
<fileset dir="${facelets.facelets.lib}" includes="jsf-facelets.jar"/>
<fileset dir="${el.el.lib}" includes="el-api.jar,el-ri.jar"/>
- <fileset dir="${apache.tomahawk.lib}" includes="tomahawk.jar"/>
</copy>
</target>
Modified: trunk/core-admin/.classpath
===================================================================
--- trunk/core-admin/.classpath 2007-02-27 17:26:17 UTC (rev 6431)
+++ trunk/core-admin/.classpath 2007-02-27 17:27:14 UTC (rev 6432)
@@ -19,5 +19,7 @@
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-jmx.jar"/>
<classpathentry kind="lib" path="/thirdparty/facelets/lib/jsf-facelets.jar"/>
<classpathentry kind="lib" path="/thirdparty/el/lib/el-api.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/servlet-api.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/jsp-api.jar"/>
<classpathentry kind="output" path="output/classes"/>
</classpath>
Modified: trunk/core-admin/build.xml
===================================================================
--- trunk/core-admin/build.xml 2007-02-27 17:26:17 UTC (rev 6431)
+++ trunk/core-admin/build.xml 2007-02-27 17:27:14 UTC (rev 6432)
@@ -92,7 +92,6 @@
<path refid="jbossas/core.libs.classpath"/>
<path refid="hibernate.hibernate.classpath"/>
<path refid="apache.myfaces.classpath"/>
- <path refid="apache.tomahawk.classpath"/>
<path refid="apache.log4j.classpath"/>
<path refid="sun.servlet.classpath"/>
<path refid="facelets.facelets.classpath"/>
Deleted: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/tomahawk.taglib.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/tomahawk.taglib.xml 2007-02-27 17:26:17 UTC (rev 6431)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/tomahawk.taglib.xml 2007-02-27 17:27:14 UTC (rev 6432)
@@ -1,444 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE facelet-taglib PUBLIC "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN" "facelet-taglib_1_0.dtd">
-<facelet-taglib>
- <!-- author: thomas.jachmann(a)mindmatters.de -->
- <namespace>http://myfaces.apache.org/tomahawk</namespace>
- <tag>
- <tag-name>commandButton</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlCommandButton</component-type>
- <renderer-type>org.apache.myfaces.Button</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>commandLink</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlCommandLink</component-type>
- <renderer-type>org.apache.myfaces.Link</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>dataTable</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlDataTable</component-type>
- <renderer-type>org.apache.myfaces.Table</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>inputHidden</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlInputHidden</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>inputSecret</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlInputSecret</component-type>
- <renderer-type>org.apache.myfaces.Secret</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>inputText</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlInputText</component-type>
- <renderer-type>org.apache.myfaces.Text</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>inputHelpText</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlInputTextHelp</component-type>
- <renderer-type>org.apache.myfaces.TextHelp</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>inputTextarea</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlInputTextarea</component-type>
- <renderer-type>org.apache.myfaces.Textarea</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>graphicImage</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlGraphicImage</component-type>
- <renderer-type>org.apache.myfaces.Image</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>message</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlMessage</component-type>
- <renderer-type>org.apache.myfaces.Message</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>messages</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlMessages</component-type>
- <renderer-type>org.apache.myfaces.Messages</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>outputLabel</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlOutputLabel</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>outputText</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlOutputText</component-type>
- <renderer-type>org.apache.myfaces.Text</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>panelGrid</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlPanelGrid</component-type>
- <renderer-type>org.apache.myfaces.Grid</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>panelGroup</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlPanelGroup</component-type>
- <renderer-type>org.apache.myfaces.Group</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>selectOneMenu</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlSelectOneMenu</component-type>
- <renderer-type>org.apache.myfaces.Menu</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>selectManyMenu</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlSelectManyMenu</component-type>
- <renderer-type>org.apache.myfaces.Menu</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>selectOneRadio</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlSelectOneRadio</component-type>
- <renderer-type>org.apache.myfaces.Radio</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>selectBooleanCheckbox</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlSelectBooleanCheckbox</component-type>
- <renderer-type>org.apache.myfaces.Checkbox</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>selectManyCheckbox</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlSelectManyCheckbox</component-type>
- <renderer-type>org.apache.myfaces.Checkbox</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>selectOneListbox</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlSelectOneListbox</component-type>
- <renderer-type>org.apache.myfaces.Listbox</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>selectManyListbox</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlSelectManyListbox</component-type>
- <renderer-type>org.apache.myfaces.Listbox</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>inputCalendar</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlInputCalendar</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>jsValueChangeListener</tag-name>
- <component>
- <component-type>org.apache.myfaces.JsValueChangeListener</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>jsValueSet</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlJsValueSet</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>checkbox</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlCheckbox</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>commandNavigation</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlCommandNavigation</component-type>
- <renderer-type>org.apache.myfaces.Navigation</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>commandSortHeader</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlCommandSortHeader</component-type>
- <renderer-type>org.apache.myfaces.SortHeader</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>dataList</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlDataList</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>dataScroller</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlDataScroller</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>inputDate</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlInputDate</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>inputFileUpload</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlInputFileUpload</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>inputHtml</tag-name>
- <component>
- <component-type>org.apache.myfaces.InputHtml</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>navigationMenuItem</tag-name>
- <component>
- <component-type>org.apache.myfaces.NavigationMenuItem</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>navigationMenuItems</tag-name>
- <component>
- <component-type>javax.faces.SelectItems</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>jscookMenu</tag-name>
- <component>
- <component-type>org.apache.myfaces.JSCookMenu</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>panelLayout</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlPanelLayout</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>panelNavigation</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlPanelNavigation</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>panelTab</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlPanelTab</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>panelTabbedPane</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlPanelTabbedPane</component-type>
- </component>
- </tag>
- <!-- deactivated since there's no component! tag>
- <tag-name>tabChangeListener</tag-name>
- <component>
- <component-type></component-type>
- </component>
- </tag-->
- <tag>
- <tag-name>collapsiblePanel</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlCollapsiblePanel</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>selectOneCountry</tag-name>
- <component>
- <component-type>org.apache.myfaces.SelectOneCountry</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>selectOneLanguage</tag-name>
- <component>
- <component-type>org.apache.myfaces.SelectOneLanguage</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>stylesheet</tag-name>
- <component>
- <component-type>org.apache.myfaces.Stylesheet</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>div</tag-name>
- <component>
- <component-type>org.apache.myfaces.Div</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>htmlTag</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlTag</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>radio</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlRadio</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>tree</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlTree</component-type>
- <renderer-type>org.apache.myfaces.HtmlTree</renderer-type>
- </component>
- </tag>
- <!-- deactivated since there's no component! tag>
- <tag-name>treeSelectionListener</tag-name>
- <component>
- <component-type></component-type>
- </component>
- </tag-->
- <!-- deactivated since there's no component! tag>
- <tag-name>iconProvider</tag-name>
- <component>
- <component-type></component-type>
- </component>
- </tag-->
- <tag>
- <tag-name>treeColumn</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlTreeColumn</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>treeCheckbox</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlTreeCheckbox</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>tree2</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlTree2</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>panelStack</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlPanelStack</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>popup</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlPopup</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>newspaperTable</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlNewspaperTable</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>aliasBean</tag-name>
- <component>
- <component-type>org.apache.myfaces.AliasBean</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>aliasBeansScope</tag-name>
- <component>
- <component-type>org.apache.myfaces.AliasBeansScope</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>buffer</tag-name>
- <component>
- <component-type>org.apache.myfaces.Buffer</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>saveState</tag-name>
- <component>
- <component-type>org.apache.myfaces.SaveState</component-type>
- </component>
- </tag>
- <!-- deactivated since there's no component! tag>
- <tag-name>updateActionListener</tag-name>
- <component>
- <component-type></component-type>
- </component>
- </tag-->
- <tag>
- <tag-name>validateCreditCard</tag-name>
- <validator>
- <validator-id>org.apache.myfaces.validator.CreditCard</validator-id>
- </validator>
- </tag>
- <tag>
- <tag-name>validateEmail</tag-name>
- <validator>
- <validator-id>org.apache.myfaces.validator.Email</validator-id>
- </validator>
- </tag>
- <tag>
- <tag-name>validateEqual</tag-name>
- <validator>
- <validator-id>org.apache.myfaces.validator.Equal</validator-id>
- </validator>
- </tag>
- <tag>
- <tag-name>swapImage</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlSwapImage</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>columns</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlColumns</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>column</tag-name>
- <component>
- <component-type>org.apache.myfaces.HtmlColumn</component-type>
- </component>
- </tag>
- <!-- additional validators (note: not in tld, so no code completion) -->
- <tag>
- <tag-name>validateRegExpr</tag-name>
- <validator>
- <validator-id>org.apache.myfaces.validator.RegExpr</validator-id>
- </validator>
- </tag>
-</facelet-taglib>
\ No newline at end of file
Modified: trunk/core-cms/build.xml
===================================================================
--- trunk/core-cms/build.xml 2007-02-27 17:26:17 UTC (rev 6431)
+++ trunk/core-cms/build.xml 2007-02-27 17:27:14 UTC (rev 6432)
@@ -93,7 +93,6 @@
<path refid="hibernate.hibernate.classpath"/>
<path refid="apache.ant.classpath"/>
<path refid="apache.myfaces.classpath"/>
- <path refid="apache.tomahawk.classpath"/>
<path refid="apache.log4j.classpath"/>
<path refid="junit.junit.classpath"/>
<path refid="sun.servlet.classpath"/>
Modified: trunk/core-management/build.xml
===================================================================
--- trunk/core-management/build.xml 2007-02-27 17:26:17 UTC (rev 6431)
+++ trunk/core-management/build.xml 2007-02-27 17:27:14 UTC (rev 6432)
@@ -93,7 +93,6 @@
<path refid="hibernate.hibernate.classpath"/>
<path refid="apache.ant.classpath"/>
<path refid="apache.myfaces.classpath"/>
- <path refid="apache.tomahawk.classpath"/>
<path refid="apache.log4j.classpath"/>
<path refid="junit.junit.classpath"/>
<path refid="sun.servlet.classpath"/>
Modified: trunk/core-samples/build.xml
===================================================================
--- trunk/core-samples/build.xml 2007-02-27 17:26:17 UTC (rev 6431)
+++ trunk/core-samples/build.xml 2007-02-27 17:27:14 UTC (rev 6432)
@@ -93,7 +93,6 @@
<path refid="hibernate.hibernate.classpath"/>
<path refid="apache.ant.classpath"/>
<path refid="apache.myfaces.classpath"/>
- <path refid="apache.tomahawk.classpath"/>
<path refid="apache.log4j.classpath"/>
<path refid="junit.junit.classpath"/>
<path refid="sun.servlet.classpath"/>
Modified: trunk/core-search/build.xml
===================================================================
--- trunk/core-search/build.xml 2007-02-27 17:26:17 UTC (rev 6431)
+++ trunk/core-search/build.xml 2007-02-27 17:27:14 UTC (rev 6432)
@@ -93,7 +93,6 @@
<path refid="hibernate.hibernate.classpath"/>
<path refid="apache.ant.classpath"/>
<path refid="apache.myfaces.classpath"/>
- <path refid="apache.tomahawk.classpath"/>
<path refid="apache.log4j.classpath"/>
<path refid="junit.junit.classpath"/>
<path refid="sun.servlet.classpath"/>
Modified: trunk/faces/src/resources/portal-faces-lib-jar/META-INF/portal.taglib.xml
===================================================================
--- trunk/faces/src/resources/portal-faces-lib-jar/META-INF/portal.taglib.xml 2007-02-27 17:26:17 UTC (rev 6431)
+++ trunk/faces/src/resources/portal-faces-lib-jar/META-INF/portal.taglib.xml 2007-02-27 17:27:14 UTC (rev 6432)
@@ -7,4 +7,5 @@
<tag-name>context</tag-name>
<handler-class>org.jboss.portal.faces.facelet.ContextTagHandler</handler-class>
</tag>
+
</facelet-taglib>
\ No newline at end of file
Modified: trunk/testsuite/build.xml
===================================================================
--- trunk/testsuite/build.xml 2007-02-27 17:26:17 UTC (rev 6431)
+++ trunk/testsuite/build.xml 2007-02-27 17:27:14 UTC (rev 6432)
@@ -130,9 +130,9 @@
<antcall target="internal-test-module">
<param name="module" value="security"/>
</antcall>
- <antcall target="internal-test-module">
+ <!--antcall target="internal-test-module">
<param name="module" value="identity"/>
- </antcall>
+ </antcall-->
<antcall target="internal-test-module">
<param name="module" value="server"/>
</antcall>
17 years, 3 months
JBoss Portal SVN: r6431 - in trunk/core-admin/src/resources: portal-admin-war/WEB-INF/jsp/management and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-27 12:26:17 -0500 (Tue, 27 Feb 2007)
New Revision: 6431
Modified:
trunk/core-admin/src/resources/portal-admin-sar/content/editor.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/editPageLayout.xhtml
Log:
added portlet styles in the layout editor
Modified: trunk/core-admin/src/resources/portal-admin-sar/content/editor.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-sar/content/editor.xhtml 2007-02-27 16:56:45 UTC (rev 6430)
+++ trunk/core-admin/src/resources/portal-admin-sar/content/editor.xhtml 2007-02-27 17:26:17 UTC (rev 6431)
@@ -7,22 +7,25 @@
xmlns:pfc="http://www.jboss.com/portal/facelet/common">
<h:selectOneListbox
- value="#{contentURI}">
+ value="#{contentURI}"
+ styleClass="portlet-form-field">
<f:selectItems value="#{registry.editors.portlet.instanceItems}"/>
</h:selectOneListbox>
- <br />
+ <br/>
<pfc:context>
<ui:param name="instance" value="#{registry.editors.portlet.instanceMap[contentURI]}"/>
<ui:param name="portlet" value="#{instance.portlet}"/>
<h:panelGroup rendered="#{instance != null}">
- <h:outputText value="#{instance.id}"/>
+ <h:outputText value="#{instance.id}" styleClass="portlet-font"/>
<br />
<h:panelGroup rendered="#{portlet != null}">
- <h:outputText value="Portlet #{portlet.name} - #{portlet.description}"/>
+ <h:outputText
+ styleClass="portlet-font"
+ value="Portlet #{portlet.name} - #{portlet.description}"/>
</h:panelGroup>
</h:panelGroup>
</pfc:context>
- <br />
- <h:commandButton value="Show details" class="portlet-form-button"/>
+ <br/>
+ <h:commandButton value="Show details" styleClass="portlet-form-button"/>
</div>
\ No newline at end of file
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/editPageLayout.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/editPageLayout.xhtml 2007-02-27 16:56:45 UTC (rev 6430)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/editPageLayout.xhtml 2007-02-27 17:26:17 UTC (rev 6431)
@@ -26,7 +26,8 @@
<td>
<h:selectOneMenu
id="instanceId"
- value="#{portalobjectmgr.selectedContentType}">
+ value="#{portalobjectmgr.selectedContentType}"
+ styleClass="portlet-form-field">
<f:selectItems value="#{registry.availableTypes}"/>
</h:selectOneMenu>
<h:message for="instanceId"/>
@@ -43,10 +44,10 @@
<tr>
<td>
<h:outputLabel for="windowName">
- <h:outputText value="Window Name: " style="font-weight:bold;"/>
+ <h:outputText value="Window Name: " styleClass="portlet-form-field-label"/>
</h:outputLabel>
- <h:inputText id="windowName" value="#{assignWindowsAction.windowName}"/>
- <h:message for="windowName"/>
+ <h:inputText id="windowName" value="#{assignWindowsAction.windowName}" styleClass="portlet-form-input-field"/>
+ <h:message for="windowName" showSummary="true" showDetail="true" />
</td>
</tr>
</table>
@@ -55,7 +56,7 @@
<c:forEach items="#{portalobjectmgr.regionNames}" var="regionName">
<table>
<tr>
- <td colspan="3">#{regionName} Column</td>
+ <td colspan="3" class="portlet-form-field-label">#{regionName} Column</td>
</tr>
<tr>
<td>
@@ -69,7 +70,8 @@
<td>
<h:selectManyListbox
value="#{assignWindowsAction.assignedWindows[regionName]}"
- size="7">
+ size="7"
+ styleClass="portlet-form-field">
<f:selectItems value="#{portalobjectmgr.windowItemsMap[regionName]}"/>
</h:selectManyListbox>
</td>
17 years, 3 months
JBoss Portal SVN: r6430 - in trunk/core-admin/src: resources/portal-admin-war/WEB-INF/jsp/management and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-27 11:56:45 -0500 (Tue, 27 Feb 2007)
New Revision: 6430
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/editPageLayout.xhtml
Log:
removed obsolete code for moving windows in portal object manager bean
Modified: trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java 2007-02-27 16:53:55 UTC (rev 6429)
+++ trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java 2007-02-27 16:56:45 UTC (rev 6430)
@@ -650,7 +650,7 @@
}
/** Return the <Region>List on the selected object which must be a page. */
- public List getCols()
+ public List getRegionNames()
{
try
{
@@ -693,60 +693,6 @@
return windowMap;
}
- public List getRegionItems() throws Exception
- {
- List list = getCols();
- for (int i = 0;i < list.size();i++)
- {
- String regionName = (String)list.get(i);
- SelectItem regionItem = new SelectItem();
- regionItem.setValue(regionName);
- regionItem.setLabel(regionName);
- list.set(i, regionItem);
- }
- return list;
- }
-
- /** Return an array of <Region,Window>Map on the selected object which must be a page. */
- public Map[] getRows() throws Exception
- {
- Map windows = getWindows((Page)getSelectedObject());
-
- //
- List regions = new ArrayList(windows.keySet());
- Collections.sort(regions);
-
- //
- Iterator[] iterators = new Iterator[regions.size()];
- for (int i = 0; i < regions.size(); i++)
- {
- String region = (String)regions.get(i);
- iterators[i] = ((SortedSet)windows.get(region)).iterator();
- }
-
- //
- List maps = new ArrayList();
- while (true)
- {
- Map row = new HashMap();
- for (int i = 0; i < iterators.length; i++)
- {
- Iterator iterator = iterators[i];
- if (iterator.hasNext())
- {
- row.put(regions.get(i), iterator.next());
- }
- }
- if (row.size() == 0)
- {
- break;
- }
- maps.add(row);
- }
-
- return (Map[])maps.toArray(new Map[maps.size()]);
- }
-
// ****************************
public class PortalObjectAuthorizationBean extends AbstractAuthorizationBean
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/editPageLayout.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/editPageLayout.xhtml 2007-02-27 16:53:55 UTC (rev 6429)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/editPageLayout.xhtml 2007-02-27 16:56:45 UTC (rev 6430)
@@ -52,7 +52,7 @@
</table>
</td>
<td>
- <c:forEach items="#{portalobjectmgr.cols}" var="regionName">
+ <c:forEach items="#{portalobjectmgr.regionNames}" var="regionName">
<table>
<tr>
<td colspan="3">#{regionName} Column</td>
17 years, 3 months
JBoss Portal SVN: r6429 - trunk/core-admin/src/main/org/jboss/portal/core/portlet/management.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-27 11:53:55 -0500 (Tue, 27 Feb 2007)
New Revision: 6429
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java
Log:
removed obsolete code for moving windows in portal object manager bean
Modified: trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java 2007-02-27 16:46:32 UTC (rev 6428)
+++ trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java 2007-02-27 16:53:55 UTC (rev 6429)
@@ -57,6 +57,7 @@
import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.core.model.portal.Window;
import org.jboss.portal.core.model.content.ContentType;
+import org.jboss.portal.core.portlet.management.actions.WindowComparator;
import org.jboss.portal.faces.el.DelegatingPropertyResolver;
import org.jboss.portal.faces.el.decorator.SimpleBeanDecorator;
import org.jboss.portal.faces.el.decorator.AbstractPropertyDecorator;
@@ -82,18 +83,6 @@
public class PortalObjectManagerBean implements Serializable
{
- /** . */
- private static final int MOVE_UP = 0;
-
- /** . */
- private static final int MOVE_DOWN = 1;
-
- /** . */
- private static final int MOVE_LEFT = 2;
-
- /** . */
- private static final int MOVE_RIGHT = 3;
-
/** The serialVersionUID */
private static final long serialVersionUID = -8923517554726982622L;
@@ -203,24 +192,6 @@
/** The uri value for content. */
private String selectedContentURI;
- /** Compares two windows according to their order. */
- private static final Comparator comparator = new Comparator()
- {
- public int compare(Object o1, Object o2)
- {
- Window w1 = (Window)o1;
- Window w2 = (Window)o2;
- int sign = getOrder(w1) - getOrder(w2);
- if (sign == 0)
- {
- sign = 1;
- // sign = w1.getId().compareTo(w2.getId());
- }
-
- return sign;
- }
- };
-
public ContentType getSelectedContentType()
{
return selectedContentType;
@@ -384,26 +355,6 @@
return selectedPlugin;
}
-
- public String goBack()
- {
- PortalObject po = getSelectedObject();
- selectParentObject();
- if (po.getType() == PortalObject.TYPE_PORTAL)
- {
- return "portals";
- }
- else if (po.getType() == PortalObject.TYPE_PAGE)
- {
- return "pages";
- }
- else if (po.getType() == PortalObject.TYPE_WINDOW)
- {
- return "windows";
- }
- return "";
- }
-
public String modifySecurity()
{
// Update is made by JSF
@@ -664,197 +615,6 @@
Collections.sort(instances, comparator);
}
- private static int getOrder(Window w)
- {
- try
- {
- return Integer.parseInt(w.getDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER));
- }
- catch (NumberFormatException e)
- {
- return Integer.MAX_VALUE;
- }
- }
-
- public void moveUp()
- {
- try
- {
- Map pmap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
- String id = (String)pmap.get("id");
- PortalObjectId poid = PortalObjectId.parse(id, PortalObjectId.CANONICAL_FORMAT);
- Window target = (Window)portalObjectContainer.getObject(poid);
- move(target, MOVE_UP);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- public void moveDown()
- {
- try
- {
- Map pmap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
- String id = (String)pmap.get("id");
- PortalObjectId poid = PortalObjectId.parse(id, PortalObjectId.CANONICAL_FORMAT);
- Window target = (Window)portalObjectContainer.getObject(poid);
- move(target, MOVE_DOWN);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- public void moveRight()
- {
- try
- {
- Map pmap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
- String id = (String)pmap.get("id");
- PortalObjectId poid = PortalObjectId.parse(id, PortalObjectId.CANONICAL_FORMAT);
- Window target = (Window)portalObjectContainer.getObject(poid);
- move(target, MOVE_RIGHT);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- public void moveLeft()
- {
- try
- {
- Map pmap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
- String id = (String)pmap.get("id");
- PortalObjectId poid = PortalObjectId.parse(id, PortalObjectId.CANONICAL_FORMAT);
- Window target = (Window)portalObjectContainer.getObject(poid);
- move(target, MOVE_LEFT);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- public void move(Window target, int direction)
- {
- try
- {
- // Get region
- String region = target.getDeclaredProperty(ThemeConstants.PORTAL_PROP_REGION);
- if (region == null)
- {
- region = "unknown";
- }
-
- // Get page
- Page page = (Page)target.getParent();
-
- // Build the set of cols
- Map columns = getWindows(page);
-
- //
- List regions = new ArrayList(columns.keySet());
- Collections.sort(regions);
-
- // Do the move
- switch (direction)
- {
- case MOVE_UP:
- {
- List column = new ArrayList((SortedSet)columns.get(region));
- int order = column.indexOf(target);
- int newOrder = order - 1;
- if (newOrder >= 0 && newOrder < column.size())
- {
- column.set(order, column.set(newOrder, target));
- }
- for (int index = 0; index < column.size(); index++)
- {
- Window window = (Window)column.get(index);
- window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER, "" + index);
- }
- break;
- }
- case MOVE_DOWN:
- {
- List column = new ArrayList((SortedSet)columns.get(region));
- int order = column.indexOf(target);
- int newOrder = order + 1;
- if (newOrder >= 0 && newOrder < column.size())
- {
- column.set(order, column.set(newOrder, target));
- }
- for (int index = 0; index < column.size(); index++)
- {
- Window window = (Window)column.get(index);
- window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER, "" + index);
- }
- break;
- }
- case MOVE_RIGHT:
- {
- int index = regions.indexOf(region);
- if (index < regions.size() - 1)
- {
- String newRegion = (String)regions.get(index + 1);
- target.setDeclaredProperty(ThemeConstants.PORTAL_PROP_REGION, newRegion);
- target.setDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER, "" + Integer.MAX_VALUE);
- ((SortedSet)columns.get(region)).remove(target);
- ((SortedSet)columns.get(newRegion)).add(target);
- List column = new ArrayList((SortedSet)columns.get(newRegion));
- for (int i = 0; i < column.size(); i++)
- {
- Window window = (Window)column.get(i);
- window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER, "" + i);
- }
- }
- break;
- }
- case MOVE_LEFT:
- {
- int index = regions.indexOf(region);
- if (index > 0)
- {
- String newRegion = (String)regions.get(index - 1);
- target.setDeclaredProperty(ThemeConstants.PORTAL_PROP_REGION, newRegion);
- target.setDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER, "" + Integer.MAX_VALUE);
- ((SortedSet)columns.get(region)).remove(target);
- ((SortedSet)columns.get(newRegion)).add(target);
- List column = new ArrayList((SortedSet)columns.get(newRegion));
- for (int i = 0; i < column.size(); i++)
- {
- Window window = (Window)column.get(i);
- window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER, "" + i);
- }
- }
- break;
- }
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- public Map getWindowMap()
- {
- try
- {
- return getWindows((Page)getSelectedObject());
- }
- catch (Exception e)
- {
- e.printStackTrace();
- return Collections.EMPTY_MAP;
- }
- }
-
/** Returns a <Region,<Window>SortedSet>Map. */
private Map getWindows(Page page) throws Exception
{
@@ -867,9 +627,9 @@
for (Iterator i = layout.getLayoutInfo().getRegionNames().iterator(); i.hasNext();)
{
String region = (String)i.next();
- windows.put(region, new TreeSet(comparator));
+ windows.put(region, new TreeSet(new WindowComparator()));
}
- windows.put("unknown", new TreeSet(comparator));
+ windows.put("unknown", new TreeSet(new WindowComparator()));
//
for (Iterator j = getSelectedObject().getChildren().iterator(); j.hasNext();)
17 years, 3 months
JBoss Portal SVN: r6428 - in trunk/core-admin/src: resources/portal-admin-war/WEB-INF and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-27 11:46:32 -0500 (Tue, 27 Feb 2007)
New Revision: 6428
Removed:
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/AddWindowAction.java
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
Log:
removed obsolete AddWindowAction now
Deleted: trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/AddWindowAction.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/AddWindowAction.java 2007-02-27 16:33:48 UTC (rev 6427)
+++ trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/AddWindowAction.java 2007-02-27 16:46:32 UTC (rev 6428)
@@ -1,132 +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.core.portlet.management.actions;
-
-import org.jboss.portal.core.model.portal.Page;
-import org.jboss.portal.core.model.portal.Window;
-import org.jboss.portal.core.model.content.ContentType;
-import org.jboss.portal.core.portlet.management.PortalObjectManagerBean;
-import org.jboss.portal.theme.ThemeConstants;
-
-import javax.faces.application.FacesMessage;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.validator.ValidatorException;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 6082 $
- */
-public class AddWindowAction
-{
-
- /** . */
- private PortalObjectManagerBean pomgr;
-
- /** . */
- private String windowName;
-
- /** . */
- private String regionName;
-
- public PortalObjectManagerBean getPortalObjectManager()
- {
- return pomgr;
- }
-
- public void setPortalObjectManager(PortalObjectManagerBean portalObjectManager)
- {
- this.pomgr = portalObjectManager;
- }
-
- public String getWindowName()
- {
- return windowName;
- }
-
- public void setWindowName(String windowName)
- {
- this.windowName = windowName;
- }
-
- public String getRegionName()
- {
- return regionName;
- }
-
- public void setRegionName(String regionName)
- {
- this.regionName = regionName;
- }
-
- /**
- * Checks for duplicate window names on the page. Blank window names are not allowed and are controlled by the
- * required attribute in the presentation page.
- *
- * @param context
- * @param toValidate
- * @param value
- */
- public void validateWindowName(FacesContext context, UIComponent toValidate, Object value)
- {
- String windowName = (String)value;
-
- // check for empty string
- if (windowName.startsWith(" "))
- {
- String error = "Window name cannot be blank!";
- FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, error, error);
- throw new ValidatorException(message);
- }
-
- // check for duplicate window name
- Page page = (Page)pomgr.getSelectedObject();
- if (page.getWindow(windowName) != null)
- {
- String error = "Duplicate window name found on this page!";
- FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, error, error);
- throw new ValidatorException(message);
- }
- }
-
- public void execute()
- {
- try
- {
- Page page = (Page)pomgr.getSelectedObject();
-
- //
- ContentType contentType = pomgr.getSelectedContentType();
- String contentURI = pomgr.getSelectedContentURI();
-
- //
- Window window = page.createWindow(windowName, contentType, contentURI);
- window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_REGION, regionName);
- window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER, "" + Integer.MAX_VALUE);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-}
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-02-27 16:33:48 UTC (rev 6427)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-02-27 16:46:32 UTC (rev 6428)
@@ -90,15 +90,6 @@
</managed-property>
</managed-bean>
<managed-bean>
- <managed-bean-name>addWindowAction</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.portlet.management.actions.AddWindowAction</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- <managed-property>
- <property-name>portalObjectManager</property-name>
- <value>#{sessionScope.portalobjectmgr}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
<managed-bean-name>assignWindowsAction</managed-bean-name>
<managed-bean-class>org.jboss.portal.core.portlet.management.actions.AssignWindowsAction</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
17 years, 3 months
JBoss Portal SVN: r6426 - in trunk/core-admin/src: main/org/jboss/portal/core/portlet/management/actions and 2 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-27 11:31:00 -0500 (Tue, 27 Feb 2007)
New Revision: 6426
Added:
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/AssignWindowsAction.java
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/WindowComparator.java
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/editPageLayout.xhtml
Log:
layout manager redone using the dashboard editor technique
Modified: trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java 2007-02-27 16:24:11 UTC (rev 6425)
+++ trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java 2007-02-27 16:31:00 UTC (rev 6426)
@@ -842,6 +842,19 @@
}
}
+ public Map getWindowMap()
+ {
+ try
+ {
+ return getWindows((Page)getSelectedObject());
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ return Collections.EMPTY_MAP;
+ }
+ }
+
/** Returns a <Region,<Window>SortedSet>Map. */
private Map getWindows(Page page) throws Exception
{
@@ -877,18 +890,49 @@
}
/** Return the <Region>List on the selected object which must be a page. */
- public List getCols() throws Exception
+ public List getCols()
{
- Map windows = getWindows((Page)getSelectedObject());
+ try
+ {
+ Map windows = getWindows((Page)getSelectedObject());
- //
- List regions = new ArrayList(windows.keySet());
- Collections.sort(regions);
+ //
+ List regions = new ArrayList(windows.keySet());
+ Collections.sort(regions);
- //
- return regions;
+ //
+ return regions;
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+
+ //
+ return Collections.EMPTY_LIST;
+ }
}
+ public Map getWindowItemsMap() throws Exception
+ {
+ Map windowMap = getWindows((Page)getSelectedObject());
+ for (Iterator i = windowMap.entrySet().iterator();i.hasNext();)
+ {
+ Map.Entry entry = (Map.Entry)i.next();
+ SortedSet windows = (SortedSet)entry.getValue();
+ ArrayList windowItems = new ArrayList(windows.size());
+ for (Iterator j = windows.iterator();j.hasNext();)
+ {
+ Window window = (Window)j.next();
+ SelectItem windowItem = new SelectItem();
+ windowItem.setValue(window.getName());
+ windowItem.setLabel(window.getName());
+ windowItems.add(windowItem);
+ }
+ entry.setValue(windowItems);
+ }
+ return windowMap;
+ }
+
public List getRegionItems() throws Exception
{
List list = getCols();
Added: trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/AssignWindowsAction.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/AssignWindowsAction.java (rev 0)
+++ trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/AssignWindowsAction.java 2007-02-27 16:31:00 UTC (rev 6426)
@@ -0,0 +1,282 @@
+/******************************************************************************
+ * 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.core.portlet.management.actions;
+
+import org.jboss.portal.faces.el.dynamic.DynamicBean;
+import org.jboss.portal.faces.el.PropertyValue;
+import org.jboss.portal.core.model.content.ContentType;
+import org.jboss.portal.core.model.portal.Window;
+import org.jboss.portal.core.model.portal.Page;
+import org.jboss.portal.core.model.portal.NoSuchPortalObjectException;
+import org.jboss.portal.core.model.portal.DuplicatePortalObjectException;
+import org.jboss.portal.core.model.portal.PortalObject;
+import org.jboss.portal.core.portlet.management.PortalObjectManagerBean;
+import org.jboss.portal.theme.ThemeConstants;
+
+import javax.faces.event.ActionEvent;
+import javax.faces.context.FacesContext;
+import javax.faces.application.FacesMessage;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Collections;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class AssignWindowsAction
+{
+
+ /** . */
+ private static final int MOVE_UP = 'u';
+
+ /** . */
+ private static final int MOVE_DOWN = 'd';
+
+ /** . */
+ private static final int MOVE_LEFT = 'l';
+
+ /** . */
+ private static final int MOVE_RIGHT = 'r';
+
+ /** . */
+ private DynamicMap assignedWindows = new DynamicMap();
+
+ /** . */
+ private String windowName;
+
+ /** . */
+ private PortalObjectManagerBean pomgr;
+
+ /** . */
+ private ContentType contentType;
+
+ /** . */
+ private String contentURI;
+
+ public DynamicMap getAssignedWindows()
+ {
+ return assignedWindows;
+ }
+
+ public PortalObjectManagerBean getPortalObjectManager()
+ {
+ return pomgr;
+ }
+
+ public void setPortalObjectManager(PortalObjectManagerBean portalObjectManager)
+ {
+ this.pomgr = portalObjectManager;
+ }
+
+ public String getWindowName()
+ {
+ return windowName;
+ }
+
+ public void setWindowName(String windowName)
+ {
+ this.windowName = windowName;
+ }
+
+ public void execute(ActionEvent event)
+ {
+ String id = event.getComponent().getId();
+ char direction = id.charAt(0);
+ String regionName = id.substring(2);
+
+ // Contains the names selected window in the UI
+ List selectedWindows = (List)assignedWindows.values.get(regionName);
+
+ //
+ Page page = (Page)pomgr.getSelectedObject();
+
+ // Get the windows belonging to the selected region sorted by order
+ List windows = new ArrayList();
+ for (Iterator i = page.getChildren(PortalObject.WINDOW_MASK).iterator();i.hasNext();)
+ {
+ Window window = (Window)i.next();
+ if (regionName.equals(window.getProperty(ThemeConstants.PORTAL_PROP_REGION)))
+ {
+ windows.add(window);
+ }
+ }
+ Collections.sort(windows, new WindowComparator());
+
+ //
+ if (direction == MOVE_UP || direction == MOVE_DOWN)
+ {
+ //
+ int index = direction == MOVE_UP ? 1 : windows.size() - 2;
+ int length = windows.size() - 1;
+ int step = direction == MOVE_UP ? 1 : -1;
+
+ // Perform swaps
+ while (length-- > 0)
+ {
+ Window window = (Window)windows.get(index);
+ if (selectedWindows.contains(window.getName()))
+ {
+ Collections.swap(windows, index - step, index);
+ }
+ index += step;
+ }
+ }
+ else if (direction == MOVE_LEFT)
+ {
+ for (Iterator i = windows.iterator();i.hasNext();)
+ {
+ Window window = (Window)i.next();
+ if (selectedWindows.contains(window.getName()))
+ {
+ i.remove();
+ try
+ {
+ page.destroyChild(window.getName());
+ }
+ catch (NoSuchPortalObjectException ignore)
+ {
+ ignore.printStackTrace();
+ }
+ }
+ }
+ }
+ else if (direction == MOVE_RIGHT)
+ {
+ //
+ if (validateAddWindow())
+ {
+ try
+ {
+ ContentType contentType = pomgr.getSelectedContentType();
+ String contentURI = pomgr.getSelectedContentURI();
+
+ //
+ Window window = page.createWindow(windowName, contentType, contentURI);
+ window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_REGION, regionName);
+ window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER, "" + Integer.MAX_VALUE);
+ windows.add(window);
+ }
+ catch (DuplicatePortalObjectException unexpected)
+ {
+ unexpected.printStackTrace();
+ }
+ }
+ }
+
+
+ // Update the order states
+ for (int i = 0;i < windows.size();i++)
+ {
+ Window window = (Window)windows.get(i);
+ window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER, "" + i);
+ }
+ }
+
+ /**
+ * Checks for duplicate window names on the page. Blank window names are not allowed and are
+ * controlled by the required attribute in the presentation page.
+ */
+ public boolean validateAddWindow()
+ {
+ if (windowName == null)
+ {
+ FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, "No window name!", null);
+ FacesContext.getCurrentInstance().addMessage("windowName", message);
+ return false;
+ }
+
+ // Trim name
+ windowName = windowName.trim();
+
+ // Check for empty string
+ if (windowName.length() == 0)
+ {
+ FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Window name cannot be blank!", null);
+ FacesContext.getCurrentInstance().addMessage("windowName", message);
+ return false;
+ }
+
+ // Check for duplicate window name
+ Page page = (Page)pomgr.getSelectedObject();
+ if (page.getWindow(windowName) != null)
+ {
+ FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Duplicate window name found on this page!", null);
+ FacesContext.getCurrentInstance().addMessage("windowName", message);
+ return false;
+ }
+
+ //
+ contentType = pomgr.getSelectedContentType();
+ if (contentType == null)
+ {
+ FacesMessage message = new FacesMessage("No content type provided!", null);
+ FacesContext.getCurrentInstance().addMessage("instanceId", message);
+ return false;
+ }
+
+ //
+ contentURI = pomgr.getSelectedContentURI();
+ if (contentURI == null)
+ {
+ FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, "No portlet selected!", null);
+ FacesContext.getCurrentInstance().addMessage("instanceId", message);
+ return false;
+ }
+
+ //
+ return true;
+ }
+
+ public static class DynamicMap implements DynamicBean
+ {
+
+ /** . */
+ private Map values = new HashMap();
+
+ public Class getType(Object propertyName) throws IllegalArgumentException
+ {
+ return List.class;
+ }
+
+ public PropertyValue getValue(Object propertyName) throws IllegalArgumentException
+ {
+ List list = (List)values.get(propertyName);
+ if (list == null)
+ {
+ list = new ArrayList();
+ values.put(propertyName, list);
+ }
+ return new PropertyValue(list);
+ }
+
+ public boolean setValue(Object propertyName, Object value) throws IllegalArgumentException
+ {
+ values.put(propertyName, value);
+ return true;
+ }
+ }
+}
Added: trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/WindowComparator.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/WindowComparator.java (rev 0)
+++ trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/WindowComparator.java 2007-02-27 16:31:00 UTC (rev 6426)
@@ -0,0 +1,62 @@
+/******************************************************************************
+ * 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.core.portlet.management.actions;
+
+import org.jboss.portal.core.model.portal.Window;
+import org.jboss.portal.theme.ThemeConstants;
+
+import java.util.Comparator;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class WindowComparator implements Comparator
+{
+
+ public int compare(Object o1, Object o2)
+ {
+ Window w1 = (Window)o1;
+ Window w2 = (Window)o2;
+ int sign = getOrder(w1) - getOrder(w2);
+ if (sign == 0)
+ {
+ sign = 1;
+ // sign = w1.getId().compareTo(w2.getId());
+ }
+
+ return sign;
+ }
+
+ private static int getOrder(Window w)
+ {
+ try
+ {
+ return Integer.parseInt(w.getDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER));
+ }
+ catch (NumberFormatException e)
+ {
+ return Integer.MAX_VALUE;
+ }
+ }
+}
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-02-27 16:24:11 UTC (rev 6425)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-02-27 16:31:00 UTC (rev 6426)
@@ -99,6 +99,15 @@
</managed-property>
</managed-bean>
<managed-bean>
+ <managed-bean-name>assignWindowsAction</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.core.portlet.management.actions.AssignWindowsAction</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>portalObjectManager</property-name>
+ <value>#{sessionScope.portalobjectmgr}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
<managed-bean-name>themePropertyAction</managed-bean-name>
<managed-bean-class>org.jboss.portal.core.portlet.management.actions.ThemePropertyAction</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/editPageLayout.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/editPageLayout.xhtml 2007-02-27 16:24:11 UTC (rev 6425)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/editPageLayout.xhtml 2007-02-27 16:31:00 UTC (rev 6426)
@@ -4,7 +4,8 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:t="http://myfaces.apache.org/tomahawk"
- xmlns:ct="http://www.julien.com">
+ xmlns:ct="http://www.julien.com"
+ xmlns:c="http://java.sun.com/jstl/core">
<ui:composition template="/WEB-INF/jsp/management/objectTemplate.xhtml">
@@ -16,74 +17,78 @@
<hr />
- <h:form id="page_form_2">
- <t:dataTable
- id="data"
- var="row"
- value="#{portalobjectmgr.rows}"
- border="1">
- <t:columns value="#{portalobjectmgr.cols}" var="col">
- <f:facet name="header">
- <h:outputText value="#{col}"/>
- </f:facet>
- <h:commandLink rendered="#{row[col] != null}" action="#{portalobjectmgr.moveUp}">
- <f:param name="id" value="#{row[col].id}"/>
- <h:graphicImage value="/images/management/up.png" style="vertical-align:middle;border-width:0"/>
- </h:commandLink>
- <h:commandLink rendered="#{row[col] != null}" action="#{portalobjectmgr.moveDown}">
- <f:param name="id" value="#{row[col].id}"/>
- <h:graphicImage value="/images/management/down.png" style="vertical-align:middle;border-width:0"/>
- </h:commandLink>
- <h:commandLink rendered="#{row[col] != null}" action="#{portalobjectmgr.moveLeft}">
- <f:param name="id" value="#{row[col].id}"/>
- <h:graphicImage value="/images/management/left.png" style="vertical-align:middle;border-width:0"/>
- </h:commandLink>
- <h:commandLink rendered="#{row[col] != null}" action="#{portalobjectmgr.moveRight}">
- <f:param name="id" value="#{row[col].id}"/>
- <h:graphicImage value="/images/management/right.png" style="vertical-align:middle;border-width:0"/>
- </h:commandLink>
- <h:commandLink rendered="#{row[col] != null}" action="#{portalobjectmgr.selectObject}">
- <f:param name="id" value="#{row[col].id}"/>
- <h:outputText value="#{row[col].name}"/>
- </h:commandLink>
- </t:columns>
- </t:dataTable>
-
- </h:form>
-
- <!-- -->
-
- <hr />
-
- <h:form id="page_form_3">
- <h:message for="windowName" style="color: red"/>
- <br />
- <br />
- <h:selectOneMenu
- value="#{portalobjectmgr.selectedContentType}">
- <f:selectItems value="#{registry.availableTypes}"/>
- </h:selectOneMenu>
- <h:commandButton
- value="Change content type" styleClass="portlet-form-button"/>
- <ct:content
- contentType="#{portalobjectmgr.selectedContentType}"
- contentURI="#{portalobjectmgr.selectedContentURI}"/>
-
- <br/>
-
+ <h:form>
<h:panelGroup>
- <h:outputLabel for="windowName">
- <h:outputText value="New Window Name: " style="font-weight:bold;"/>
- </h:outputLabel>
- <h:inputText id="windowName" value="#{addWindowAction.windowName}"
- validator="#{addWindowAction.validateWindowName}"
- required="true"/>
- <h:selectOneMenu value="#{addWindowAction.regionName}">
- <f:selectItems value="#{portalobjectmgr.regionItems}"></f:selectItems>
- </h:selectOneMenu>
- <h:commandButton value="Add window" action="#{addWindowAction.execute}" styleClass="portlet-form-button"/>
+ <table>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <td>
+ <h:selectOneMenu
+ id="instanceId"
+ value="#{portalobjectmgr.selectedContentType}">
+ <f:selectItems value="#{registry.availableTypes}"/>
+ </h:selectOneMenu>
+ <h:message for="instanceId"/>
+ <h:commandButton value="Change content type" styleClass="portlet-form-button"/>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ct:content
+ contentType="#{portalobjectmgr.selectedContentType}"
+ contentURI="#{portalobjectmgr.selectedContentURI}"/>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <h:outputLabel for="windowName">
+ <h:outputText value="Window Name: " style="font-weight:bold;"/>
+ </h:outputLabel>
+ <h:inputText id="windowName" value="#{assignWindowsAction.windowName}"/>
+ <h:message for="windowName"/>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td>
+ <c:forEach items="#{portalobjectmgr.cols}" var="regionName">
+ <table>
+ <tr>
+ <td colspan="3">#{regionName} Column</td>
+ </tr>
+ <tr>
+ <td>
+ <div>
+ <h:commandButton value="<-" id="l_#{regionName}" actionListener="#{assignWindowsAction.execute}" styleClass="portlet-form-button"/>
+ </div>
+ <div>
+ <h:commandButton value="->" id="r_#{regionName}" actionListener="#{assignWindowsAction.execute}" styleClass="portlet-form-button"/>
+ </div>
+ </td>
+ <td>
+ <h:selectManyListbox
+ value="#{assignWindowsAction.assignedWindows[regionName]}"
+ size="7">
+ <f:selectItems value="#{portalobjectmgr.windowItemsMap[regionName]}"/>
+ </h:selectManyListbox>
+ </td>
+ <td>
+ <div>
+ <h:commandButton value="Up" id="u_#{regionName}" actionListener="#{assignWindowsAction.execute}" styleClass="portlet-form-button"/>
+ </div>
+ <div>
+ <h:commandButton value="Down" id="d_#{regionName}" actionListener="#{assignWindowsAction.execute}" styleClass="portlet-form-button"/>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </c:forEach>
+ </td>
+ </tr>
+ </table>
</h:panelGroup>
-
</h:form>
</ui:define>
17 years, 3 months