You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Paul Benedict (JIRA)" <ji...@apache.org> on 2007/11/13 09:24:34 UTC
[jira] Closed: (STR-2279) [taglib] Taglibs should use
ConvertUtils.convert(Object) instead of .toString()
[ https://issues.apache.org/struts/browse/STR-2279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Benedict closed STR-2279.
------------------------------
Resolution: Won't Fix
Assignee: (was: Struts Developers)
Please use JSTL.
> [taglib] Taglibs should use ConvertUtils.convert(Object) instead of .toString()
> -------------------------------------------------------------------------------
>
> Key: STR-2279
> URL: https://issues.apache.org/struts/browse/STR-2279
> Project: Struts 1
> Issue Type: Improvement
> Components: Taglibs
> Affects Versions: 1.2.4
> Environment: Operating System: other
> Platform: Other
> Reporter: Etienne Bernard
> Priority: Minor
>
> I have registered beanutils converters in order to handle directly my hibernate
> objects in the ActionForms. However, I've got many problems due to the usage of
> the toString() method instead of the appropriate converter method in the struts
> source code.
> For example, in HiddenTag:
> 93 if (value == null) {
> 94 results = "";
> 95 } else {
> 96 results = TagUtils.getInstance().filter(value.toString());
> 97 }
> 98 }
> This should be:
> 96 results =
> TagUtils.getInstance().filter(ConvertUtils.convert(value));
> in order to work correctly.
> I've had a quick look at the html taglib and I found these incorrect conversions:
> BaseFieldTag: 183
> CheckboxTag: 187
> HiddenTag: 96
> ImgTag: 678, 741
> OptionsCollectionTag: 244, 245
> OptionsTag: 234, 235, 259, 266
> I think there are other places where toString() is called instead of
> ConvertUtils.convert(Object) (see also STR-1455)
> Thanks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.