Author: nbelaevski
Date: 2007-11-18 21:02:35 -0500 (Sun, 18 Nov 2007)
New Revision: 4074
Added:
branches/3.1.x/sandbox/samples/listShuttleDemo/
branches/3.1.x/sandbox/samples/listShuttleDemo/pom.xml
branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleDemoBean.java
branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleOptionItem.java
branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/webapp/WEB-INF/faces-config.xml
branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/webapp/pages/index.jsp
branches/3.1.x/sandbox/ui/listShuttle/
branches/3.1.x/sandbox/ui/listShuttle/pom.xml
branches/3.1.x/sandbox/ui/listShuttle/src/main/config/component/listShuttle.xml
branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java
Removed:
branches/3.1.x/sandbox/samples/listShuttleDemo/pom.xml
branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/java/org/richfaces/Bean.java
branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/webapp/WEB-INF/faces-config.xml
branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/webapp/pages/index.jsp
branches/3.1.x/sandbox/ui/listShuttle/pom.xml
Modified:
branches/3.1.x/sandbox/samples/pom.xml
branches/3.1.x/sandbox/ui/pom.xml
Log:
listShuttle moved to 3.1.x sandbox
Copied: branches/3.1.x/sandbox/samples/listShuttleDemo (from rev 4064,
trunk/sandbox/samples/listShuttleDemo)
Deleted: branches/3.1.x/sandbox/samples/listShuttleDemo/pom.xml
===================================================================
--- trunk/sandbox/samples/listShuttleDemo/pom.xml 2007-11-17 00:19:41 UTC (rev 4064)
+++ branches/3.1.x/sandbox/samples/listShuttleDemo/pom.xml 2007-11-19 02:02:35 UTC (rev
4074)
@@ -1,23 +0,0 @@
-<?xml version="1.0"?>
-<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <artifactId>samples</artifactId>
- <groupId>org.richfaces.sandbox</groupId>
- <version>3.2.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces.sandbox.samples</groupId>
- <artifactId>listShuttleDemo</artifactId>
- <packaging>war</packaging>
- <name>listShuttleDemo Maven Webapp</name>
- <build>
- <finalName>listShuttleDemo</finalName>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.richfaces.sandbox.ui</groupId>
- <artifactId>listShuttle</artifactId>
- <version>3.2.0-SNAPSHOT</version>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
Copied: branches/3.1.x/sandbox/samples/listShuttleDemo/pom.xml (from rev 4072,
trunk/sandbox/samples/listShuttleDemo/pom.xml)
===================================================================
--- branches/3.1.x/sandbox/samples/listShuttleDemo/pom.xml (rev
0)
+++ branches/3.1.x/sandbox/samples/listShuttleDemo/pom.xml 2007-11-19 02:02:35 UTC (rev
4074)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>samples</artifactId>
+ <groupId>org.richfaces.sandbox</groupId>
+ <version>3.1.3-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.sandbox.samples</groupId>
+ <artifactId>listShuttleDemo</artifactId>
+ <packaging>war</packaging>
+ <name>listShuttleDemo Maven Webapp</name>
+ <build>
+ <finalName>listShuttleDemo</finalName>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.sandbox.ui</groupId>
+ <artifactId>listShuttle</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Deleted:
branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/sandbox/samples/listShuttleDemo/src/main/java/org/richfaces/Bean.java 2007-11-17
00:19:41 UTC (rev 4064)
+++
branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/java/org/richfaces/Bean.java 2007-11-19
02:02:35 UTC (rev 4074)
@@ -1,29 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces;
-/**
- * @author $Autor$
- *
- */
-public class Bean {
-
-}
\ No newline at end of file
Copied:
branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleDemoBean.java
(from rev 4067,
trunk/sandbox/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleDemoBean.java)
===================================================================
---
branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleDemoBean.java
(rev 0)
+++
branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleDemoBean.java 2007-11-19
02:02:35 UTC (rev 4074)
@@ -0,0 +1,45 @@
+/**
+ *
+ */
+package org.richfaces;
+
+import java.util.List;
+import java.util.Random;
+
+/**
+ * @author Nick Belaevski
+ * mailto:nbelaevski@exadel.com
+ * created 16.11.2007
+ *
+ */
+public class ListShuttleDemoBean {
+ private ListShuttleOptionItem[] source;
+
+ private List<ListShuttleOptionItem> target;
+
+ public ListShuttleDemoBean() {
+ super();
+
+ source = new ListShuttleOptionItem[10];
+ for (int i = 0; i < source.length; i++) {
+ source[i] = new ListShuttleOptionItem("Item " + i, new
Random().nextInt(40));
+ }
+ }
+
+ public ListShuttleOptionItem[] getSource() {
+ return source;
+ }
+
+ public void setSource(ListShuttleOptionItem[] source) {
+ this.source = source;
+ }
+
+ public List<ListShuttleOptionItem> getTarget() {
+ return target;
+ }
+
+ public void setTarget(List<ListShuttleOptionItem> target) {
+ this.target = target;
+ }
+
+}
Copied:
branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleOptionItem.java
(from rev 4067,
trunk/sandbox/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleOptionItem.java)
===================================================================
---
branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleOptionItem.java
(rev 0)
+++
branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleOptionItem.java 2007-11-19
02:02:35 UTC (rev 4074)
@@ -0,0 +1,40 @@
+/**
+ *
+ */
+package org.richfaces;
+
+
+/**
+ * @author Nick Belaevski
+ * mailto:nbelaevski@exadel.com
+ * created 16.11.2007
+ *
+ */
+public class ListShuttleOptionItem {
+ private String name;
+ private int price;
+
+ public ListShuttleOptionItem(String name, int price) {
+ super();
+ this.name = name;
+ this.price = price;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public int getPrice() {
+ return price;
+ }
+
+ @Override
+ public String toString() {
+ return this.getClass().getSimpleName() + " [" + name + "] by " +
price;
+ }
+
+}
Deleted:
branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
---
trunk/sandbox/samples/listShuttleDemo/src/main/webapp/WEB-INF/faces-config.xml 2007-11-17
00:19:41 UTC (rev 4064)
+++
branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/webapp/WEB-INF/faces-config.xml 2007-11-19
02:02:35 UTC (rev 4074)
@@ -1,10 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces
Config 1.1//EN"
-
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
-<faces-config>
- <managed-bean>
- <managed-bean-name>bean</managed-bean-name>
- <managed-bean-class>org.richfaces.Bean</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- </managed-bean>
-</faces-config>
Copied:
branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/webapp/WEB-INF/faces-config.xml
(from rev 4067,
trunk/sandbox/samples/listShuttleDemo/src/main/webapp/WEB-INF/faces-config.xml)
===================================================================
---
branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/webapp/WEB-INF/faces-config.xml
(rev 0)
+++
branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/webapp/WEB-INF/faces-config.xml 2007-11-19
02:02:35 UTC (rev 4074)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces
Config 1.1//EN"
+
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+ <managed-bean>
+ <managed-bean-name>listShuttleDemoBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.ListShuttleDemoBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+</faces-config>
Deleted: branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/listShuttleDemo/src/main/webapp/pages/index.jsp 2007-11-17
00:19:41 UTC (rev 4064)
+++
branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/webapp/pages/index.jsp 2007-11-19
02:02:35 UTC (rev 4074)
@@ -1,12 +0,0 @@
-<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
-<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f"%>
-<html>
- <head>
- <title></title>
- </head>
- <body>
- <f:view>
-
- </f:view>
- </body>
-</html>
Copied: branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/webapp/pages/index.jsp
(from rev 4067, trunk/sandbox/samples/listShuttleDemo/src/main/webapp/pages/index.jsp)
===================================================================
--- branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/webapp/pages/index.jsp
(rev 0)
+++
branches/3.1.x/sandbox/samples/listShuttleDemo/src/main/webapp/pages/index.jsp 2007-11-19
02:02:35 UTC (rev 4074)
@@ -0,0 +1,23 @@
+<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f"%>
+
+<%@ taglib
uri="http://labs.jboss.com/jbossrichfaces/ui/ui/listShuttle"
prefix="ls" %>
+
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+ <f:view>
+ <h:form>
+ <ls:listShuttle sourceValue="#{listShuttleDemoBean.source}"
targetValue="#{listShuttleDemoBean.target}">
+
+ </ls:listShuttle>
+
+
+ <h:commandButton value="Submit" />
+ <h:commandButton value="Submit Immediate" immediate="true"
/>
+ </h:form>
+ </f:view>
+ </body>
+</html>
Modified: branches/3.1.x/sandbox/samples/pom.xml
===================================================================
--- branches/3.1.x/sandbox/samples/pom.xml 2007-11-19 02:01:28 UTC (rev 4073)
+++ branches/3.1.x/sandbox/samples/pom.xml 2007-11-19 02:02:35 UTC (rev 4074)
@@ -14,5 +14,6 @@
<module>panel2-sample</module>
<module>simpleTogglePanel2-sample</module>
- </modules>
+ <module>listShuttleDemo</module>
+ </modules>
</project>
\ No newline at end of file
Copied: branches/3.1.x/sandbox/ui/listShuttle (from rev 4064,
trunk/sandbox/ui/listShuttle)
Deleted: branches/3.1.x/sandbox/ui/listShuttle/pom.xml
===================================================================
--- trunk/sandbox/ui/listShuttle/pom.xml 2007-11-17 00:19:41 UTC (rev 4064)
+++ branches/3.1.x/sandbox/ui/listShuttle/pom.xml 2007-11-19 02:02:35 UTC (rev 4074)
@@ -1,36 +0,0 @@
-<?xml version="1.0"?><project>
- <parent>
- <artifactId>ui</artifactId>
- <groupId>org.richfaces.sandbox</groupId>
- <version>3.2.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces.sandbox.ui</groupId>
- <artifactId>listShuttle</artifactId>
- <name>listShuttle</name>
- <build>
- <plugins>
- <plugin>
- <groupId>org.richfaces.cdk</groupId>
- <artifactId>maven-cdk-plugin</artifactId>
- <version>3.2.0-SNAPSHOT</version>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <library>
- <prefix>org.richfaces</prefix>
- <taglib>
- <shortName>listShuttle</shortName>
- </taglib>
- </library>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
Copied: branches/3.1.x/sandbox/ui/listShuttle/pom.xml (from rev 4072,
trunk/sandbox/ui/listShuttle/pom.xml)
===================================================================
--- branches/3.1.x/sandbox/ui/listShuttle/pom.xml (rev 0)
+++ branches/3.1.x/sandbox/ui/listShuttle/pom.xml 2007-11-19 02:02:35 UTC (rev 4074)
@@ -0,0 +1,44 @@
+<?xml version="1.0"?><project>
+ <parent>
+ <artifactId>ui</artifactId>
+ <groupId>org.richfaces.sandbox</groupId>
+ <version>3.1.3-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.sandbox.ui</groupId>
+ <artifactId>listShuttle</artifactId>
+ <name>listShuttle</name>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ <version>${project.version}</version>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <library>
+ <prefix>org.richfaces</prefix>
+ <taglib>
+ <shortName>listShuttle</shortName>
+ </taglib>
+ </library>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <artifactId>orderingList</artifactId>
+ <groupId>org.richfaces.ui</groupId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Copied: branches/3.1.x/sandbox/ui/listShuttle/src/main/config/component/listShuttle.xml
(from rev 4068, trunk/sandbox/ui/listShuttle/src/main/config/component/listShuttle.xml)
===================================================================
--- branches/3.1.x/sandbox/ui/listShuttle/src/main/config/component/listShuttle.xml
(rev 0)
+++
branches/3.1.x/sandbox/ui/listShuttle/src/main/config/component/listShuttle.xml 2007-11-19
02:02:35 UTC (rev 4074)
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
"https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<components>
+ <component>
+ <name>org.richfaces.ListShuttle</name>
+ <family>org.richfaces.ListShuttle</family>
+ <classname>org.richfaces.component.html.HtmlListShuttle</classname>
+ <superclass>org.richfaces.component.UIListShuttle</superclass>
+ <description>
+ <![CDATA[
+ ]]>
+ </description>
+ <renderer generate="true" override="true">
+ <name>org.richfaces.ListShuttleRenderer</name>
+ <template>org/richfaces/htmlListShuttle.jspx</template>
+ </renderer>
+ <tag>
+ <name>listShuttle</name>
+ <classname>org.richfaces.taglib.ListShuttleTag</classname>
+ <superclass>
+ org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
+ </superclass>
+ </tag>
+ <!--
+ <taghandler>
+ <classname>org.ajax4jsf.tag.TestHandler</classname>
+ </taghandler>
+ -->
+ &ui_component_attributes;
+ <!--
+ <property>
+ <name>param</name>
+ <classname>java.lang.String</classname>
+ <description>
+ </description>
+ <defaultvalue>"default"</defaultvalue>
+ </property>
+ -->
+ <property hidden="true" el="false">
+ <name>submittedValue</name>
+ </property>
+ <property hidden="true" el="false"
exist="true">
+ <name>submittedString</name>
+ </property>
+ <property hidden="true" el="false">
+ <name>localValueSet</name>
+ </property>
+ <property hidden="true" el="false">
+ <name>valid</name>
+ </property>
+ <property elonly="true">
+ <name>validator</name>
+ <classname>javax.faces.el.MethodBinding</classname>
+ <methodargs>javax.faces.event.ValueChangeEvent</methodargs>
+ </property>
+ <property hidden="true">
+ <name>value</name>
+ </property>
+
+ </component>
+</components>
Copied:
branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java
(from rev 4068,
trunk/sandbox/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java)
===================================================================
---
branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java
(rev 0)
+++
branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java 2007-11-19
02:02:35 UTC (rev 4074)
@@ -0,0 +1,81 @@
+/**
+ *
+ */
+
+package org.richfaces.component;
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+import org.ajax4jsf.component.UIDataAdaptor;
+
+/**
+ * JSF component class
+ *
+ */
+public abstract class UIListShuttle extends UIDataAdaptor {
+
+ public static final String COMPONENT_TYPE = "org.richfaces.ListShuttle";
+
+ public static final String COMPONENT_FAMILY = "org.richfaces.ListShuttle";
+
+ private Object sourceValue;
+ private boolean sourceValueSet;
+
+ private Object targetValue;
+ private boolean targetValueSet;
+
+ public Object saveState(FacesContext context) {
+ // TODO Auto-generated method stub
+ return super.saveState(context);
+ }
+
+ public void restoreState(FacesContext context, Object state) {
+ // TODO Auto-generated method stub
+ super.restoreState(context, state);
+ }
+
+ public Object getLocalSourceValue() {
+ return sourceValue;
+ }
+
+ public Object getSourceValue() {
+ if (sourceValue != null) {
+ return sourceValue;
+ }
+
+ ValueBinding vb = getValueBinding("sourceValue");
+ if (vb != null) {
+ return vb.getValue(FacesContext.getCurrentInstance());
+ }
+
+ return null;
+ }
+
+ public void setSourceValue(Object sourceValue) {
+ this.sourceValue = sourceValue;
+ }
+
+ public Object getLocalTargetValue() {
+ return sourceValue;
+ }
+
+ public Object getTargetValue() {
+ if (sourceValue != null) {
+ return sourceValue;
+ }
+
+ ValueBinding vb = getValueBinding("sourceValue");
+ if (vb != null) {
+ return vb.getValue(FacesContext.getCurrentInstance());
+ }
+
+ return null;
+ }
+
+ public void setTargetValue(Object targetValue) {
+ this.targetValue = targetValue;
+ }
+
+
+}
Modified: branches/3.1.x/sandbox/ui/pom.xml
===================================================================
--- branches/3.1.x/sandbox/ui/pom.xml 2007-11-19 02:01:28 UTC (rev 4073)
+++ branches/3.1.x/sandbox/ui/pom.xml 2007-11-19 02:02:35 UTC (rev 4074)
@@ -13,6 +13,7 @@
<modules>
<module>panel2</module>
<module>simpleTogglePanel2</module>
+ <module>listShuttle</module>
<module>state</module>
</modules>
</project>
\ No newline at end of file