Author: abelevich
Date: 2008-07-11 07:18:34 -0400 (Fri, 11 Jul 2008)
New Revision: 9524
Added:
trunk/samples/listShuttleDemo/src/main/java/org/richfaces/Capital.java
trunk/samples/listShuttleDemo/src/main/java/org/richfaces/CapitalsBean.java
trunk/samples/listShuttleDemo/src/main/java/org/richfaces/Converter.java
trunk/samples/listShuttleDemo/src/main/java/org/richfaces/TestBean.java
trunk/samples/listShuttleDemo/src/main/java/org/richfaces/capitals-rules.xml
trunk/samples/listShuttleDemo/src/main/java/org/richfaces/capitals.xml
trunk/samples/listShuttleDemo/src/main/java/org/richfaces/digester-rules.dtd
trunk/samples/listShuttleDemo/src/main/webapp/images/
trunk/samples/listShuttleDemo/src/main/webapp/images/alabama.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/alaska.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/arizona.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/arkansas.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/california.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/colorado.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/connecticut.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/delaware.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/florida.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/georgia.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/hawaii.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/idaho.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/illinois.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/indiana.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/iowa.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/kansas.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/kentucky.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/louisiana.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/maine.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/maryland.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/massachusetts.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/michigan.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/minnesota.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/mississippi.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/missouri.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/montana.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/nebraska.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/nevada.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/newhampshire.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/newjersey.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/newmexico.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/newyork.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/northcarolina.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/northdakota.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/ohio.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/oklahoma.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/oregon.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/pennsylvania.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/rhodeisland.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/southcarolina.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/southdakota.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/tennessee.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/texas.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/utah.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/vermont.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/virginia.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/washington.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/westvirginia.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/wisconsin.gif
trunk/samples/listShuttleDemo/src/main/webapp/images/wyoming.gif
trunk/samples/listShuttleDemo/src/main/webapp/pages/RF3830.xhtml
Modified:
trunk/samples/listShuttleDemo/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/listShuttleDemo/src/main/webapp/WEB-INF/web.xml
Log:
demo for the RF-3830
Added: trunk/samples/listShuttleDemo/src/main/java/org/richfaces/Capital.java
===================================================================
--- trunk/samples/listShuttleDemo/src/main/java/org/richfaces/Capital.java
(rev 0)
+++ trunk/samples/listShuttleDemo/src/main/java/org/richfaces/Capital.java 2008-07-11
11:18:34 UTC (rev 9524)
@@ -0,0 +1,51 @@
+package org.richfaces;
+
+import java.io.Serializable;
+
+public class Capital implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -1042449580199397136L;
+ private boolean checked=false;
+ private String name;
+ private String state;
+ private String timeZone;
+
+ private final static String FILE_EXT = ".gif";
+ public Capital() {
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public String getState() {
+ return state;
+ }
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ private String stateNameToFileName() {
+ return state.replaceAll("\\s", "").toLowerCase();
+ }
+
+ public String getStateFlag() {
+ return "/images/" + stateNameToFileName() + FILE_EXT;
+ }
+
+ public String getTimeZone() {
+ return timeZone;
+ }
+ public void setTimeZone(String timeZone) {
+ this.timeZone = timeZone;
+ }
+ public boolean isChecked() {
+ return checked;
+ }
+ public void setChecked(boolean checked) {
+ this.checked = checked;
+ }
+}
Added: trunk/samples/listShuttleDemo/src/main/java/org/richfaces/CapitalsBean.java
===================================================================
--- trunk/samples/listShuttleDemo/src/main/java/org/richfaces/CapitalsBean.java
(rev 0)
+++ trunk/samples/listShuttleDemo/src/main/java/org/richfaces/CapitalsBean.java 2008-07-11
11:18:34 UTC (rev 9524)
@@ -0,0 +1,84 @@
+package org.richfaces;
+
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.faces.FacesException;
+import javax.faces.model.SelectItem;
+
+import org.apache.commons.digester.Digester;
+import org.apache.commons.digester.xmlrules.DigesterLoader;
+import org.xml.sax.SAXException;
+
+public class CapitalsBean {
+ private ArrayList<Capital> capitals = new ArrayList<Capital>();
+ private ArrayList<String> capitalsNames = new ArrayList<String>();
+ private List<SelectItem> capitalsOptions = new ArrayList<SelectItem>();
+ private String capital = "";
+
+ public List<Capital> autocomplete(Object suggest) {
+ String pref = (String)suggest;
+ ArrayList<Capital> result = new ArrayList<Capital>();
+
+ Iterator<Capital> iterator = getCapitals().iterator();
+ while (iterator.hasNext()) {
+ Capital elem = ((Capital) iterator.next());
+ if ((elem.getName() != null &&
elem.getName().toLowerCase().indexOf(pref.toLowerCase()) == 0) ||
"".equals(pref))
+ {
+ result.add(elem);
+ }
+ }
+ return result;
+ }
+
+ public CapitalsBean() {
+ URL rulesUrl = getClass().getResource("capitals-rules.xml");
+ Digester digester = DigesterLoader.createDigester(rulesUrl);
+ digester.push(this);
+ try {
+ digester.parse(getClass().getResourceAsStream("capitals.xml"));
+ } catch (IOException e) {
+ throw new FacesException(e);
+ } catch (SAXException e) {
+ throw new FacesException(e);
+ }
+ capitalsNames.clear();
+ for (Capital cap : capitals) {
+ capitalsNames.add(cap.getName());
+ }
+ capitalsOptions.clear();
+ for (Capital cap : capitals) {
+ capitalsOptions.add(new SelectItem(cap.getName(),cap.getState()));
+ }
+ }
+
+ public String addCapital(Capital capital) {
+ capitals.add(capital);
+ return null;
+ }
+
+ public ArrayList<Capital> getCapitals() {
+ return capitals;
+ }
+
+ public String getCapital() {
+ return capital;
+ }
+
+ public void setCapital(String capital) {
+ this.capital = capital;
+ }
+
+ public List<SelectItem> getCapitalsOptions() {
+ return capitalsOptions;
+ }
+
+ public ArrayList<String> getCapitalsNames() {
+ return capitalsNames;
+ }
+
+}
Added: trunk/samples/listShuttleDemo/src/main/java/org/richfaces/Converter.java
===================================================================
--- trunk/samples/listShuttleDemo/src/main/java/org/richfaces/Converter.java
(rev 0)
+++ trunk/samples/listShuttleDemo/src/main/java/org/richfaces/Converter.java 2008-07-11
11:18:34 UTC (rev 9524)
@@ -0,0 +1,17 @@
+package org.richfaces;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+public class Converter implements javax.faces.convert.Converter{
+
+ public Object getAsObject(FacesContext context, UIComponent component, String value) {
+ return null;
+
+ }
+
+ public String getAsString(FacesContext context, UIComponent component, Object value) {
+ return null;
+ }
+
+}
\ No newline at end of file
Added: trunk/samples/listShuttleDemo/src/main/java/org/richfaces/TestBean.java
===================================================================
--- trunk/samples/listShuttleDemo/src/main/java/org/richfaces/TestBean.java
(rev 0)
+++ trunk/samples/listShuttleDemo/src/main/java/org/richfaces/TestBean.java 2008-07-11
11:18:34 UTC (rev 9524)
@@ -0,0 +1,24 @@
+package org.richfaces;
+
+public class TestBean {
+
+ boolean rendered = false;
+
+ public boolean isRendered() {
+ return rendered;
+ }
+
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
+
+
+ public void switchRendered() {
+ if(rendered) {
+ rendered = false;
+ } else {
+ rendered = true;
+ }
+ }
+
+}
Added: trunk/samples/listShuttleDemo/src/main/java/org/richfaces/capitals-rules.xml
===================================================================
--- trunk/samples/listShuttleDemo/src/main/java/org/richfaces/capitals-rules.xml
(rev 0)
+++
trunk/samples/listShuttleDemo/src/main/java/org/richfaces/capitals-rules.xml 2008-07-11
11:18:34 UTC (rev 9524)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ <!DOCTYPE digester-rules SYSTEM "digester-rules.dtd">
+-->
+
+<digester-rules>
+ <pattern value="*/capital">
+ <object-create-rule classname="org.richfaces.Capital" />
+ <bean-property-setter-rule pattern="name"
propertyname="name"/>
+ <bean-property-setter-rule pattern="state"
propertyname="state"/>
+ <bean-property-setter-rule pattern="timeZone"
propertyname="timeZone"/>
+ <set-next-rule methodname="addCapital"/>
+ </pattern>
+</digester-rules>
\ No newline at end of file
Added: trunk/samples/listShuttleDemo/src/main/java/org/richfaces/capitals.xml
===================================================================
--- trunk/samples/listShuttleDemo/src/main/java/org/richfaces/capitals.xml
(rev 0)
+++ trunk/samples/listShuttleDemo/src/main/java/org/richfaces/capitals.xml 2008-07-11
11:18:34 UTC (rev 9524)
@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<capitals>
+ <capital>
+ <state>Alabama</state>
+ <name>Montgomery</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Alaska</state>
+ <name>Juneau</name>
+ <timeZone>GMT-9</timeZone>
+ </capital>
+ <capital>
+ <state>Arizona</state>
+ <name>Phoenix</name>
+ <timeZone>GMT-7</timeZone>
+ </capital>
+ <capital>
+ <state>Arkansas</state>
+ <name>Little Rock</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>California</state>
+ <name>Sacramento</name>
+ <timeZone>GMT-8</timeZone>
+ </capital>
+ <capital>
+ <state>Colorado</state>
+ <name>Denver</name>
+ <timeZone>GMT-7</timeZone>
+ </capital>
+ <capital>
+ <state>Connecticut</state>
+ <name>Hartford</name>
+ <timeZone>GMT-5</timeZone>
+ </capital>
+ <capital>
+ <state>Delaware</state>
+ <name>Dover</name>
+ <timeZone>GMT-5</timeZone>
+ </capital>
+ <capital>
+ <state>Florida</state>
+ <name>Tallahassee</name>
+ <timeZone>GMT-5</timeZone>
+ </capital>
+ <capital>
+ <state>Georgia</state>
+ <name>Atlanta</name>
+ <timeZone>GMT-5</timeZone>
+ </capital>
+ <capital>
+ <state>Hawaii</state>
+ <name>Honolulu</name>
+ <timeZone>GMT-10</timeZone>
+ </capital>
+ <capital>
+ <state>Idaho</state>
+ <name>Boise</name>
+ <timeZone>GMT-8</timeZone>
+ </capital>
+ <capital>
+ <state>Illinois</state>
+ <name>Springfield</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Indiana</state>
+ <name>Indianapolis</name>
+ <timeZone>GMT-5</timeZone>
+ </capital>
+ <capital>
+ <state>Iowa</state>
+ <name>Des Moines</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Kansas</state>
+ <name>Topeka</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Kentucky</state>
+ <name>Frankfort</name>
+ <timeZone>GMT-5</timeZone>
+ </capital>
+ <capital>
+ <state>Louisiana</state>
+ <name>Baton Rouge</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Maine</state>
+ <name>Augusta</name>
+ <timeZone>GMT-5</timeZone>
+ </capital>
+ <capital>
+ <state>Maryland</state>
+ <name>Annapolis</name>
+ <timeZone>GMT-5</timeZone>
+ </capital>
+ <capital>
+ <state>Massachusetts</state>
+ <name>Boston</name>
+ <timeZone>GMT-5</timeZone>
+ </capital>
+ <capital>
+ <state>Michigan</state>
+ <name>Lansing</name>
+ <timeZone>GMT-5</timeZone>
+ </capital>
+ <capital>
+ <state>Minnesota</state>
+ <name>St. Paul</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Mississippi</state>
+ <name>Jackson</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Missouri</state>
+ <name>Jefferson City</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Montana</state>
+ <name>Helena</name>
+ <timeZone>GMT-7</timeZone>
+ </capital>
+ <capital>
+ <state>Nebraska</state>
+ <name>Lincoln</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Nevada</state>
+ <name>Carson City</name>
+ <timeZone>GMT-8</timeZone>
+ </capital>
+ <capital>
+ <state>New Hampshire</state>
+ <name>Concord</name>
+ <timeZone>GMT-5</timeZone>
+ </capital>
+ <capital>
+ <state>New Jersey</state>
+ <name>Trenton</name>
+ <timeZone>GMT-5</timeZone>
+ </capital>
+ <capital>
+ <state>New Mexico</state>
+ <name>Santa Fe</name>
+ <timeZone>GMT-7</timeZone>
+ </capital>
+ <capital>
+ <state>New York</state>
+ <name>Albany</name>
+ <timeZone>GMT-5</timeZone>
+ </capital>
+ <capital>
+ <state>North Carolina</state>
+ <name>Raleigh</name>
+ <timeZone>GMT-5</timeZone>
+ </capital>
+ <capital>
+ <state>North Dakota</state>
+ <name>Bismarck</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Ohio</state>
+ <name>Columbus</name>
+ <timeZone>GMT-5</timeZone>
+ </capital>
+ <capital>
+ <state>Oklahoma</state>
+ <name>Oklahoma City</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Oregon</state>
+ <name>Salem</name>
+ <timeZone>GMT-8</timeZone>
+ </capital>
+ <capital>
+ <state>Pennsylvania</state>
+ <name>Harrisburg</name>
+ <timeZone>GMT-5</timeZone>
+ </capital>
+ <capital>
+ <state>Rhode Island</state>
+ <name>Providence</name>
+ <timeZone>GMT-5</timeZone>
+ </capital>
+ <capital>
+ <state>South Carolina</state>
+ <name>Columbia</name>
+ <timeZone>GMT-5</timeZone>
+ </capital>
+ <capital>
+ <state>South Dakota</state>
+ <name>Pierre</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Tennessee</state>
+ <name>Nashville</name>
+ <timeZone>GMT-5</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Utah</state>
+ <name>Salt Lake City</name>
+ <timeZone>GMT-7</timeZone>
+ </capital>
+ <capital>
+ <state>Vermont</state>
+ <name>Montpelier</name>
+ <timeZone>GMT-5</timeZone>
+ </capital>
+ <capital>
+ <state>Virginia</state>
+ <name>Richmond</name>
+ <timeZone>GMT-5</timeZone>
+ </capital>
+ <capital>
+ <state>Washington</state>
+ <name>Olympia</name>
+ <timeZone>GMT-8</timeZone>
+ </capital>
+ <capital>
+ <state>West Virginia</state>
+ <name>Charleston</name>
+ <timeZone>GMT-5</timeZone>
+ </capital>
+ <capital>
+ <state>Wisconsin</state>
+ <name>Madison</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Wyoming</state>
+ <name>Cheyenne</name>
+ <timeZone>GMT-7</timeZone>
+ </capital>
+</capitals>
\ No newline at end of file
Added: trunk/samples/listShuttleDemo/src/main/java/org/richfaces/digester-rules.dtd
===================================================================
--- trunk/samples/listShuttleDemo/src/main/java/org/richfaces/digester-rules.dtd
(rev 0)
+++
trunk/samples/listShuttleDemo/src/main/java/org/richfaces/digester-rules.dtd 2008-07-11
11:18:34 UTC (rev 9524)
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--
+ "Digester" component of the Jakarta Commons Subproject
+ DTD for the definition of Digester rules in XML.
+ $Id: digester-rules.dtd,v 1.8 2003/03/27 18:54:45 rdonkin Exp $
+-->
+
+<!-- This document type defines an XML format for defining Digester rules.
+ Digester is a framework for pattern-matching-based parsing of XML into
+ Java objects. See
http://jakarta.apache.org/commons/digester.html. -->
+
+<!ENTITY % rule-elements "bean-property-setter-rule | call-method-rule |
call-param-rule |
+ factory-create-rule | object-create-rule |
+ set-properties-rule | set-property-rule | set-top-rule |
+ set-next-rule" >
+
+<!-- digester-rules is the root element. -->
+<!ELEMENT digester-rules (pattern | include | bean-property-setter-rule |
call-method-rule | call-param-rule | factory-create-rule | object-create-rule |
set-properties-rule | set-property-rule | set-top-rule | set-next-rule )*>
+
+
+<!-- <pattern> defines a matching pattern, or part of a matching pattern. Any
+ rule nested in a pattern element prepends its parent's to its pattern.
+ Patterns may be recursively nested.
+ Example:
+ <pattern value="foo">
+ <pattern value="bar">
+ <object-create-rule pattern="baz" classname="Fubar"
/>
+ </pattern>
+ </pattern>
+
+ The above sample fragment defines an ObjectCreateRule associated
+ with the pattern "foo/bar/baz".
+
+ Note that the use of pattern elements is optional; an alternative is for
+ each rule element to contain a 'pattern' attribute. -->
+<!ELEMENT pattern (pattern | include | bean-property-setter-rule | call-method-rule |
call-param-rule |
+ factory-create-rule | object-create-rule |
+ set-properties-rule | set-property-rule | set-top-rule |
+ set-next-rule )*>
+<!ATTLIST pattern
+ value CDATA #REQUIRED>
+
+
+<!--
+ <include> allows one set of digester rules to be included inside
+ another. The 'path' attribute contains the URI of the document to
+ include. Inclusion behaves as if the included rules document is
+ 'macro-expanded' within the outer document.
+ Programmatically initialized rules can be included as well, via the
+ 'class' attribute. The 'class' attribute should contain the name
+ of a class that implements
+ org.apache.commons.digester.xmlrules.DigesterRulesSource.
+-->
+<!ELEMENT include EMPTY>
+<!ATTLIST include
+ path CDATA #IMPLIED
+ class CDATA #IMPLIED>
+
+
+<!-- Each 'rule' element below corresponds to a concrete subclass
+ of org.apache.framework.digester.Rule.
+ Each 'rule' element has an optional 'pattern' attribute, which
+ defines the pattern for that rule instance. If the rule element
+ is nested inside one or more <pattern> elements, those patterns
+ will be prepended to the pattern specified in the rule's 'pattern'
+ attribute. -->
+
+<!-- Bean Property Setter Rule -->
+<!ELEMENT bean-property-setter-rule EMPTY>
+<!ATTLIST bean-property-setter-rule
+ pattern CDATA #IMPLIED
+ propertyname CDATA #IMPLIED>
+
+<!-- CallMethodRule -->
+<!ELEMENT call-method-rule EMPTY>
+<!ATTLIST call-method-rule
+ pattern CDATA #IMPLIED
+ methodname CDATA #REQUIRED
+ paramcount CDATA #IMPLIED
+ paramtypes CDATA #IMPLIED>
+
+<!--
+ CallParamRule
+ attrname - set param from attribute value (cannot be combined with from-stack)
+ from-stack - set param from stack (cannot be combined with attrname)
+ -->
+<!ELEMENT call-param-rule EMPTY>
+<!ATTLIST call-param-rule
+ pattern CDATA #IMPLIED
+ paramnumber CDATA #REQUIRED
+ attrname CDATA #IMPLIED
+ from-stack CDATA #IMPLIED>
+
+<!--
+ FactoryCreateRule
+
+ ignore-exceptions - if this attribute is (ignore case) 'true' then any
exceptions
+ thrown by the object create rule will be ignore.
+ This will allow processing to continue.
+ -->
+<!ELEMENT factory-create-rule EMPTY>
+<!ATTLIST factory-create-rule
+ pattern CDATA #IMPLIED
+ classname CDATA #REQUIRED
+ attrname CDATA #IMPLIED
+ ignore-exceptions CDATA #IMPLIED>
+
+<!-- ObjectCreateRule -->
+<!ELEMENT object-create-rule EMPTY>
+<!ATTLIST object-create-rule
+ pattern CDATA #IMPLIED
+ classname CDATA #REQUIRED
+ attrname CDATA #IMPLIED>
+
+<!-- SetPropertiesRule -->
+<!ELEMENT set-properties-rule (alias)*>
+<!ATTLIST factory-create-rule
+ pattern CDATA #IMPLIED>
+
+<!-- An alias is a custom attribute->property name mapping -->
+<!ELEMENT alias EMPTY>
+<!ATTLIST alias
+ attr-name CDATA #REQUIRED
+ prop-name CDATA #IMPLIED>
+
+<!-- SetPropertyRule -->
+<!ELEMENT set-property-rule EMPTY>
+<!ATTLIST set-property-rule
+ pattern CDATA #IMPLIED
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED>
+
+<!-- SetTopRule -->
+<!ELEMENT set-top-rule EMPTY>
+<!ATTLIST set-top-rule
+ pattern CDATA #IMPLIED
+ methodname CDATA #REQUIRED
+ paramtype CDATA #IMPLIED>
+
+<!-- SetNextRule -->
+<!ELEMENT set-next-rule EMPTY>
+<!ATTLIST set-next-rule
+ pattern CDATA #IMPLIED
+ methodname CDATA #REQUIRED
+ paramtype CDATA #IMPLIED>
Modified: trunk/samples/listShuttleDemo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/listShuttleDemo/src/main/webapp/WEB-INF/faces-config.xml 2008-07-11
11:15:16 UTC (rev 9523)
+++ trunk/samples/listShuttleDemo/src/main/webapp/WEB-INF/faces-config.xml 2008-07-11
11:18:34 UTC (rev 9524)
@@ -19,8 +19,20 @@
<managed-bean-class>org.richfaces.SkinBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
-
+
<managed-bean>
+ <managed-bean-name>capitalsBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.CapitalsBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>testBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.TestBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+
+ <managed-bean>
<managed-bean-name>converter</managed-bean-name>
<managed-bean-class>org.richfaces.ListShuttleOptionItemConverter</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
Modified: trunk/samples/listShuttleDemo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/listShuttleDemo/src/main/webapp/WEB-INF/web.xml 2008-07-11 11:15:16 UTC
(rev 9523)
+++ trunk/samples/listShuttleDemo/src/main/webapp/WEB-INF/web.xml 2008-07-11 11:18:34 UTC
(rev 9524)
@@ -3,6 +3,14 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Archetype Created Web Application</display-name>
<context-param>
+ <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+ <param-value>com.sun.facelets.FaceletViewHandler</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+ <context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml</param-value>
</context-param>
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/alabama.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/alabama.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/alaska.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/alaska.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/arizona.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/arizona.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/arkansas.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/arkansas.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/california.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/california.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/colorado.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/colorado.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/connecticut.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/connecticut.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/delaware.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/delaware.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/florida.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/florida.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/georgia.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/georgia.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/hawaii.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/hawaii.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/idaho.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/idaho.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/illinois.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/illinois.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/indiana.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/indiana.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/iowa.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/iowa.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/kansas.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/kansas.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/kentucky.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/kentucky.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/louisiana.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/louisiana.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/maine.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/maine.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/maryland.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/maryland.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/massachusetts.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/samples/listShuttleDemo/src/main/webapp/images/massachusetts.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/michigan.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/michigan.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/minnesota.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/minnesota.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/mississippi.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/mississippi.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/missouri.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/missouri.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/montana.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/montana.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/nebraska.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/nebraska.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/nevada.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/nevada.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/newhampshire.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/samples/listShuttleDemo/src/main/webapp/images/newhampshire.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/newjersey.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/newjersey.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/newmexico.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/newmexico.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/newyork.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/newyork.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/northcarolina.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/samples/listShuttleDemo/src/main/webapp/images/northcarolina.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/northdakota.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/northdakota.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/ohio.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/ohio.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/oklahoma.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/oklahoma.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/oregon.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/oregon.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/pennsylvania.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/samples/listShuttleDemo/src/main/webapp/images/pennsylvania.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/rhodeisland.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/rhodeisland.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/southcarolina.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/samples/listShuttleDemo/src/main/webapp/images/southcarolina.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/southdakota.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/southdakota.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/tennessee.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/tennessee.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/texas.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/texas.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/utah.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/utah.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/vermont.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/vermont.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/virginia.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/virginia.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/washington.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/washington.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/westvirginia.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/samples/listShuttleDemo/src/main/webapp/images/westvirginia.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/wisconsin.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/wisconsin.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/images/wyoming.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/listShuttleDemo/src/main/webapp/images/wyoming.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/listShuttleDemo/src/main/webapp/pages/RF3830.xhtml
===================================================================
--- trunk/samples/listShuttleDemo/src/main/webapp/pages/RF3830.xhtml
(rev 0)
+++ trunk/samples/listShuttleDemo/src/main/webapp/pages/RF3830.xhtml 2008-07-11 11:18:34
UTC (rev 9524)
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:ls="http://labs.jboss.com/jbossrichfaces/ui/listShuttle"
+
xmlns:c="http://labs.jboss.com/jbossrichfaces/ui/dataTable">
+
+ <body>
+ <f:view>
+ <h:form>
+ <h:panelGroup id="group">
+ <ls:listShuttle id="listShuttle" var="cap"
sourceValue="#{capitalsBean.capitals}"
+ sourceListWidth="300px" targetListWidth="300px"
rendered="#{testBean.rendered}">
+ <c:column>
+ <f:facet name="header">
+ <h:outputText value="State flag"/>
+ </f:facet>
+ <h:graphicImage value="#{cap.stateFlag}"/>
+ </c:column>
+ <c:column>
+ <f:facet name="header">
+ <h:outputText value="State name"/>
+ </f:facet>
+ <h:outputText value="#{cap.name}"/>
+ </c:column>
+ <c:column>
+ <f:facet name="header">
+ <h:outputText value="State capital"/>
+ </f:facet>
+ <h:outputText value="#{cap.state}"/>
+ </c:column>
+ </ls:listShuttle>
+ </h:panelGroup>
+ <div id="test">
+ </div>
+ <a4j:commandButton value="switch"
action="#{testBean.switchRendered}" reRender="group"
ajaxSingle="true"></a4j:commandButton>
+ </h:form>
+ </f:view>
+ </body>
+</html>
\ No newline at end of file