Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-2367

Custom StrutsTypeConverter's convertToString not called

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.0.11.2, 2.1.3
    • 2.1.8
    • None
    • None
    • Important

    Description

      It appears as though a class that is registered in xwork-conversion.properties that extends StrutsTypeConverter will never have it's convertToString method invoked as part of the normal ognl processing. This is most evident in the case of a converter that is required in a <s:select> tag.

      An interesting thing to note is that XWorkConverter is being invoked rather than StrutsTypeConverter. Also TextParseUtil.translateVariables appears to not be able to find the correct converter in this context.

      A few other users have also noticed this issue and have commented on it here:

      http://www.nabble.com/Re:-TypeConverter-problems-p13545755s2369.html
      http://www.nabble.com/Struts-2-Multi-Level-Type-Conversion-t4802911.html
      http://www.nabble.com/-S2--Issue-with-Type-Conversion-and-Select-Boxes-t4864875.html
      http://www.opensubscriber.com/message/user@struts.apache.org/7986658.html
      http://permalink.gmane.org/gmane.comp.jakarta.struts.user/148485
      http://permalink.gmane.org/gmane.comp.jakarta.struts.user/148294
      http://permalink.gmane.org/gmane.comp.java.appfuse.user/28961
      http://www.roseindia.net/tutorialhelp/comment/25324

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              btiernay Bob Tiernay
              Votes:
              12 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: