Author: nbelaevski
Date: 2007-11-29 10:59:23 -0500 (Thu, 29 Nov 2007)
New Revision: 4350
Modified:
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/component/OrderingBaseAbstractSubmittedValue.java
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingBaseComponent.java
branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js
Log:
latest changes for listShuttle & orderingList
Modified:
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/component/OrderingBaseAbstractSubmittedValue.java
===================================================================
---
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/component/OrderingBaseAbstractSubmittedValue.java 2007-11-29
15:08:58 UTC (rev 4349)
+++
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/component/OrderingBaseAbstractSubmittedValue.java 2007-11-29
15:59:23 UTC (rev 4350)
@@ -46,9 +46,15 @@
protected Map asMap(String string) {
if (string != null && string.length() != 0) {
- String[] valueOrder = string.split(",");
+ String substring = string.trim().substring(1, string.length() - 1);
+
+ String[] valueOrder = substring.split(",");
Map translationMap = new LinkedHashMap(valueOrder.length);
for (int i = 0; i < valueOrder.length; i++) {
+ if (valueOrder[i].length() == 0) {
+ continue;
+ }
+
Matcher matcher = getKeyStringPattern().matcher(valueOrder[i]);
if (matcher.matches()) {
Object oldKey = createOldKey(matcher.group(1));
@@ -99,7 +105,7 @@
result.append(',');
}
}
- return result.toString();
+ return "[" + result.toString() + "]";
} else {
return "";
}
Modified:
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingBaseComponent.java
===================================================================
---
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingBaseComponent.java 2007-11-29
15:08:58 UTC (rev 4349)
+++
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingBaseComponent.java 2007-11-29
15:59:23 UTC (rev 4350)
@@ -776,11 +776,11 @@
private Set selectionKeys;
public boolean isActive() {
- return activeItemKeys != null &&
activeItemKeys.contains(getTranslatedRowKey());
+ return activeItemKeys != null && activeItemKeys.contains(getRowKey());
}
public boolean isSelected() {
- return selectionKeys != null &&
selectionKeys.contains(getTranslatedRowKey());
+ return selectionKeys != null && selectionKeys.contains(getRowKey());
}
public SubmittedItemState(Set selectionKeys, Set activeItemKeys) {
Modified:
branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js
===================================================================
---
branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js 2007-11-29
15:08:58 UTC (rev 4349)
+++
branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js 2007-11-29
15:59:23 UTC (rev 4350)
@@ -397,7 +397,7 @@
saveState : function() {
//if (this.activeItem != null || (this.selectedItems.length > 0)) {
- this.valueKeeper.value = this.getAsString();
+ this.valueKeeper.value = "[" + this.getAsString() + "]";
//}
}
Show replies by date