You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Gary Kind (JIRA)" <de...@myfaces.apache.org> on 2008/08/19 01:49:44 UTC

[jira] Created: (TRINIDAD-1183) Allows any node in the whole menu tree to be obtained through its "id", unique or not.

Allows any node in the whole menu tree to be obtained through its "id", unique or not.
--------------------------------------------------------------------------------------

                 Key: TRINIDAD-1183
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1183
             Project: MyFaces Trinidad
          Issue Type: Improvement
    Affects Versions: 1.2.9-core
            Reporter: Gary Kind


The XMLMenuModel has 1 root model and (possibly) numerous child menu models incorporated into the root menu tree through shared nodes.  If development is done in separate locations, it is possible for nodes of different menu models to be given the same value for the "id" attributes.  Prior to this enhancement, a developer could call API model.getNode(id) and be returned the first node in the tree with a matching id.  However, it would not be guaranteed to be the correct node because of the possibility of duplicate ids. The onus was put on the application developer to make sure that all id's were unique.  A design-time ide could enforce this, but the runtime did not.  With this new enhancement, a node has access to its model's (unique) internal id which is appended (internally) to the node's id to form a unique id for the root model's node hashmap.  Now when model.getNode(id) is called the model's id is obtained and appended to the "id" arg, and the node is retrieved from the root model's node hashmap.  

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


[jira] Resolved: (TRINIDAD-1183) Allows any node in the whole menu tree to be obtained through its "id", unique or not.

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TRINIDAD-1183?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthias Weßendorf resolved TRINIDAD-1183.
------------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2.10-core

Thanks to Gary Kind for his patch

> Allows any node in the whole menu tree to be obtained through its "id", unique or not.
> --------------------------------------------------------------------------------------
>
>                 Key: TRINIDAD-1183
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1183
>             Project: MyFaces Trinidad
>          Issue Type: Improvement
>    Affects Versions: 1.2.9-core
>            Reporter: Gary Kind
>            Assignee: Matthias Weßendorf
>             Fix For: 1.2.10-core
>
>         Attachments: xmlmenumodel_trinidad_branch_1291.patch
>
>
> The XMLMenuModel has 1 root model and (possibly) numerous child menu models incorporated into the root menu tree through shared nodes.  If development is done in separate locations, it is possible for nodes of different menu models to be given the same value for the "id" attributes.  Prior to this enhancement, a developer could call API model.getNode(id) and be returned the first node in the tree with a matching id.  However, it would not be guaranteed to be the correct node because of the possibility of duplicate ids. The onus was put on the application developer to make sure that all id's were unique.  A design-time ide could enforce this, but the runtime did not.  With this new enhancement, a node has access to its model's (unique) internal id which is appended (internally) to the node's id to form a unique id for the root model's node hashmap.  Now when model.getNode(id) is called the model's id is obtained and appended to the "id" arg, and the node is retrieved from the root model's node hashmap using the combined ids.  

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