You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by de...@apache.org on 2017/09/17 12:29:47 UTC
[myfaces-trinidad] 03/33: TRINIDAD-2112 RowKeySetAttributeChange
calls into model when component is not in context 2.0.0.1-branch thanks to
Prakash Udupa for the patch
This is an automated email from the ASF dual-hosted git repository.
deki pushed a commit to branch 2.0.0.x-branch
in repository https://gitbox.apache.org/repos/asf/myfaces-trinidad.git
commit 61c34bcb5d066ab1f61772142a9367b37f42a044
Author: Scott Bryan <so...@apache.org>
AuthorDate: Tue May 8 23:15:57 2012 +0000
TRINIDAD-2112 RowKeySetAttributeChange calls into model when component is not in context
2.0.0.1-branch
thanks to Prakash Udupa for the patch
---
.../trinidad/change/RowKeySetAttributeChange.java | 30 ++++++++++------------
1 file changed, 13 insertions(+), 17 deletions(-)
diff --git a/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RowKeySetAttributeChange.java b/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RowKeySetAttributeChange.java
index 74db7fa..47e3509 100644
--- a/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RowKeySetAttributeChange.java
+++ b/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RowKeySetAttributeChange.java
@@ -75,17 +75,6 @@ public final class RowKeySetAttributeChange extends AttributeComponentChange
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 RowKeySetAttributeChange extends AttributeComponentChange
{
_expression = expression;
_attributeName = attributeName;
- _newKeySet = newKeySet;
+ _newKeySet = newKeySet;
}
public void invokeContextCallback(FacesContext context,
@@ -138,11 +127,19 @@ public final class RowKeySetAttributeChange extends AttributeComponentChange
{
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 RowKeySetAttributeChange extends AttributeComponentChange
private static final long serialVersionUID = 1L;
static private final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(RowKeySetAttributeChange.class);
-
private final String _clientId;
}
--
To stop receiving notification emails like this one, please contact
"commits@myfaces.apache.org" <co...@myfaces.apache.org>.