You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Carlin Rogers (JIRA)" <ji...@apache.org> on 2006/12/06 19:35:21 UTC

[jira] Created: (BEEHIVE-1162) Resetting the value of TreeElement attribute using TreeHtmlAttributeInfo is not handled correctly.

Resetting the value of TreeElement attribute using TreeHtmlAttributeInfo is not handled correctly.
--------------------------------------------------------------------------------------------------

                 Key: BEEHIVE-1162
                 URL: http://issues.apache.org/jira/browse/BEEHIVE-1162
             Project: Beehive
          Issue Type: Bug
          Components: NetUI
    Affects Versions: 1.0.1, 1.0.2, V.Next
            Reporter: Carlin Rogers
         Assigned To: Carlin Rogers
            Priority: Minor
             Fix For: V.Next


When resetting the value of TreeElement attribute using TreeHtmlAttributeInfo, the AttributeRenderer still maintains the original attribute in a list and then it is applied to the markup of subsequent tree items. This is an issue between the TreeElement set of attributes and the AttributeRenderer.

For example, if an attribute is applied to a tree item when the item is selected (via a selectNode() action) and reset to a different value when a different node is selected, the nodes that follow will have the old attribute applied to them.

The TreeElement stores the attributes in a List. So trying to reset the attribute value in another operation using TreeElement.addAttribute() just adds a second entry to the list. For example, if a "style" attribute has already been set on a tree item and then addAttribute() is used to to change the value of the attribute on the node, it just adds it to the list. Now there's two attributes in the TreeElement attribute list with the same name ("style"). This makes the AttributeRenderer behave incorrectly, thinking that the first attribute exists and needs to be saved for other elements.

There is a workaround for this issue. A page flow developer could call the public TreeElement.getAttributeList() method and search through the list to see if it contains a TreeHtmlAttributeInfo with the same attribute name and then reset the value of that attribute.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (BEEHIVE-1162) Resetting the value of TreeElement attribute using TreeHtmlAttributeInfo is not handled correctly.

Posted by "Russ Baker (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BEEHIVE-1162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Russ Baker updated BEEHIVE-1162:
--------------------------------


I verified that when resetting the value of TreeElement attribute using TreeHtmlAttributeInfo, that the attribute does not get applied to the markup of the subsequent tree items. I verified using Carlin's DRT and tested against SVN 549584. I recommend that this bug be closed.

> Resetting the value of TreeElement attribute using TreeHtmlAttributeInfo is not handled correctly.
> --------------------------------------------------------------------------------------------------
>
>                 Key: BEEHIVE-1162
>                 URL: https://issues.apache.org/jira/browse/BEEHIVE-1162
>             Project: Beehive
>          Issue Type: Bug
>          Components: NetUI
>    Affects Versions: 1.0.1, 1.0.2, V.Next
>            Reporter: Carlin Rogers
>            Assignee: Julie Zhuo
>            Priority: Minor
>             Fix For: V.Next
>
>
> When resetting the value of TreeElement attribute using TreeHtmlAttributeInfo, the AttributeRenderer still maintains the original attribute in a list and then it is applied to the markup of subsequent tree items. This is an issue between the TreeElement set of attributes and the AttributeRenderer.
> For example, if an attribute is applied to a tree item when the item is selected (via a selectNode() action) and reset to a different value when a different node is selected, the nodes that follow will have the old attribute applied to them.
> The TreeElement stores the attributes in a List. So trying to reset the attribute value in another operation using TreeElement.addAttribute() just adds a second entry to the list. For example, if a "style" attribute has already been set on a tree item and then addAttribute() is used to to change the value of the attribute on the node, it just adds it to the list. Now there's two attributes in the TreeElement attribute list with the same name ("style"). This makes the AttributeRenderer behave incorrectly, thinking that the first attribute exists and needs to be saved for other elements.
> There is a workaround for this issue. A page flow developer could call the public TreeElement.getAttributeList() method and search through the list to see if it contains a TreeHtmlAttributeInfo with the same attribute name and then reset the value of that attribute.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BEEHIVE-1162) Resetting the value of TreeElement attribute using TreeHtmlAttributeInfo is not handled correctly.

Posted by "Carlin Rogers (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BEEHIVE-1162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489531 ] 

Carlin Rogers commented on BEEHIVE-1162:
----------------------------------------

I've changed the fix for this bug in SVN revision 529746. The original change in SVN revision 483829 made the _attribute field a LinkedHashMap instead of an ArrayList for the set of attributes. However, the _attribute field is declared public, implying an API change. If anyone used the field directly rather than through the access methods this would break back compat.

In this revision I've changed this field back to an ArrayList and added code in addAttribute() method to check if an attribute is being reset. The test case for this bug still passes.

> Resetting the value of TreeElement attribute using TreeHtmlAttributeInfo is not handled correctly.
> --------------------------------------------------------------------------------------------------
>
>                 Key: BEEHIVE-1162
>                 URL: https://issues.apache.org/jira/browse/BEEHIVE-1162
>             Project: Beehive
>          Issue Type: Bug
>          Components: NetUI
>    Affects Versions: 1.0.1, 1.0.2, V.Next
>            Reporter: Carlin Rogers
>         Assigned To: Julie Zhuo
>            Priority: Minor
>             Fix For: V.Next
>
>
> When resetting the value of TreeElement attribute using TreeHtmlAttributeInfo, the AttributeRenderer still maintains the original attribute in a list and then it is applied to the markup of subsequent tree items. This is an issue between the TreeElement set of attributes and the AttributeRenderer.
> For example, if an attribute is applied to a tree item when the item is selected (via a selectNode() action) and reset to a different value when a different node is selected, the nodes that follow will have the old attribute applied to them.
> The TreeElement stores the attributes in a List. So trying to reset the attribute value in another operation using TreeElement.addAttribute() just adds a second entry to the list. For example, if a "style" attribute has already been set on a tree item and then addAttribute() is used to to change the value of the attribute on the node, it just adds it to the list. Now there's two attributes in the TreeElement attribute list with the same name ("style"). This makes the AttributeRenderer behave incorrectly, thinking that the first attribute exists and needs to be saved for other elements.
> There is a workaround for this issue. A page flow developer could call the public TreeElement.getAttributeList() method and search through the list to see if it contains a TreeHtmlAttributeInfo with the same attribute name and then reset the value of that attribute.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (BEEHIVE-1162) Resetting the value of TreeElement attribute using TreeHtmlAttributeInfo is not handled correctly.

Posted by "Carlin Rogers (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/BEEHIVE-1162?page=all ]

Carlin Rogers resolved BEEHIVE-1162.
------------------------------------

    Resolution: Fixed
      Assignee: Julie Zhuo  (was: Carlin Rogers)

This is fixed with SVN revision 483829. Ihanged the TreeElement class to use a LinkedHashMap for the set of attributes, using the attribute name as the key. The TreeElement attributes map will only have a single attribute for a given name.

The SVN revision also includes a new test case.

> Resetting the value of TreeElement attribute using TreeHtmlAttributeInfo is not handled correctly.
> --------------------------------------------------------------------------------------------------
>
>                 Key: BEEHIVE-1162
>                 URL: http://issues.apache.org/jira/browse/BEEHIVE-1162
>             Project: Beehive
>          Issue Type: Bug
>          Components: NetUI
>    Affects Versions: 1.0.1, 1.0.2, V.Next
>            Reporter: Carlin Rogers
>         Assigned To: Julie Zhuo
>            Priority: Minor
>             Fix For: V.Next
>
>
> When resetting the value of TreeElement attribute using TreeHtmlAttributeInfo, the AttributeRenderer still maintains the original attribute in a list and then it is applied to the markup of subsequent tree items. This is an issue between the TreeElement set of attributes and the AttributeRenderer.
> For example, if an attribute is applied to a tree item when the item is selected (via a selectNode() action) and reset to a different value when a different node is selected, the nodes that follow will have the old attribute applied to them.
> The TreeElement stores the attributes in a List. So trying to reset the attribute value in another operation using TreeElement.addAttribute() just adds a second entry to the list. For example, if a "style" attribute has already been set on a tree item and then addAttribute() is used to to change the value of the attribute on the node, it just adds it to the list. Now there's two attributes in the TreeElement attribute list with the same name ("style"). This makes the AttributeRenderer behave incorrectly, thinking that the first attribute exists and needs to be saved for other elements.
> There is a workaround for this issue. A page flow developer could call the public TreeElement.getAttributeList() method and search through the list to see if it contains a TreeHtmlAttributeInfo with the same attribute name and then reset the value of that attribute.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira