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

UIComponentTag.setProperties() does not fully comply with JSF 1.1

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 1.1.4
    • None
    • JSR-127
    • None
    • Discovered under Tomcat 5.0 / Win XP SP2 / Sun JDK 1.5.0_09 / Cactus 1.7.2, but does not appear to be environment-specific.

    Description

      The implementation of javax.faces.webapp.UIComponentTag.setProperties(UIComponent) does not fully comply with JSF 1.1 because it sets the renderer type of the class's _componentInstance field instead of the method argument. On the other hand, it sets the 'rendered' property of the argument as it should.

      In normal use, the method argument and the field both reference the same object, thus the class generally works as expected. The issue becomes a problem, however, for unit tests of third-party tags: the setProperties() methods of those tags cannot easily be tested directly because the _componentInstance field is not initialized until doStartTag(), which invokes setProperties() itself. In practice, some tests that run successfully against the Sun reference implementation may fail against MyFaces because of this issue. I haven't examined the MyFaces test suite, but I can only assume that either its tag handlers' tests do not directly test this method at all, or they rely on knowledge of the UIComponentTag implementation.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jbollinger John Bollinger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: