You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by so...@apache.org on 2012/05/09 01:15:58 UTC
svn commit: r1335819 -
/myfaces/trinidad/branches/2.0.0.x-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RowKeySetAttributeChange.java
Author: sobryan
Date: Tue May 8 23:15:57 2012
New Revision: 1335819
URL: http://svn.apache.org/viewvc?rev=1335819&view=rev
Log:
TRINIDAD-2112
Modified:
myfaces/trinidad/branches/2.0.0.x-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RowKeySetAttributeChange.java
Modified: myfaces/trinidad/branches/2.0.0.x-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RowKeySetAttributeChange.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/2.0.0.x-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RowKeySetAttributeChange.java?rev=1335819&r1=1335818&r2=1335819&view=diff
==============================================================================
--- myfaces/trinidad/branches/2.0.0.x-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RowKeySetAttributeChange.java (original)
+++ myfaces/trinidad/branches/2.0.0.x-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RowKeySetAttributeChange.java Tue May 8 23:15:57 2012
@@ -75,17 +75,6 @@ public final class RowKeySetAttributeCha
private void _updateRowKeySetInPlace(UIComponent component, String attrName, RowKeySet newValue)
{
- // Check whether the remembered RowKeySet object is in a valid state (iterable).
- try
- {
- newValue.iterator().hasNext();
- }
- catch (Exception e)
- {
- _LOG.warning("FAILED_ROWKEYSETATTRIBUTECHANGE", e.getClass());
- return;
- }
-
ValueExpression oldExpression = component.getValueExpression(attrName);
// due to bug in how the trinidad table and tree handle their RowKeySets, always use
@@ -109,7 +98,7 @@ public final class RowKeySetAttributeCha
{
_expression = expression;
_attributeName = attributeName;
- _newKeySet = newKeySet;
+ _newKeySet = newKeySet;
}
public void invokeContextCallback(FacesContext context,
@@ -138,11 +127,19 @@ public final class RowKeySetAttributeCha
{
RowKeySet oldKeySet = (RowKeySet)oldValue;
- oldKeySet.clear();
-
- if (_newKeySet != null)
+ try
+ {
+ oldKeySet.clear();
+
+ if (_newKeySet != null)
+ {
+ oldKeySet.addAll(_newKeySet);
+ }
+ }
+ catch (Exception e)
{
- oldKeySet.addAll(_newKeySet);
+ _LOG.warning("FAILED_ROWKEYSETATTRIBUTECHANGE", e);
+ return;
}
}
else
@@ -160,6 +157,5 @@ public final class RowKeySetAttributeCha
private static final long serialVersionUID = 1L;
static private final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(RowKeySetAttributeChange.class);
-
private final String _clientId;
}