myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernd Bohmann (JIRA)" <...@myfaces.apache.org>
Subject [jira] Resolved: (TOBAGO-59) SelectManyRendererBase can't handle setter
Date Sun, 30 Apr 2006 18:31:39 GMT
     [ http://issues.apache.org/jira/browse/TOBAGO-59?page=all ]
     
Bernd Bohmann resolved TOBAGO-59:
---------------------------------

    Resolution: Fixed

I think you are right.
We should change it in myfaces shared code.

> SelectManyRendererBase can't handle setter
> ------------------------------------------
>
>          Key: TOBAGO-59
>          URL: http://issues.apache.org/jira/browse/TOBAGO-59
>      Project: MyFaces Tobago
>         Type: Bug

>     Versions: 1.0.7
>     Reporter: Richard van Nieuwenhoven
>     Assignee: Bernd Bohmann
>     Priority: Minor
>      Fix For: 1.0.7
>  Attachments: SelectManyRendererBase.java, SelectManyRendererBase.java, SelectManyRendererBase.java.diff
>
> I think i found a bug in the class org.apache.myfaces.tobago.renderkit.SelectManyRendererBase.
it can take an Object array as selected-object getter but needs a setter with a String[].
> The information how to convert a Object into a String and back is normaly done with a
javax.faces.convert.Converter but not in this case.....
> I changed the last part of the decode method to:
>    ....
>    Object [] convertedValue = null;
>    if (newValue == null) {
>        convertedValue = new Object[0]; // because no selection will not submitted by
browsers
>    } else {
>        convertedValue = new Object[newValue.length];
>        for (int index=0;index < newValue.length;index++)
>                convertedValue[index] = getConvertedValue(facesContext, component, newValue[index]);
>    }
>    uiSelectMany.setValue(convertedValue);
>    ......
> The situation improved now, but the setter must now have a parameter of type Object[]....
I would like to use the specific type-array, but for that i have to know the specific-type
in the decode method (to create the array in the correct type). the best solution would be
if the "Update Model Values"  did the conversion from Object[] to SpecificType[].

-- 
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


Mime
View raw message