[ 
https://issues.apache.org/jira/browse/COCOON-2040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487440
 ] 

Grzegorz Kossakowski commented on COCOON-2040:
----------------------------------------------

No, it can't be fixed that easy. Current situation is broken because as case 
value we always have string, but as case widget we can set booleanfield for 
example. Test for value's equality is done in various places (processing of 
union widget, binding, rendering etc.).

In order to avoid fixing conversion between Boolean and String in many places 
we could perform it in Union#getValue() method but then information about 
actual type would be lost forever.
Now, I think that it's cleaner way of fixing it.

How we should treat null values? Should we convert them into empty strings or 
keep them null?

I could write a test case if I know how... :) (never done it, so any tips would 
be appreciated)

> Union widget does not work with booleanfield set as case widget
> ---------------------------------------------------------------
>
>                 Key: COCOON-2040
>                 URL: https://issues.apache.org/jira/browse/COCOON-2040
>             Project: Cocoon
>          Issue Type: Bug
>          Components: Blocks: Forms
>    Affects Versions: 2.2-dev (Current SVN)
>            Reporter: Grzegorz Kossakowski
>            Priority: Minor
>             Fix For: 2.2-dev (Current SVN)
>
>         Attachments: cocoon-forms-impl-union.patch
>
>
> Union widget compares values without performing conversion. Booleanfield 
> returns Boolean object, so result of comparison is always false.

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

Reply via email to