myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Kienenberger (JIRA)" <...@myfaces.apache.org>
Subject [jira] Commented: (MYFACES-790) Select Menus bound to Integer value with calculated el expression in itemValue don't work
Date Wed, 14 Mar 2007 20:50:10 GMT

    [ https://issues.apache.org/jira/browse/MYFACES-790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12480921
] 

Mike Kienenberger commented on MYFACES-790:
-------------------------------------------

Carsten,

It is your responsiblity as the programmer to insure that the type of itemValue is the correct
type.  Conversion only happens between itemLabels and itemValues, not between itemValues and
your backing bean methods.

This is a different issue than the original reported problem (where it looks like the bug
is that the EL expression parser is returning a Long when maybe it should be returning an
Integer).

> Select Menus bound to Integer value with calculated el expression in itemValue don't
work
> -----------------------------------------------------------------------------------------
>
>                 Key: MYFACES-790
>                 URL: https://issues.apache.org/jira/browse/MYFACES-790
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 1.1.1
>         Environment: MyFaces 1.1.1, WebSphere 5.1.2, Windows
>            Reporter: Thomas Winkler
>         Assigned To: Manfred Geiler
>
> Assume the following code:
> <h:selectOneMenu value="#{bean.integerValue}" required="true">
> <f:selectItem itemValue="#{bean2.integerValue1 + bean2.integerValue2}" itemLabel="someLabel"/>
> </h:selectOneMenu>
> The problem here is, that the itemValue-property will be evaluated to a value of type
java.lang.Long. The submitted value will be of type java.lang.Integer. When both values are
the same, e.g. 9, the test in the class _SelectItemsUtil, line 68
>    integerValue.equals(longValue)
> will fail and we get an error.
> Suggestion for problem solution:
> The problem may be resolved according 4.1.13.2 of JSF Spec 1.1 by trying to convert the
EL calculated value to the data type of the parent component's type.

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


Mime
View raw message