Uploaded image for project: 'Commons BeanUtils'
  1. Commons BeanUtils
  2. BEANUTILS-181

[beanutils] Default converter for LocaleConvertUtilsBean

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.6.1
    • 2.0.0
    • None
    • Operating System: other
      Platform: Other

    • 30941

    Description

      When using the LocaleBeanUtils instead of BeanUtils, i got this exception (my
      form has a radio button and a checkbox):

      org.apache.commons.beanutils.ConversionException: Cannot assign value of type
      'java.lang.String' to property 'fixedEndDate' of type 'java.lang.Boolean'
      at org.apache.struts.action.DynaActionForm.set(DynaActionForm.java:423)
      at org.apache.commons.beanutils.PropertyUtilsBean.
      setSimpleProperty(PropertyUtilsBean.java:1733)
      at org.apache.commons.beanutils.PropertyUtilsBean.
      setNestedProperty(PropertyUtilsBean.java:1648)
      at org.apache.commons.beanutils.PropertyUtilsBean.
      setProperty(PropertyUtilsBean.java:1677)
      at org.apache.commons.beanutils.locale.LocaleBeanUtilsBean.
      invokeSetter(LocaleBeanUtilsBean.java:826)
      at org.apache.commons.beanutils.locale.LocaleBeanUtilsBean.
      setProperty(LocaleBeanUtilsBean.java:631)
      at org.apache.commons.beanutils.locale.LocaleBeanUtilsBean.
      setProperty(LocaleBeanUtilsBean.java:565)
      at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.
      java:811)

      After some investigations, it seems there is no registration in
      LocaleConvertUtilsBean for Boolean (and may be others) and i can't manualy
      register the BooleanConverter (not a LocaleConverter).

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            tulbiak@wanadoo.fr Tulbiak

            Dates

              Created:
              Updated:

              Slack

                Issue deployment