commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "RD (JIRA)" <j...@apache.org>
Subject [jira] Created: (EL-14) Property type incorrectly interpreted
Date Wed, 20 Sep 2006 10:22:25 GMT
Property type incorrectly interpreted
-------------------------------------

                 Key: EL-14
                 URL: http://issues.apache.org/jira/browse/EL-14
             Project: Commons EL
          Issue Type: Bug
    Affects Versions: 1.0 Final
         Environment: JBoss 4.0.4.GA
MyFaces 1.1.3
Tomahawk+Sandbox 1.1.5 snapshot
Commons EL 1.0
            Reporter: RD


<t:dataTable id="vertragData" styleClass="standardTable"
headerClass="standardTable_Header" footerClass="standardTable_Header"
rowClasses="standardTable_Row1,standardTable_Row2"
columnClasses="standardTable_ColumnCentered"
var="vertrag" value="#{vertragListBean.vertragList}"
preserveDataModel="true" rows="20"
sortColumn="#{vertragListBean.sort}"
sortAscending="#{vertragListBean.ascending}"
preserveSort="true">
<x:commandLink action="edit" immediate="true"
rendered="#{vertrag.status == 'A' || vertrag.status == 'a'}">

private List<Vertrag> vertragList =new ArrayList<Vertrag>();
public List<Vertrag> getVertragList() {
doFilter();
doSort(getSort(),isAscending());
return vertragList;
}
public class Vertrag implements Serializable {
private Character status;
...
public Character getStatus() {
return status;
}
public void setStatus(Character status) {
this.status = status;
}
...
}

This generates the following error message:

javax.faces.el.EvaluationException: Cannot get value for expression '#{vertrag.status == 'A'
|| vertrag.status == 'a'}'
at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:402)
at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:1076)
at org.apache.myfaces.component.html.ext.HtmlCommandLink.isRendered(HtmlCommandLink.java:155)
at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:428)
at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChildren(RendererUtils.java:419)
at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:440)
...
Caused by: javax.servlet.jsp.el.ELException: An exception occured trying to convert String
"A" to type "java.lang.Long"
at org.apache.commons.el.Logger.logError(Logger.java:481)
at org.apache.commons.el.Logger.logError(Logger.java:498)
at org.apache.commons.el.Logger.logError(Logger.java:566)
at org.apache.commons.el.Coercions.coerceToPrimitiveNumber(Coercions.java:440)
at org.apache.commons.el.Coercions.applyEqualityOperator(Coercions.java:1052)
at org.apache.commons.el.EqualityOperator.apply(EqualityOperator.java:81)
at org.apache.commons.el.BinaryOperatorExpression.evaluate(BinaryOperatorExpression.java:170)

What can I do to solve this?

Note: I have posted this issue in MyFaces Tomahawk and have got the following message from
Martin Marinschek:
"Looks to me like a bug in commons-el. Can you reconfirm with the developer-group of the expression
language?"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message