Author: nbelaevski
Date: 2007-11-29 10:59:38 -0500 (Thu, 29 Nov 2007)
New Revision: 4351
Modified:
branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java
branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/model/ListShuttleRowKey.java
Log:
latest changes for listShuttle & orderingList
Modified:
branches/3.1.x/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 2007-11-29
15:59:23 UTC (rev 4350)
+++
branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java 2007-11-29
15:59:38 UTC (rev 4351)
@@ -55,7 +55,7 @@
}
protected static final class SubmittedValue extends OrderingBaseAbstractSubmittedValue
{
- private static final Pattern KEY_STRING_PATTERN =
Pattern.compile("(s?\\d+)(s?a?)");
+ private static final Pattern KEY_STRING_PATTERN =
Pattern.compile("((?:s|t)\\d+)(s?a?)");
/**
*
*/
@@ -103,10 +103,13 @@
try {
if (c == 's') {
sourceKey = true;
- integer = new Integer(keyString.substring(1));
+ } else if (c == 't') {
+ sourceKey = false;
} else {
- integer = new Integer(keyString);
+ throw new IllegalArgumentException();
}
+
+ integer = new Integer(keyString.substring(1));
} catch (NumberFormatException e) {
throw new FacesException(new IllegalArgumentException());
}
Modified:
branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/model/ListShuttleRowKey.java
===================================================================
---
branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/model/ListShuttleRowKey.java 2007-11-29
15:59:23 UTC (rev 4350)
+++
branches/3.1.x/sandbox/ui/listShuttle/src/main/java/org/richfaces/model/ListShuttleRowKey.java 2007-11-29
15:59:38 UTC (rev 4351)
@@ -61,7 +61,7 @@
}
public String toString() {
- return (source ? "s" : "") + rowKey.toString();
+ return (source ? "s" : "t") + rowKey.toString();
}
public ListShuttleRowKey(Object rowKey, boolean source) {