Author: nbelaevski
Date: 2008-01-15 20:30:07 -0500 (Tue, 15 Jan 2008)
New Revision: 5403
Modified:
branches/3.1.x/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java
branches/3.1.x/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleRendererBase.java
branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java
Log:
http://jira.jboss.com/jira/browse/RF-1819
Modified:
branches/3.1.x/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java
===================================================================
---
branches/3.1.x/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java 2008-01-16
00:45:18 UTC (rev 5402)
+++
branches/3.1.x/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java 2008-01-16
01:30:07 UTC (rev 5403)
@@ -8,13 +8,11 @@
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.Map.Entry;
-import javax.faces.FacesException;
import javax.faces.application.FacesMessage;
import javax.faces.component.UIInput;
import javax.faces.context.FacesContext;
@@ -564,6 +562,10 @@
final ArrayList targetList = new ArrayList();
try {
+
+ Object key = getRowKey();
+ captureOrigValue(context);
+
walk(context, new DataVisitor() {
public void process(FacesContext context, Object rowKey,
@@ -579,6 +581,10 @@
}
}
}, null);
+
+ setRowKey(key);
+ restoreOrigValue(context);
+
} catch (IOException e) {
throw new ConverterException(e.getLocalizedMessage(), e);
}
Modified:
branches/3.1.x/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleRendererBase.java
===================================================================
---
branches/3.1.x/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleRendererBase.java 2008-01-16
00:45:18 UTC (rev 5402)
+++
branches/3.1.x/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleRendererBase.java 2008-01-16
01:30:07 UTC (rev 5403)
@@ -5,7 +5,6 @@
import java.io.IOException;
import java.io.StringWriter;
-import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
@@ -115,7 +114,7 @@
if (source == listShuttleRowKey.isFacadeSource()) {
ResponseWriter writer = context.getResponseWriter();
- String clientId = holder.getTable().getClientId(context);
+ String clientId = table.getClientId(context);
writer.startElement(HTML.TR_ELEMENT, table);
writer.writeAttribute("id", clientId, null);
Modified:
branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
===================================================================
---
branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2008-01-16
00:45:18 UTC (rev 5402)
+++
branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2008-01-16
01:30:07 UTC (rev 5403)
@@ -28,6 +28,7 @@
</h:scripts>
<f:clientId var="clientId"/>
+
<table id="#{clientId}" class="rich-list-shuttle
#{component.attributes['styleClass']}"
cellspacing="0" cellpadding="0"
x:passThruWithExclusions="id, class, styleClass">
@@ -47,6 +48,8 @@
Boolean switchByClick = (Boolean)
component.getAttributes().get("switchByClick");
variables.setVariable("switchByClick", switchByClick);
+
+ variables.setVariable("baseClientId",
component.getBaseClientId(context));
]]>
</jsp:scriptlet>
@@ -121,7 +124,7 @@
</td>
<td>
<div class="rich-shuttle-target-items #{component.listClass}" >
- <input type="hidden" value=":" style="display:
none;" name="#{clientId}" />
+ <input type="hidden" value=":" style="display:
none;" name="#{baseClientId}" />
<input id="#{clientId}tlFocusKeeper" type="button"
value="" style="width: 1px; position: absolute; left: -32767px;"/>
Modified:
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java
===================================================================
---
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java 2008-01-16
00:45:18 UTC (rev 5402)
+++
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java 2008-01-16
01:30:07 UTC (rev 5403)
@@ -542,6 +542,9 @@
try {
final ArrayList list = new ArrayList(getRowCount());
+ Object key = getRowKey();
+ captureOrigValue(context);
+
walk(context, new DataVisitor() {
public void process(FacesContext context, Object rowKey,
Object argument) throws IOException {
@@ -552,6 +555,9 @@
}, null);
+ setRowKey(key);
+ restoreOrigValue(context);
+
newValue = createContainer(list, previousValue);
} catch (IOException e) {
throw new ConverterException(e.getLocalizedMessage(), e);