Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-708

Element.forceAttribute uses the element's namespace to match the attribute.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.0.4, 5.1.0.5
    • Fix Version/s: 5.2.2
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      The method Element.forceAttributes uses the "namespace" attribute of the element when calling Element.updateAttribute. Attributes are by default in the global namespace, which is an empty string, not in the namespace of the element. There is no way to specify an alternate namespace to search.

      It seems the more accurate behavior for this method would be to pass the empty string as the namespace. The class would need to specify a separate method to that accepts a namespace.

        Issue Links

          Activity

          Hide
          hudson Hudson added a comment -

          Integrated in tapestry-5.2-freestyle #212 (See https://hudson.apache.org/hudson/job/tapestry-5.2-freestyle/212/)

          Show
          hudson Hudson added a comment - Integrated in tapestry-5.2-freestyle #212 (See https://hudson.apache.org/hudson/job/tapestry-5.2-freestyle/212/ )
          Hide
          joshcanfield Josh Canfield added a comment -

          Added forceAttributeNS and changed forceAttribute to use null instead of the element namespace.

          Show
          joshcanfield Josh Canfield added a comment - Added forceAttributeNS and changed forceAttribute to use null instead of the element namespace.
          Hide
          joshcanfield Josh Canfield added a comment -

          Fixes TAP5-708, TAP5-804 and TAP5-709.
          Changed Element.attribute(name, value) to pass "" as the namespace instead of null.
          Changed forceAttributes to use "" as the namespace to search
          Added forceAttributesNS which takes a namespace to lookup.

          The template parser uses "" for the namespaceuri during parsing so I chose to change null to "" to be compatible.

          Show
          joshcanfield Josh Canfield added a comment - Fixes TAP5-708 , TAP5-804 and TAP5-709 . Changed Element.attribute(name, value) to pass "" as the namespace instead of null. Changed forceAttributes to use "" as the namespace to search Added forceAttributesNS which takes a namespace to lookup. The template parser uses "" for the namespaceuri during parsing so I chose to change null to "" to be compatible.
          Hide
          joshcanfield Josh Canfield added a comment -

          Updated priority because it affects Element.addClassName

          Show
          joshcanfield Josh Canfield added a comment - Updated priority because it affects Element.addClassName

            People

            • Assignee:
              joshcanfield Josh Canfield
              Reporter:
              joshcanfield Josh Canfield
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development