myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Kienenberger (Commented) (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Commented] (MYFACES-1875) UISelectOne value validation
Date Mon, 03 Oct 2011 21:15:37 GMT

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

Mike Kienenberger commented on MYFACES-1875:
--------------------------------------------

Confirmed: I was doing some maintenance on a legacy Myfaces 1.1.5 app, and I hit the same
issue.

Strange that this issue hasn't been fixed and closed yet.  I wonder if we fixed it in 1.1.6
and forgot to close it?

Like Frank, the workaround is trivial enough that it's not worth the time it would take me
to pursue the issue further.
                
> UISelectOne value validation
> ----------------------------
>
>                 Key: MYFACES-1875
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1875
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 1.1.5
>         Environment: Tomcat, Eclipse with Sysdeo Tomcat Plugin on Windows XP Client
>            Reporter: Frank
>            Priority: Minor
>
> validateValue(FacesContext context, Object value) Method of UISelectOne item checks values
against list of SelectItems
> if (!_SelectItemsUtil.matchValue(value, new _SelectItemsIterator(this)))
> The value is a converted value whereas the SelectItem values returned from the _SelectItemsIterator
are not being converted.
> Therefore the validity check does not work for anything else but String values or one
must include a valuebinding in the SelectItem for every Value in the list.
> In my case I have two SelectItems with values 'true' and 'false'. A booleanConverter
is registered with the UISelectOne to convert Strings to Boolean and back.
> The value is invalid as the comparison Boolean.equals(String) is false of course in the
method call _SelectItemsUtil.matchValue:
> Object itemValue = item.getValue();
> if (value==itemValue || value.equals(itemValue))

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message