You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Dariusz Wojtas (JIRA)" <ji...@apache.org> on 2007/01/07 23:08:16 UTC
[jira] Commented: (WW-1601) s:select tag does not support keys of
type Byte (and possibly others)
[ https://issues.apache.org/struts/browse/WW-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39710 ]
Dariusz Wojtas commented on WW-1601:
------------------------------------
This is a more serious bug.
It does not seem to work with Integers also.
No wornings that the types are not supported, nothing.
Just incorrect result displayed - value is not preselected.
If it only supports strings then this is a big limitation.
> s:select tag does not support keys of type Byte (and possibly others)
> ---------------------------------------------------------------------
>
> Key: WW-1601
> URL: https://issues.apache.org/struts/browse/WW-1601
> Project: Struts 2
> Issue Type: Bug
> Affects Versions: 2.0.2
> Environment: windows xp, java 6, tomcat 5.5.17
> Reporter: Dariusz Wojtas
> Fix For: 2.0.x
>
>
> <s:select size="1"
> name="rate"
> list="rates"
> listKey="id"
> listValue="name"
> emptyOption="false"
> label="...."/>
> Action has properties
> private Byte rate;
> private ArrayList<OptionBean> rates;
> class OptionBean implements Serializable {
> private Byte id;
> private String name;
> }
> generated select tag does not recognize selected value.
> If I switch Byte to String then it works.
> I would like set OptionBean containing 'id' of type Object.
> And I tried it with different types of Objects (String, Byte) but only String worked.
> I believe it should support all object types with correctly implemented 'equals'.
> If it matters - form is of theme "ajax".
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira