You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Thiago H. de Paula Figueiredo (JIRA)" <ji...@apache.org> on 2014/05/31 06:24:01 UTC
[jira] [Assigned] (TAP5-2232) Element#addClassName can create an
additional new 'class' attribute
[ https://issues.apache.org/jira/browse/TAP5-2232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thiago H. de Paula Figueiredo reassigned TAP5-2232:
---------------------------------------------------
Assignee: Thiago H. de Paula Figueiredo
> 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
>
> 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.2#6252)