You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "RD (JIRA)" <ji...@apache.org> on 2006/09/20 18:22:23 UTC

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

    [ http://issues.apache.org/jira/browse/EL-14?page=comments#action_12436269 ] 
            
RD commented on EL-14:
----------------------

I am sorry, but modifying the class Vertrag is no acceptable solution, because the fields are automatically generated from the database using an automated tool and are accessed by other modules of the project (created by other people). The only option is to modify the JSF page.

So, what can I do in the JSF page to make it work?

> 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