Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-2343

ConverterImplTag always wrap with DelegateConverter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.7
    • 1.2.8
    • JSR-252
    • None
    • jsp

    Description

      The method createConverter says this

      protected Converter createConverter() throws JspException
      {
      if (_converterId != null && _converterId.isLiteralText())

      { this.createClassicConverter(); }
      if (_converterIdString != null){ this.createClassicConverter(); }

      return new DelegateConverter(_converterId, _binding,
      _converterIdString);
      }

      There are two missing return statements. This causes DelegateConverter is always used, and it should be used only when converterId is not literal or binding property is set:

      <f:converter binding="#

      {mybean}"/>
      <f:converter converterId="#{'anyid'}" binding="#{mybean}

      "/>

      The code should be like this:

      protected Converter createConverter() throws JspException
      {
      if (_converterId != null && _converterId.isLiteralText())

      { return this.createClassicConverter(); }
      if (_converterIdString != null){ return this.createClassicConverter(); }

      return new DelegateConverter(_converterId, _binding,
      _converterIdString);
      }

      The effect of this behavior is that a custom converter for t:inputCalendar that extends from HtmlCalendarRenderer.DateConverter cannot be set when using myfaces core 1.2.7.

      Attachments

        Activity

          People

            lu4242 Leonardo Uribe
            lu4242 Leonardo Uribe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: