You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Scott O'Bryan (JIRA)" <de...@myfaces.apache.org> on 2011/09/09 14:51:09 UTC

[jira] [Updated] (TRINIDAD-2112) RowKeySetAttributeChange calls into model when component is not in context

     [ https://issues.apache.org/jira/browse/TRINIDAD-2112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott O'Bryan updated TRINIDAD-2112:
------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.1
         Assignee: Scott O'Bryan
           Status: Resolved  (was: Patch Available)

Patch Commited, closing bug

> RowKeySetAttributeChange calls into model when component is not in context
> --------------------------------------------------------------------------
>
>                 Key: TRINIDAD-2112
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2112
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>    Affects Versions:  1.2.12-core
>            Reporter: Prakash Udupa
>            Assignee: Scott O'Bryan
>             Fix For: 2.0.1
>
>         Attachments: JIRA2112_Patch_over_1_2_12_5_1.patch, JIRA2112_Patch_over_1_2_12_6_0.patch, JIRA2112_Patch_over_2_0_0_1.patch, JIRA2112_Patch_over_trunk.patch
>
>
> RowKeySetAttributeChange has this code...
>   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);
> At the point when this is executed, the component is not brought into context, so the model bindings might be stale. Consequently call to to model objects from specific implementation of RowKeySet that relies on the component being brought to context would break. We had one such instance that broke badly in our app.
> The fix is to bring call to newValue.iterator().hasNext(); into invokeOnComponent() in the same class file, because at this time the component is in context and all will be well.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira