incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwald...@apache.org
Subject svn commit: r487362 - in /incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu: ItemNode.java MenuContentHandlerImpl.java MenuNode.java
Date Thu, 14 Dec 2006 21:47:11 GMT
Author: jwaldman
Date: Thu Dec 14 13:47:10 2006
New Revision: 487362

URL: http://svn.apache.org/viewvc?view=rev&rev=487362
Log:
ADFFACES-330 MenuNode.getId() now returns "id" attribute value from metadata. MenuNode.getUniqueId()
now returns a unique id String.

Modified:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/ItemNode.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/MenuContentHandlerImpl.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/MenuNode.java

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/ItemNode.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/ItemNode.java?view=diff&rev=487362&r1=487361&r2=487362
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/ItemNode.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/ItemNode.java
Thu Dec 14 13:47:10 2006
@@ -377,7 +377,7 @@
 
     // Appending nodeId to URL so that we can identify the node
     // when getFocusRowKey() is called on the model.
-    return value != null ? value + "?nodeId=" + getId() : value;
+    return value != null ? value + "?nodeId=" + getUniqueId() : value;
   }
   
   /**

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/MenuContentHandlerImpl.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/MenuContentHandlerImpl.java?view=diff&rev=487362&r1=487361&r2=487362
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/MenuContentHandlerImpl.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/MenuContentHandlerImpl.java
Thu Dec 14 13:47:10 2006
@@ -907,7 +907,7 @@
       }
       
       // Get the Id of the node
-      String idProp = node.getId(); 
+      String idProp = node.getUniqueId(); 
       
       if (idProp != null)
       {

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/MenuNode.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/MenuNode.java?view=diff&rev=487362&r1=487361&r2=487362
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/MenuNode.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/MenuNode.java
Thu Dec 14 13:47:10 2006
@@ -470,15 +470,13 @@
   }
   
   /**
-   * getId - gets the id of the node.
+   * getId - gets the metadata id of the node.
    * 
    * @return - String identifier for the node component.
    */
   public String getId()
   {
-    // This must be made unique so that we do not have duplicates 
-    // in the idNodeMap on the menu's tree.      
-    return _id + _nodeSysId;
+    return _id;
   }
 
   /*===========================================================================
@@ -601,10 +599,19 @@
   }
 
   /**
-   * Set the MenuContentHandlerImpl's id.
+   * getUniqueId - gets the unique id of the node.
    * 
-   * This is appended to the node's id in getId() to 
-   * ensure that each node's id is unique.
+   * @return - String identifier for the node component.
+   */
+  protected String getUniqueId()
+  {
+    // This must be made unique so that we do not have duplicates 
+    // in the idNodeMap on the menu's tree.      
+    return _id + _nodeSysId;
+  }
+
+  /**
+   * Set the MenuContentHandlerImpl's id.
    * 
    * @return String object id of the MenuContentHandlerImpl
    */
@@ -616,7 +623,7 @@
   /**
    * Set the Menu Node's System id.
    * 
-   * This is appended to the node's id in getId() to 
+   * This is appended to the node's id in getUniqueId() to 
    * ensure that each node's id is unique.
    * 
    * @return String object System id of the node.



Mime
View raw message