myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Kind (JIRA)" <...@myfaces.apache.org>
Subject [jira] Created: (TRINIDAD-1183) Allows any node in the whole menu tree to be obtained through its "id", unique or not.
Date Mon, 18 Aug 2008 23:49:44 GMT
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.


Mime
View raw message