tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jochen Kemnade (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (TAP5-2232) Element#addClassName can create an additional new 'class' attribute
Date Mon, 07 Sep 2015 09:15:45 GMT

     [ https://issues.apache.org/jira/browse/TAP5-2232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jochen Kemnade closed TAP5-2232.
--------------------------------
       Resolution: Fixed
    Fix Version/s: 5.4

I can't reproduce this in 5.4-beta-35.

> Element#addClassName can create an additional new 'class' attribute
> -------------------------------------------------------------------
>
>                 Key: TAP5-2232
>                 URL: https://issues.apache.org/jira/browse/TAP5-2232
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3.7
>            Reporter: Matej Krchniak
>            Assignee: Thiago H. de Paula Figueiredo
>             Fix For: 5.4
>
>
> When using Element#addClassName (in mixing enhancing component class), I noticed that
I was getting two 'class' attributes in my element - rather than the one I was expecting.
First I bumped into TAP5-708 and TAP5-804, which seem to fix only some part of the problem.
> Code in TAP5-804 will produce correct result and even the tests. But there is stil one
situation, where there are two class attributes generated. Consider this code:
> Navbar.tml:
> <div class="navbar">
> ...
> </div>
> Code from mixin:
> element.addClassName("navbar-fixed-top")
> Produces this output:
> <div class="navbar-fixed-top" class="navbar">
> Problem is that SaxTemplateParser provides "" namespace and Element.addClassName will
use null namespace, so another class attribute is added. Tests will pass, because Element.attribute
provides null namespace. But I want to add another class name to one present in template.
> Interesting part of TAP5-708 is that supplied patch changed default namespace in Element.attribute
and in Element.forceAttributes from null to "". So states event this comment: https://issues.apache.org/jira/browse/TAP5-708?focusedCommentId=12773672&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12773672.
But this change is not present in source code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message