In core1.2.x, a ClassCastException occurs when UIData.rows is an EL expression 
that returns type Long
-----------------------------------------------------------------------------------------------------

                 Key: MYFACES-1903
                 URL: https://issues.apache.org/jira/browse/MYFACES-1903
             Project: MyFaces Core
          Issue Type: Bug
    Affects Versions: 1.2.3
            Reporter: Simon Kitching


The UIData component has a "rows" property of type int. When an EL expression 
is used, and the referenced user method returns int or Integer then all is ok.
When the user method returns long or Long, this still works with myfaces 1.1.x.
However with myfaces 1.2.x a ClassCastException occurs.

One example is the Tomahawk "simple" examples, where selecting the "data 
scroller" example causes an immediate exception.

The code in 1.1.x is:
        ValueBinding vb = getValueBinding("rows");
        Number v = vb != null ? (Number) vb.getValue(getFacesContext()) : null;
        return v != null ? v.intValue() : DEFAULT_ROWS;

The code in 1.2.x is:
    ValueExpression expression = getValueExpression("rows");
    if (expression != null)
    {
      return (Integer)expression.getValue(getFacesContext().getELContext());
    }
    return 0;



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to