Author: nbelaevski
Date: 2007-11-16 19:29:20 -0500 (Fri, 16 Nov 2007)
New Revision: 4068
Added:
trunk/sandbox/ui/listShuttle/src/main/config/component/listShuttle.xml
trunk/sandbox/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java
Modified:
trunk/sandbox/ui/listShuttle/pom.xml
Log:
listShuttle work in progress
Modified: trunk/sandbox/ui/listShuttle/pom.xml
===================================================================
--- trunk/sandbox/ui/listShuttle/pom.xml 2007-11-17 00:29:14 UTC (rev 4067)
+++ trunk/sandbox/ui/listShuttle/pom.xml 2007-11-17 00:29:20 UTC (rev 4068)
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>${project.version}</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -32,5 +32,13 @@
</configuration>
</plugin>
</plugins>
- </build>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <artifactId>orderingList</artifactId>
+ <groupId>org.richfaces.sandbox.ui</groupId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
</project>
\ No newline at end of file
Added: trunk/sandbox/ui/listShuttle/src/main/config/component/listShuttle.xml
===================================================================
--- trunk/sandbox/ui/listShuttle/src/main/config/component/listShuttle.xml
(rev 0)
+++ trunk/sandbox/ui/listShuttle/src/main/config/component/listShuttle.xml 2007-11-17
00:29:20 UTC (rev 4068)
@@ -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>
Added:
trunk/sandbox/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java
===================================================================
--- trunk/sandbox/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java
(rev 0)
+++
trunk/sandbox/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java 2007-11-17
00:29:20 UTC (rev 4068)
@@ -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;
+ }
+
+
+}
Show replies by date