You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Yandell (JIRA)" <ji...@apache.org> on 2007/08/07 04:50:00 UTC

[jira] Closed: (EL-14) Property type incorrectly interpreted

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

Henri Yandell closed EL-14.
---------------------------


> Property type incorrectly interpreted
> -------------------------------------
>
>                 Key: EL-14
>                 URL: https://issues.apache.org/jira/browse/EL-14
>             Project: Commons EL
>          Issue Type: Bug
>    Affects Versions: 1.0
>         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.
-
You can reply to this email to add a comment to the issue online.