You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2008/04/11 13:41:34 UTC

svn commit: r647120 - in /myfaces/tobago/trunk: core/src/main/java/org/apache/myfaces/tobago/component/ core/src/main/java/org/apache/myfaces/tobago/model/ core/src/main/java/org/apache/myfaces/tobago/taglib/component/ core/src/main/java/org/apache/myf...

Author: lofwyr
Date: Fri Apr 11 04:41:05 2008
New Revision: 647120

URL: http://svn.apache.org/viewvc?rev=647120&view=rev
Log:
TOBAGO-377: The new tree was moved from the sandbox to core (only in 1.1.x which is still alpha). The old one will be available for a few days as tc:treeOld, for migration.

Added:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITree.java   (contents, props changed)
      - copied, changed from r646781, myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/component/AbstractUITree.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITreeData.java   (contents, props changed)
      - copied, changed from r646781, myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/component/UITreeData.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITreeNode.java   (contents, props changed)
      - copied, changed from r646781, myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/component/AbstractUITreeNode.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/TreeModelBuilder.java   (contents, props changed)
      - copied, changed from r646781, myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/component/TreeModelBuilder.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/model/MixedTreeModel.java   (contents, props changed)
      - copied, changed from r646781, myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/model/MixedTreeModel.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/model/TreeModel.java   (contents, props changed)
      - copied, changed from r646781, myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/model/TreeModel.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/sandbox/
    myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/model/
    myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/model/MixedTreeModelUnitTest.java   (contents, props changed)
      - copied, changed from r646781, myfaces/tobago/trunk/sandbox/src/test/java/org/apache/myfaces/tobago/model/MixedTreeModelUnitTest.java
    myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/model/TreeModelUnitTest.java   (contents, props changed)
      - copied, changed from r646781, myfaces/tobago/trunk/sandbox/src/test/java/org/apache/myfaces/tobago/model/TreeModelUnitTest.java
    myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/Node.java   (contents, props changed)
      - copied, changed from r646781, myfaces/tobago/trunk/example/sandbox/src/main/java/org/apache/myfaces/tobago/example/sandbox/Node.java
    myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/TreeController.java
    myfaces/tobago/trunk/example/demo/src/main/webapp/image/feather.png   (props changed)
      - copied unchanged from r646781, myfaces/tobago/trunk/example/sandbox/src/main/webapp/feather.png
    myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-ajax.jsp   (contents, props changed)
      - copied, changed from r646781, myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-ajax.jsp
    myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-editor.jsp   (contents, props changed)
      - copied, changed from r646781, myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-editor.jsp
    myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-menu.jsp   (contents, props changed)
      - copied, changed from r646781, myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-menu.jsp
    myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-normal.jsp   (contents, props changed)
      - copied, changed from r646781, myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-normal.jsp
    myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-select.jsp   (contents, props changed)
      - copied, changed from r646781, myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-select.jsp
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeDataRenderer.java   (contents, props changed)
      - copied, changed from r646781, myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeDataRenderer.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java   (contents, props changed)
      - copied, changed from r646781, myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeRenderer.java   (contents, props changed)
      - copied, changed from r646781, myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeRenderer.java
    myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tree.js   (contents, props changed)
      - copied, changed from r646781, myfaces/tobago/trunk/sandbox/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tree.js
Removed:
    myfaces/tobago/trunk/example/sandbox/src/main/java/org/apache/myfaces/tobago/example/sandbox/Node.java
    myfaces/tobago/trunk/example/sandbox/src/main/webapp/feather.png
    myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-ajax.jsp
    myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-editor.jsp
    myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-menu.jsp
    myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-normal.jsp
    myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-select.jsp
    myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/component/AbstractUITree.java
    myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/component/AbstractUITreeNode.java
    myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/component/TreeModelBuilder.java
    myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/component/UITreeData.java
    myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/model/MixedTreeModel.java
    myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/model/TreeModel.java
    myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeDataRenderer.java
    myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java
    myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeRenderer.java
    myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/taglib/sandbox/TreeDataTagDeclaration.java
    myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/taglib/sandbox/TreeNodeTagDeclaration.java
    myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/taglib/sandbox/TreeTagDeclaration.java
    myfaces/tobago/trunk/sandbox/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-tree.js
    myfaces/tobago/trunk/sandbox/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tree.js
    myfaces/tobago/trunk/sandbox/src/test/java/org/apache/myfaces/tobago/model/MixedTreeModelUnitTest.java
    myfaces/tobago/trunk/sandbox/src/test/java/org/apache/myfaces/tobago/model/TreeModelUnitTest.java
Modified:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIPage.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeOldNodeDeclaration.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeOldTagDeclaration.java
    myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java
    myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/classes/log4j.xml
    myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/faces-config.xml
    myfaces/tobago/trunk/example/demo/src/main/webapp/navigation.jsp
    myfaces/tobago/trunk/example/demo/src/main/webapp/overview/tree.jsp
    myfaces/tobago/trunk/example/demo/src/main/webapp/reference/treeCommand.jsp
    myfaces/tobago/trunk/example/demo/src/main/webapp/reference/treeOld.jsp
    myfaces/tobago/trunk/example/sandbox/src/main/java/org/apache/myfaces/tobago/example/sandbox/Controller.java
    myfaces/tobago/trunk/example/sandbox/src/main/webapp/navigation.jsp
    myfaces/tobago/trunk/src/site/apt/index.apt

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIPage.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIPage.java?rev=647120&r1=647119&r2=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIPage.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIPage.java Fri Apr 11 04:41:05 2008
@@ -24,19 +24,19 @@
 import org.apache.commons.logging.LogFactory;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_STATE;
 import static org.apache.myfaces.tobago.TobagoConstants.SUBCOMPONENT_SEP;
-import org.apache.myfaces.tobago.model.PageState;
-import org.apache.myfaces.tobago.model.PageStateImpl;
-import org.apache.myfaces.tobago.webapp.TobagoMultipartFormdataRequest;
 import org.apache.myfaces.tobago.compat.FacesUtils;
 import org.apache.myfaces.tobago.compat.InvokeOnComponent;
-import org.apache.myfaces.tobago.util.DebugUtils;
+import org.apache.myfaces.tobago.model.PageState;
+import org.apache.myfaces.tobago.model.PageStateImpl;
 import org.apache.myfaces.tobago.util.ComponentUtil;
+import org.apache.myfaces.tobago.util.DebugUtils;
+import org.apache.myfaces.tobago.webapp.TobagoMultipartFormdataRequest;
 
+import javax.faces.FacesException;
 import javax.faces.application.FacesMessage;
-import javax.faces.component.UIComponent;
 import javax.faces.component.ContextCallback;
+import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
-import javax.faces.FacesException;
 import javax.servlet.ServletRequest;
 import javax.servlet.http.HttpServletRequestWrapper;
 import java.io.IOException;
@@ -151,10 +151,10 @@
     }
 
     UIComponent command = null;
-    try {
+    try { // todo: try bock should be removed, when tested, that the warning usually not accure.
       command = findComponent(currentActionId);
     } catch (Exception e) {
-      // ignore
+      LOG.warn("Should not happen!!! currentActionId='" + currentActionId + "'");
     }
 
     // TODO: remove this if block if prooven this never happens anymore

Copied: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITree.java (from r646781, myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/component/AbstractUITree.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITree.java?p2=myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITree.java&p1=myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/component/AbstractUITree.java&r1=646781&r2=647120&rev=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/component/AbstractUITree.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITree.java Fri Apr 11 04:41:05 2008
@@ -62,7 +62,7 @@
       if (child instanceof AbstractUITreeNode) {
         return child;
       }
-      if (child instanceof UITreeData) {
+      if (child instanceof AbstractUITreeData) {
         return child;
       }
     }

Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITree.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITree.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITreeData.java (from r646781, myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/component/UITreeData.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITreeData.java?p2=myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITreeData.java&p1=myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/component/UITreeData.java&r1=646781&r2=647120&rev=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/component/UITreeData.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITreeData.java Fri Apr 11 04:41:05 2008
@@ -24,6 +24,7 @@
 import org.apache.myfaces.tobago.model.TreeModel;
 
 import javax.faces.component.NamingContainer;
+import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.event.AbortProcessingException;
 import javax.faces.event.FacesEvent;
@@ -34,10 +35,10 @@
 import java.util.HashMap;
 import java.util.Map;
 
-public class UITreeData extends javax.faces.component.UIInput
+public abstract class AbstractUITreeData extends javax.faces.component.UIInput
     implements NamingContainer, TreeModelBuilder {
 
-  private static final Log LOG = LogFactory.getLog(UITreeData.class);
+  private static final Log LOG = LogFactory.getLog(AbstractUITreeData.class);
 
   public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.TreeData";
 
@@ -209,6 +210,17 @@
     return clientId + NamingContainer.SEPARATOR_CHAR + pathIndex;
   }
 
+  public UIComponent findComponent(String searchId) {
+
+    assert searchId.matches("^(_\\d+)+" + SEPARATOR_CHAR + ".*")
+        : "The searchId '" + searchId + "' does not start with a tree structure";
+
+    LOG.info("*************** from " + searchId); // fixme remove this line
+    searchId = searchId.substring(searchId.indexOf(SEPARATOR_CHAR) + 1);
+    LOG.info("*************** to   " + searchId); // fixme remove this line
+    return super.findComponent(searchId);
+  }
+
   @Override
   public void queueEvent(FacesEvent event) {
     super.queueEvent(new FacesEventWrapper(event, getPathIndex(), this));
@@ -217,8 +229,7 @@
   @Override
   public void broadcast(FacesEvent event) throws AbortProcessingException {
     if (event instanceof FacesEventWrapper) {
-      FacesEvent originalEvent
-          = ((FacesEventWrapper) event).getWrappedFacesEvent();
+      FacesEvent originalEvent = ((FacesEventWrapper) event).getWrappedFacesEvent();
       String eventPathIndex = ((FacesEventWrapper) event).getPathIndex();
       String currentPathIndex = getPathIndex();
       setPathIndex(eventPathIndex);
@@ -286,8 +297,7 @@
     private FacesEvent wrappedFacesEvent;
     private String pathIndex;
 
-    FacesEventWrapper(FacesEvent facesEvent, String pathIndex,
-        UITreeData redirectComponent) {
+    FacesEventWrapper(FacesEvent facesEvent, String pathIndex, AbstractUITreeData redirectComponent) {
       super(redirectComponent);
       wrappedFacesEvent = facesEvent;
       this.pathIndex = pathIndex;

Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITreeData.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITreeData.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITreeNode.java (from r646781, myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/component/AbstractUITreeNode.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITreeNode.java?p2=myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITreeNode.java&p1=myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/component/AbstractUITreeNode.java&r1=646781&r2=647120&rev=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/component/AbstractUITreeNode.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITreeNode.java Fri Apr 11 04:41:05 2008
@@ -20,6 +20,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.tobago.model.MixedTreeModel;
+
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.swing.tree.DefaultMutableTreeNode;
@@ -27,7 +28,6 @@
 public abstract class AbstractUITreeNode extends AbstractUICommand implements SupportsMarkup, TreeModelBuilder {
 
   private static final Log LOG = LogFactory.getLog(AbstractUITreeNode.class);
-
 
   @Override
   public boolean getRendersChildren() {

Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITreeNode.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITreeNode.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/TreeModelBuilder.java (from r646781, myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/component/TreeModelBuilder.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/TreeModelBuilder.java?p2=myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/TreeModelBuilder.java&p1=myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/component/TreeModelBuilder.java&r1=646781&r2=647120&rev=647120&view=diff
==============================================================================
    (empty)

Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/TreeModelBuilder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/TreeModelBuilder.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/model/MixedTreeModel.java (from r646781, myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/model/MixedTreeModel.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/model/MixedTreeModel.java?p2=myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/model/MixedTreeModel.java&p1=myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/model/MixedTreeModel.java&r1=646781&r2=647120&rev=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/model/MixedTreeModel.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/model/MixedTreeModel.java Fri Apr 11 04:41:05 2008
@@ -20,7 +20,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LABEL;
-import org.apache.myfaces.tobago.component.UITreeData;
+import org.apache.myfaces.tobago.component.AbstractUITreeData;
 import org.apache.myfaces.tobago.component.AbstractUITreeNode;
 
 import javax.swing.tree.DefaultMutableTreeNode;
@@ -68,7 +68,7 @@
     }
   }
 
-  public void beginBuildNodeData(UITreeData data) {
+  public void beginBuildNodeData(AbstractUITreeData data) {
     if (LOG.isDebugEnabled()) {
       LOG.debug("var=" + data.getVar());
     }
@@ -81,7 +81,7 @@
     isInData = true;
   }
 
-  public void endBuildNodeData(UITreeData data) {
+  public void endBuildNodeData(AbstractUITreeData data) {
     if (LOG.isDebugEnabled()) {
       LOG.debug("var=" + data.getVar());
     }

Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/model/MixedTreeModel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/model/MixedTreeModel.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/model/TreeModel.java (from r646781, myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/model/TreeModel.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/model/TreeModel.java?p2=myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/model/TreeModel.java&p1=myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/model/TreeModel.java&r1=646781&r2=647120&rev=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/model/TreeModel.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/model/TreeModel.java Fri Apr 11 04:41:05 2008
@@ -22,11 +22,11 @@
 
 import javax.swing.tree.DefaultMutableTreeNode;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Collections;
 
 // todo: make more general (e.g. support other trees)
 

Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/model/TreeModel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/model/TreeModel.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeOldNodeDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeOldNodeDeclaration.java?rev=647120&r1=647119&r2=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeOldNodeDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeOldNodeDeclaration.java Fri Apr 11 04:41:05 2008
@@ -17,9 +17,10 @@
  * limitations under the License.
  */
 
-import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
 
+/** @deprecated */
 @UIComponentTag(
     uiComponent = "org.apache.myfaces.tobago.component.UITreeOldNode",
     generate = false,

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeOldTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeOldTagDeclaration.java?rev=647120&r1=647119&r2=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeOldTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeOldTagDeclaration.java Fri Apr 11 04:41:05 2008
@@ -35,7 +35,7 @@
  * Renders a tree view.
  */
 @Deprecated
-@Tag(name = "tree")
+@Tag(name = "treeOld")
 @BodyContentDescription(anyTagOf = "<f:facet>* <f:actionListener>?")
 @UIComponentTag(
     uiComponent = "org.apache.myfaces.tobago.component.UITreeOld",

Copied: myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/model/MixedTreeModelUnitTest.java (from r646781, myfaces/tobago/trunk/sandbox/src/test/java/org/apache/myfaces/tobago/model/MixedTreeModelUnitTest.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/model/MixedTreeModelUnitTest.java?p2=myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/model/MixedTreeModelUnitTest.java&p1=myfaces/tobago/trunk/sandbox/src/test/java/org/apache/myfaces/tobago/model/MixedTreeModelUnitTest.java&r1=646781&r2=647120&rev=647120&view=diff
==============================================================================
    (empty)

Propchange: myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/model/MixedTreeModelUnitTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/model/MixedTreeModelUnitTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/model/TreeModelUnitTest.java (from r646781, myfaces/tobago/trunk/sandbox/src/test/java/org/apache/myfaces/tobago/model/TreeModelUnitTest.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/model/TreeModelUnitTest.java?p2=myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/model/TreeModelUnitTest.java&p1=myfaces/tobago/trunk/sandbox/src/test/java/org/apache/myfaces/tobago/model/TreeModelUnitTest.java&r1=646781&r2=647120&rev=647120&view=diff
==============================================================================
    (empty)

Propchange: myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/model/TreeModelUnitTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/model/TreeModelUnitTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java?rev=647120&r1=647119&r2=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java (original)
+++ myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java Fri Apr 11 04:41:05 2008
@@ -99,6 +99,8 @@
 
   public String navigate() {
     Node selected = (Node) state.getMarker().getUserObject();
+    LOG.info("***************************************************************************************************");
+    LOG.info("outcome = '" + selected.getOutcome() + "'");
     return selected.getOutcome();
   }
 
@@ -210,6 +212,13 @@
 
     public void setId(String id) {
       this.id = id;
+    }
+
+    public String action() {
+      LOG.info("***********************************************************************************************");
+      LOG.info(outcome);
+      LOG.info("***********************************************************************************************");
+      return outcome;
     }
 
     public String getOutcome() {

Copied: myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/Node.java (from r646781, myfaces/tobago/trunk/example/sandbox/src/main/java/org/apache/myfaces/tobago/example/sandbox/Node.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/Node.java?p2=myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/Node.java&p1=myfaces/tobago/trunk/example/sandbox/src/main/java/org/apache/myfaces/tobago/example/sandbox/Node.java&r1=646781&r2=647120&rev=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/sandbox/src/main/java/org/apache/myfaces/tobago/example/sandbox/Node.java (original)
+++ myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/Node.java Fri Apr 11 04:41:05 2008
@@ -1,4 +1,4 @@
-package org.apache.myfaces.tobago.example.sandbox;
+package org.apache.myfaces.tobago.example.demo;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more

Propchange: myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/Node.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/Node.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/TreeController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/TreeController.java?rev=647120&view=auto
==============================================================================
--- myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/TreeController.java (added)
+++ myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/TreeController.java Fri Apr 11 04:41:05 2008
@@ -0,0 +1,129 @@
+package org.apache.myfaces.tobago.example.demo;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.tobago.model.TreeState;
+
+import javax.swing.tree.DefaultMutableTreeNode;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+public class TreeController {
+
+  private static final Log LOG = LogFactory.getLog(TreeController.class);
+
+  private static final String STRONG = "strong";
+
+  private DefaultMutableTreeNode tree;
+
+  private TreeState state;
+
+  public TreeController() {
+    // tree
+    tree = new DefaultMutableTreeNode(new Node("1 Category"));
+    tree.add(new DefaultMutableTreeNode(new Node("1.1 Sports")));
+    tree.add(new DefaultMutableTreeNode(new Node("1.2 Movies")));
+    DefaultMutableTreeNode temp = new DefaultMutableTreeNode(new Node("1.3 Science"));
+    tree.add(temp);
+    DefaultMutableTreeNode music = new DefaultMutableTreeNode(new Node("1.4 Music"));
+    tree.add(music);
+    tree.add(new DefaultMutableTreeNode(new Node("1.5 Games")));
+    temp.add(new DefaultMutableTreeNode(new Node("1.3.1 Geography (strong markup)", STRONG)));
+    temp.add(new DefaultMutableTreeNode(new Node("1.3.2 Mathematics (strong markup)", STRONG)));
+    DefaultMutableTreeNode temp2 = new DefaultMutableTreeNode(new Node("1.3.3 Pictures"));
+    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.1 Education")));
+    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.2 Family")));
+    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.3 Comercial")));
+    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.4 Summer (disabled)", true)));
+    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.5 Winter (disabled)", true)));
+    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.6 Red")));
+    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.7 Black")));
+    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.8 White")));
+    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.9 Good")));
+    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.10 Evil")));
+    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.11 Flower")));
+    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.12 Animal")));
+    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.13 Personal")));
+    temp.add(temp2);
+
+    // state
+
+    state = new TreeState();
+    state.addExpandState(tree);
+    state.addExpandState(temp);
+    state.addSelection(temp2);
+    state.setMarker(music);
+  }
+
+  public String action1() {
+    LOG.info("action 1");
+    return null;
+  }
+
+  public String action2() {
+    LOG.info("action 2");
+    return null;
+  }
+
+  public String action3() {
+    LOG.info("action 3");
+    return null;
+  }
+
+  public String createNode() {
+    DefaultMutableTreeNode marker = state.getMarker();
+    if (marker != null) {
+      marker.insert(new DefaultMutableTreeNode(new Node("New Node")), 0);
+    } else {
+      // todo: print a warning or use root?
+    }
+    return null;
+  }
+
+  public String deleteNode() {
+    DefaultMutableTreeNode marker = state.getMarker();
+    if (marker != null) {
+      marker.removeFromParent();
+    } else {
+      // todo: print a warning or use root?
+    }
+    return null;
+  }
+
+  public String getCurrentTime() {
+    return new SimpleDateFormat("hh:MM:ss").format(new Date());
+  }
+
+  public DefaultMutableTreeNode getTree() {
+    return tree;
+  }
+
+  public void setTree(DefaultMutableTreeNode tree) {
+    this.tree = tree;
+  }
+
+  public TreeState getState() {
+    return state;
+  }
+
+  public void setState(TreeState state) {
+    this.state = state;
+  }
+}

Modified: myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/classes/log4j.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/classes/log4j.xml?rev=647120&r1=647119&r2=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/classes/log4j.xml (original)
+++ myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/classes/log4j.xml Fri Apr 11 04:41:05 2008
@@ -86,6 +86,7 @@
     <priority value="debug" />
   </category>
 
+<!--
   <category name="org.apache.myfaces.tobago.event">
     <priority value="error" />
   </category>
@@ -93,6 +94,7 @@
   <category name="org.apache.myfaces.tobago.renderkit.CommandRendererBase">
     <priority value="error" />
   </category>
+-->
 
   <root>
     <priority value="info" />

Modified: myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/faces-config.xml?rev=647120&r1=647119&r2=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/faces-config.xml (original)
+++ myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/faces-config.xml Fri Apr 11 04:41:05 2008
@@ -48,6 +48,12 @@
     <managed-bean-scope>session</managed-bean-scope>
   </managed-bean>
 
+  <managed-bean>
+    <managed-bean-name>treeController</managed-bean-name>
+    <managed-bean-class>org.apache.myfaces.tobago.example.demo.TreeController</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+
   <lifecycle>
     <phase-listener>
       org.apache.myfaces.tobago.example.demo.SynchronizeNavigationPhaseListener

Propchange: myfaces/tobago/trunk/example/demo/src/main/webapp/image/feather.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: myfaces/tobago/trunk/example/demo/src/main/webapp/navigation.jsp
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/webapp/navigation.jsp?rev=647120&r1=647119&r2=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/demo/src/main/webapp/navigation.jsp (original)
+++ myfaces/tobago/trunk/example/demo/src/main/webapp/navigation.jsp Fri Apr 11 04:41:05 2008
@@ -1,3 +1,11 @@
+<%@ page import="org.apache.myfaces.tobago.example.reference.SimpleBean" %>
+<%@ page import="org.apache.myfaces.tobago.model.TreeState" %>
+<%@ page import="javax.faces.application.FacesMessage" %>
+<%@ page import="javax.faces.context.FacesContext" %>
+<%@ page import="javax.swing.tree.DefaultMutableTreeNode" %>
+<%@ page import="java.io.PrintWriter" %>
+<%@ page import="java.io.StringWriter" %>
+<%@ page import="java.util.Date" %>
 <%--
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -23,19 +31,14 @@
       <tc:gridLayout rows="*"/>
     </f:facet>
 
-    <tc:tree value="#{navigation.tree}"
-             mode="menu"
-             id="nav"
-             nameReference="userObject.title"
-             idReference="userObject.id"
-             tipReference="userObject.title"
-             state="#{navigation.state}"
-             showIcons="false"
-             showJunctions="false"
-             showRoot="false">
-      <f:facet name="treeNodeCommand">
-        <tc:link action="#{navigation.navigate}" immediate="true"/>
-      </f:facet>
+    <tc:tree id="nav" mode="menu" showRoot="true">
+      <tc:treeData value="#{navigation.tree}" var="node" id="data">
+        <tc:treeNode label="#{node.userObject.title}"
+                     action="#{node.userObject.action}"
+                     immediate="true"
+            value="#{node}"
+            expanded="true"/>
+      </tc:treeData>
     </tc:tree>
 
   </tc:panel>

Modified: myfaces/tobago/trunk/example/demo/src/main/webapp/overview/tree.jsp
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/webapp/overview/tree.jsp?rev=647120&r1=647119&r2=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/demo/src/main/webapp/overview/tree.jsp (original)
+++ myfaces/tobago/trunk/example/demo/src/main/webapp/overview/tree.jsp Fri Apr 11 04:41:05 2008
@@ -38,7 +38,7 @@
           <tc:gridLayout columns="2*;1*" />
         </f:facet>
 
-            <tc:tree value="#{demo.tree}" state="#{demo.treeState}" id="tree"
+            <tc:treeOld value="#{demo.tree}" state="#{demo.treeState}" id="tree"
                 idReference="userObject.id"
                 nameReference="userObject.name"
                 showIcons="#{demo.showIcons}"
@@ -50,7 +50,7 @@
                 tipReference="userObject.name"                
                 >
               <f:actionListener type="org.apache.myfaces.tobago.example.demo.actionlistener.TreeEditor" />
-            </tc:tree>
+            </tc:treeOld>
 
             <tc:panel>
               <f:facet name="layout">

Copied: myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-ajax.jsp (from r646781, myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-ajax.jsp)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-ajax.jsp?p2=myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-ajax.jsp&p1=myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-ajax.jsp&r1=646781&r2=647120&rev=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-ajax.jsp (original)
+++ myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-ajax.jsp Fri Apr 11 04:41:05 2008
@@ -15,7 +15,6 @@
  * limitations under the License.
 --%>
 
-<%@ taglib uri="http://myfaces.apache.org/tobago/sandbox" prefix="tcs" %>
 <%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
 
@@ -35,15 +34,15 @@
         <tc:reload frequency="2000"/>
       </f:facet>
 
-      <tcs:tree state="#{controller.state}" id="tree"
+      <tc:tree state="#{controller.state}" id="tree"
                 showIcons="true"
                 showJunctions="true"
                 showRootJunction="true"
                 showRoot="true"
           >
-        <tcs:treeNode label="Root" id="root" expanded="true">
-          <tcs:treeData value="#{controller.tree}" var="node" id="data">
-            <tcs:treeNode label="#{node.userObject.name}"
+        <tc:treeNode label="Root" id="root" expanded="true">
+          <tc:treeData value="#{controller.tree}" var="node" id="data">
+            <tc:treeNode label="#{node.userObject.name}"
                           id="template"
                           expanded="#{node.userObject.expanded}"
                           markup="#{node.userObject.markup}"
@@ -51,20 +50,20 @@
                           action="#{node.userObject.action}"
                           disabled="#{node.userObject.disabled}"
                           value="#{node}"/>
-          </tcs:treeData>
-          <tcs:treeNode label="2 Action 1" action="#{controller.action1}" id="action1"/>
-          <tcs:treeNode label="3 Action 2" action="#{controller.action2}" id="action2"/>
-          <tcs:treeNode label="4 Action 3" action="#{controller.action3}" id="action3">
-            <tcs:treeNode label="4.1 On Click 1" onclick="alert('On Click 1');" id="click1"/>
-            <tcs:treeNode label="4.2 On Click 2" onclick="alert('On Click 2');" id="click2">
-              <tcs:treeNode label="4.2.1 On Click 3" onclick="alert('On Click 3');" id="click3"/>
-            </tcs:treeNode>
-          </tcs:treeNode>
-          <tcs:treeNode label="5 Link" link="http://myfaces.apache.org/tobago/" id="link" tip="Subnode Link"/>
-          <tcs:treeNode label="6 Target" action="#{controller.action2}" target="Target Window"/>
-          <tcs:treeNode label="7 Time: #{controller.currentTime}" />
-        </tcs:treeNode>
-      </tcs:tree>
+          </tc:treeData>
+          <tc:treeNode label="2 Action 1" action="#{controller.action1}" id="action1"/>
+          <tc:treeNode label="3 Action 2" action="#{controller.action2}" id="action2"/>
+          <tc:treeNode label="4 Action 3" action="#{controller.action3}" id="action3">
+            <tc:treeNode label="4.1 On Click 1" onclick="alert('On Click 1');" id="click1"/>
+            <tc:treeNode label="4.2 On Click 2" onclick="alert('On Click 2');" id="click2">
+              <tc:treeNode label="4.2.1 On Click 3" onclick="alert('On Click 3');" id="click3"/>
+            </tc:treeNode>
+          </tc:treeNode>
+          <tc:treeNode label="5 Link" link="http://myfaces.apache.org/tobago/" id="link" tip="Subnode Link"/>
+          <tc:treeNode label="6 Target" action="#{controller.action2}" target="Target Window"/>
+          <tc:treeNode label="7 Time: #{controller.currentTime}" />
+        </tc:treeNode>
+      </tc:tree>
     </tc:panel>
     <tc:cell/>
 

Propchange: myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-ajax.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-ajax.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-editor.jsp (from r646781, myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-editor.jsp)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-editor.jsp?p2=myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-editor.jsp&p1=myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-editor.jsp&r1=646781&r2=647120&rev=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-editor.jsp (original)
+++ myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-editor.jsp Fri Apr 11 04:41:05 2008
@@ -15,7 +15,6 @@
  * limitations under the License.
 --%>
 
-<%@ taglib uri="http://myfaces.apache.org/tobago/sandbox" prefix="tcs" %>
 <%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
 
@@ -29,23 +28,23 @@
     </f:facet>
 
     <tc:toolBar>
-      <tc:toolBarCommand action="#{controller.createNode}" label="New"/>
-      <tc:toolBarCommand action="#{controller.deleteNode}" label="Delete"/>
+      <tc:toolBarCommand action="#{treeController.createNode}" label="New"/>
+      <tc:toolBarCommand action="#{treeController.deleteNode}" label="Delete"/>
     </tc:toolBar>
 
-    <tcs:tree id="tree">
+    <tc:tree id="tree">
       <!--
       fixme: The helping-node "Root" is required in the moment, has to be removed!
       -->
-      <tcs:treeNode label="Root">
-        <tcs:treeData value="#{controller.tree}" var="node" id="data">
-          <tcs:treeNode label="#{node.userObject.name}" id="template"
+      <tc:treeNode label="Root">
+        <tc:treeData value="#{treeController.tree}" var="node" id="data">
+          <tc:treeNode label="#{node.userObject.name}" id="template"
                         markup="#{node.userObject.markup}"
                         tip="#{node.userObject.tip}"
                         action="#{node.userObject.action}" value="#{node}"/>
-        </tcs:treeData>
-      </tcs:treeNode>
-    </tcs:tree>
+        </tc:treeData>
+      </tc:treeNode>
+    </tc:tree>
 
     <tc:cell/>
 

Propchange: myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-editor.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-editor.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-menu.jsp (from r646781, myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-menu.jsp)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-menu.jsp?p2=myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-menu.jsp&p1=myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-menu.jsp&r1=646781&r2=647120&rev=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-menu.jsp (original)
+++ myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-menu.jsp Fri Apr 11 04:41:05 2008
@@ -15,7 +15,6 @@
  * limitations under the License.
 --%>
 
-<%@ taglib uri="http://myfaces.apache.org/tobago/sandbox" prefix="tcs" %>
 <%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
 
@@ -28,15 +27,15 @@
       <tc:gridLayout margin="10px" rows="*;*;*"/>
     </f:facet>
 
-    <tcs:tree id="menu"
+    <tc:tree id="menu"
               showIcons="false"
               showJunctions="false"
               showRootJunction="false"
               showRoot="true"
               mode="menu">
-      <tcs:treeNode label="Root" id="root" expanded="true">
-        <tcs:treeData value="#{controller.tree}" var="node" id="data">
-          <tcs:treeNode label="#{node.userObject.name}"
+      <tc:treeNode label="Root" id="root" expanded="true">
+        <tc:treeData value="#{treeController.tree}" var="node" id="data">
+          <tc:treeNode label="#{node.userObject.name}"
                         id="template"
                         expanded="#{node.userObject.expanded}"
                         markup="#{node.userObject.markup}"
@@ -44,23 +43,23 @@
                         action="#{node.userObject.action}"
                         disabled="#{node.userObject.disabled}"
                         value="#{node}"/>
-        </tcs:treeData>
-        <tcs:treeNode label="2 Action 1" action="#{controller.action1}" id="action1"/>
-        <tcs:treeNode label="3 Action 2" action="#{controller.action2}" id="action2"/>
-        <tcs:treeNode label="4 Action 3" action="#{controller.action3}" id="action3">
-          <tcs:treeNode label="4.1 On Click 1" onclick="alert('On Click 1');" id="click1"/>
-          <tcs:treeNode label="4.2 On Click 2" onclick="alert('On Click 2');" id="click2">
-            <tcs:treeNode label="4.2.1 On Click 3" onclick="alert('On Click 3');" id="click3"/>
-          </tcs:treeNode>
-        </tcs:treeNode>
-        <tcs:treeNode label="5 Link" link="http://myfaces.apache.org/tobago/" id="link" tip="Subnode Link"/>
-        <tcs:treeNode label="6 Target" action="#{controller.action2}" target="Target Window"/>
-      </tcs:treeNode>
-    </tcs:tree>
+        </tc:treeData>
+        <tc:treeNode label="2 Action 1" action="#{treeController.action1}" id="action1"/>
+        <tc:treeNode label="3 Action 2" action="#{treeController.action2}" id="action2"/>
+        <tc:treeNode label="4 Action 3" action="#{treeController.action3}" id="action3">
+          <tc:treeNode label="4.1 On Click 1" onclick="alert('On Click 1');" id="click1"/>
+          <tc:treeNode label="4.2 On Click 2" onclick="alert('On Click 2');" id="click2">
+            <tc:treeNode label="4.2.1 On Click 3" onclick="alert('On Click 3');" id="click3"/>
+          </tc:treeNode>
+        </tc:treeNode>
+        <tc:treeNode label="5 Link" link="http://myfaces.apache.org/tobago/" id="link" tip="Subnode Link"/>
+        <tc:treeNode label="6 Target" action="#{treeController.action2}" target="Target Window"/>
+      </tc:treeNode>
+    </tc:tree>
 
-    <tcs:tree mode="menu">
-      <tcs:treeData value="#{controller.tree}" var="node" id="data">
-        <tcs:treeNode label="#{node.userObject.name}"
+    <tc:tree mode="menu">
+      <tc:treeData value="#{treeController.tree}" var="node" id="data">
+        <tc:treeNode label="#{node.userObject.name}"
                       id="template"
                       expanded="#{node.userObject.expanded}"
                       markup="#{node.userObject.markup}"
@@ -68,23 +67,23 @@
                       action="#{node.userObject.action}"
                       disabled="#{node.userObject.disabled}"
                       value="#{node}"/>
-      </tcs:treeData>
-    </tcs:tree>
+      </tc:treeData>
+    </tc:tree>
 
-    <tcs:tree mode="menu">
-      <tcs:treeNode label="Root" expanded="true">
-        <tcs:treeNode label="2 Action 1" />
-        <tcs:treeNode label="3 Action 2" />
-        <tcs:treeNode label="4 Action 3" >
-          <tcs:treeNode label="4.1 On Click 1" onclick="alert('On Click 1');" />
-          <tcs:treeNode label="4.2 On Click 2" onclick="alert('On Click 2');" >
-            <tcs:treeNode label="4.2.1 On Click 3" onclick="alert('On Click 3');" />
-          </tcs:treeNode>
-        </tcs:treeNode>
-        <tcs:treeNode label="5 Link" link="http://myfaces.apache.org/tobago/" tip="Subnode Link"/>
-        <tcs:treeNode label="6 Target" target="Target Window"/>
-      </tcs:treeNode>
-    </tcs:tree>
+    <tc:tree mode="menu">
+      <tc:treeNode label="Root" expanded="true">
+        <tc:treeNode label="2 Action 1" />
+        <tc:treeNode label="3 Action 2" />
+        <tc:treeNode label="4 Action 3" >
+          <tc:treeNode label="4.1 On Click 1" onclick="alert('On Click 1');" />
+          <tc:treeNode label="4.2 On Click 2" onclick="alert('On Click 2');" >
+            <tc:treeNode label="4.2.1 On Click 3" onclick="alert('On Click 3');" />
+          </tc:treeNode>
+        </tc:treeNode>
+        <tc:treeNode label="5 Link" link="http://myfaces.apache.org/tobago/" tip="Subnode Link"/>
+        <tc:treeNode label="6 Target" target="Target Window"/>
+      </tc:treeNode>
+    </tc:tree>
 
     <tc:cell />
 

Propchange: myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-menu.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-menu.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-normal.jsp (from r646781, myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-normal.jsp)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-normal.jsp?p2=myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-normal.jsp&p1=myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-normal.jsp&r1=646781&r2=647120&rev=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-normal.jsp (original)
+++ myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-normal.jsp Fri Apr 11 04:41:05 2008
@@ -15,7 +15,6 @@
  * limitations under the License.
 --%>
 
-<%@ taglib uri="http://myfaces.apache.org/tobago/sandbox" prefix="tcs" %>
 <%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
 
@@ -29,15 +28,15 @@
     </f:facet>
 
     <%--state="#{controller.state}" --%>
-    <tcs:tree id="tree"
+    <tc:tree id="tree"
         showIcons="true"
         showJunctions="true"
         showRootJunction="true"
         showRoot="true"
         >
-      <tcs:treeNode label="Root" id="root" expanded="true">
-        <tcs:treeData value="#{controller.tree}" var="node" id="data">
-          <tcs:treeNode label="#{node.userObject.name}"
+      <tc:treeNode label="Root" id="root" expanded="true">
+        <tc:treeData value="#{treeController.tree}" var="node" id="data">
+          <tc:treeNode label="#{node.userObject.name}"
                         id="template"
                         expanded="#{node.userObject.expanded}"
                         markup="#{node.userObject.markup}"
@@ -45,24 +44,24 @@
                         action="#{node.userObject.action}"
                         disabled="#{node.userObject.disabled}"
                         value="#{node}"
-                        image="feather.png"/>
-        </tcs:treeData>
-        <tcs:treeNode label="2 Action 1" action="#{controller.action1}" id="action1">
+                        image="image/feather.png"/>
+        </tc:treeData>
+        <tc:treeNode label="2 Action 1" action="#{treeController.action1}" id="action1">
           <f:facet name="addendum">
             <tc:out value="(Addendum)" />
           </f:facet>
-        </tcs:treeNode>
-        <tcs:treeNode label="3 Action 2" action="#{controller.action2}" id="action2"/>
-        <tcs:treeNode label="4 Action 3" action="#{controller.action3}" id="action3">
-          <tcs:treeNode label="4.1 On Click 1" onclick="alert('On Click 1');" id="click1"/>
-          <tcs:treeNode label="4.2 On Click 2" onclick="alert('On Click 2');" id="click2">
-            <tcs:treeNode label="4.2.1 On Click 3" onclick="alert('On Click 3');" id="click3"/>
-          </tcs:treeNode>
-        </tcs:treeNode>
-        <tcs:treeNode label="5 Link" link="http://myfaces.apache.org/tobago/" id="link" tip="Subnode Link"/>
-        <tcs:treeNode label="6 Target" action="#{controller.action2}" target="Target Window"/>
-      </tcs:treeNode>
-    </tcs:tree>
+        </tc:treeNode>
+        <tc:treeNode label="3 Action 2" action="#{treeController.action2}" id="action2"/>
+        <tc:treeNode label="4 Action 3" action="#{treeController.action3}" id="action3">
+          <tc:treeNode label="4.1 On Click 1" onclick="alert('On Click 1');" id="click1"/>
+          <tc:treeNode label="4.2 On Click 2" onclick="alert('On Click 2');" id="click2">
+            <tc:treeNode label="4.2.1 On Click 3" onclick="alert('On Click 3');" id="click3"/>
+          </tc:treeNode>
+        </tc:treeNode>
+        <tc:treeNode label="5 Link" link="http://myfaces.apache.org/tobago/" id="link" tip="Subnode Link"/>
+        <tc:treeNode label="6 Target" action="#{treeController.action2}" target="Target Window"/>
+      </tc:treeNode>
+    </tc:tree>
 
     <tc:cell/>
 

Propchange: myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-normal.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-normal.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-select.jsp (from r646781, myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-select.jsp)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-select.jsp?p2=myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-select.jsp&p1=myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-select.jsp&r1=646781&r2=647120&rev=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/sandbox/src/main/webapp/tree-select.jsp (original)
+++ myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-select.jsp Fri Apr 11 04:41:05 2008
@@ -15,7 +15,6 @@
  * limitations under the License.
 --%>
 
-<%@ taglib uri="http://myfaces.apache.org/tobago/sandbox" prefix="tcs" %>
 <%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
 
@@ -28,28 +27,27 @@
       <tc:gridLayout margin="10px" rows="300px;*"/>
     </f:facet>
 
-    <tcs:tree id="sel"
+    <tc:tree id="sel"
               showIcons="true"
               showJunctions="true"
               showRootJunction="true"
               showRoot="true"
               selectable="single">
-      <tcs:treeNode label="Root">
-        <tcs:treeData value="#{controller.tree}" var="node">
-          <tcs:treeNode label="#{node.userObject.name}"
+      <tc:treeNode label="Root">
+        <tc:treeData value="#{treeController.tree}" var="node">
+          <tc:treeNode label="#{node.userObject.name}"
                         markup="#{node.userObject.markup}"
-                        tip="#{node.userObject.tip}"
-              />
-        </tcs:treeData>
-        <tcs:treeNode label="Sub 1"/>
-        <tcs:treeNode label="Sub 2"/>
-        <tcs:treeNode label="Sub 3">
-          <tcs:treeNode label="Sub 3.1"/>
-          <tcs:treeNode label="Sub 3.2"/>
-        </tcs:treeNode>
-        <tcs:treeNode label="Sub 4" tip="Subnode Number 4"/>
-      </tcs:treeNode>
-    </tcs:tree>
+                        tip="#{node.userObject.tip}"/>
+        </tc:treeData>
+        <tc:treeNode label="Sub 1"/>
+        <tc:treeNode label="Sub 2"/>
+        <tc:treeNode label="Sub 3">
+          <tc:treeNode label="Sub 3.1"/>
+          <tc:treeNode label="Sub 3.2"/>
+        </tc:treeNode>
+        <tc:treeNode label="Sub 4" tip="Subnode Number 4"/>
+      </tc:treeNode>
+    </tc:tree>
 
     <tc:cell/>
 

Propchange: myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-select.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/example/demo/src/main/webapp/reference/tree-select.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: myfaces/tobago/trunk/example/demo/src/main/webapp/reference/treeCommand.jsp
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/webapp/reference/treeCommand.jsp?rev=647120&r1=647119&r2=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/demo/src/main/webapp/reference/treeCommand.jsp (original)
+++ myfaces/tobago/trunk/example/demo/src/main/webapp/reference/treeCommand.jsp Fri Apr 11 04:41:05 2008
@@ -26,12 +26,12 @@
         <tc:gridLayout rows="300px;1*"/>
       </f:facet>
 
-      <tc:tree state="#{treeCommandController.state}" value="#{treeCommandController.tree}"
+      <tc:treeOld state="#{treeCommandController.state}" value="#{treeCommandController.tree}"
                idReference="userObject" nameReference="userObject" mode="menu">
         <f:facet name="treeNodeCommand">
           <tc:link action="#{treeCommandController.command}"/>
         </f:facet>
-      </tc:tree>
+      </tc:treeOld>
 
       <tc:cell/>
 

Modified: myfaces/tobago/trunk/example/demo/src/main/webapp/reference/treeOld.jsp
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/webapp/reference/treeOld.jsp?rev=647120&r1=647119&r2=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/demo/src/main/webapp/reference/treeOld.jsp (original)
+++ myfaces/tobago/trunk/example/demo/src/main/webapp/reference/treeOld.jsp Fri Apr 11 04:41:05 2008
@@ -15,8 +15,8 @@
  * limitations under the License.
 --%>
 
-<%@ page import="javax.swing.tree.DefaultMutableTreeNode" %>
 <%@ page import="org.apache.myfaces.tobago.model.TreeState" %>
+<%@ page import="javax.swing.tree.DefaultMutableTreeNode" %>
 
 <%
   DefaultMutableTreeNode tree;
@@ -58,7 +58,7 @@
           <%--<tc:gridLayout rows="300px;1*" />--%>
           <tc:gridLayout rows="200px;300px;1*" />
         </f:facet>
-        <tc:tree state="#{treeState}" value="#{tree}" id="screenshotTree"
+        <tc:treeOld state="#{treeState}" value="#{tree}" id="screenshotTree"
             idReference="userObject"
             nameReference="userObject"
             showIcons="true"
@@ -69,7 +69,7 @@
             mutable="false"
             />
 
-        <tc:tree state="#{treeState}" value="#{tree}"
+        <tc:treeOld state="#{treeState}" value="#{tree}"
             idReference="userObject"
             nameReference="userObject"
             showIcons="false"

Modified: myfaces/tobago/trunk/example/sandbox/src/main/java/org/apache/myfaces/tobago/example/sandbox/Controller.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/sandbox/src/main/java/org/apache/myfaces/tobago/example/sandbox/Controller.java?rev=647120&r1=647119&r2=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/sandbox/src/main/java/org/apache/myfaces/tobago/example/sandbox/Controller.java (original)
+++ myfaces/tobago/trunk/example/sandbox/src/main/java/org/apache/myfaces/tobago/example/sandbox/Controller.java Fri Apr 11 04:41:05 2008
@@ -19,10 +19,8 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.myfaces.tobago.model.TreeState;
 import org.apache.myfaces.tobago.model.Wizard;
 
-import javax.swing.tree.DefaultMutableTreeNode;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
@@ -30,12 +28,6 @@
 
   private static final Log LOG = LogFactory.getLog(Controller.class);
 
-  private static final String STRONG = "strong";
-
-  private DefaultMutableTreeNode tree;
-
-  private TreeState state;
-
   private int sliderValue;
 
   private Wizard wizard;
@@ -43,41 +35,6 @@
   private String filterType;
 
   public Controller() {
-    // tree
-    tree = new DefaultMutableTreeNode(new Node("1 Category"));
-    tree.add(new DefaultMutableTreeNode(new Node("1.1 Sports")));
-    tree.add(new DefaultMutableTreeNode(new Node("1.2 Movies")));
-    DefaultMutableTreeNode temp = new DefaultMutableTreeNode(new Node("1.3 Science"));
-    tree.add(temp);
-    DefaultMutableTreeNode music = new DefaultMutableTreeNode(new Node("1.4 Music"));
-    tree.add(music);
-    tree.add(new DefaultMutableTreeNode(new Node("1.5 Games")));
-    temp.add(new DefaultMutableTreeNode(new Node("1.3.1 Geography (strong markup)", STRONG)));
-    temp.add(new DefaultMutableTreeNode(new Node("1.3.2 Mathematics (strong markup)", STRONG)));
-    DefaultMutableTreeNode temp2 = new DefaultMutableTreeNode(new Node("1.3.3 Pictures"));
-    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.1 Education")));
-    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.2 Family")));
-    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.3 Comercial")));
-    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.4 Summer (disabled)", true)));
-    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.5 Winter (disabled)", true)));
-    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.6 Red")));
-    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.7 Black")));
-    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.8 White")));
-    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.9 Good")));
-    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.10 Evil")));
-    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.11 Flower")));
-    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.12 Animal")));
-    temp2.add(new DefaultMutableTreeNode(new Node("1.3.3.13 Personal")));
-    temp.add(temp2);
-
-    // state
-
-    state = new TreeState();
-    state.addExpandState(tree);
-    state.addExpandState(temp);
-    state.addSelection(temp2);
-    state.setMarker(music);
-
     // wizard
 
     wizard = new SampleWizard();
@@ -107,46 +64,9 @@
     throw new RuntimeException("no filter");
   }
 
-  public String createNode() {
-    DefaultMutableTreeNode marker = state.getMarker();
-    if (marker != null) {
-      marker.insert(new DefaultMutableTreeNode(new Node("New Node")), 0);
-    } else {
-      // todo: print a warning or use root?
-    }
-    return null;
-  }
-
-  public String deleteNode() {
-    DefaultMutableTreeNode marker = state.getMarker();
-    if (marker != null) {
-      marker.removeFromParent();
-    } else {
-      // todo: print a warning or use root?
-    }
-    return null;
-  }
-
   public String getCurrentTime() {
     return new SimpleDateFormat("hh:MM:ss").format(new Date());
   }
-
-  public DefaultMutableTreeNode getTree() {
-    return tree;
-  }
-
-  public void setTree(DefaultMutableTreeNode tree) {
-    this.tree = tree;
-  }
-
-  public TreeState getState() {
-    return state;
-  }
-
-  public void setState(TreeState state) {
-    this.state = state;
-  }
-
 
   public int getSliderValue() {
     return sliderValue;

Modified: myfaces/tobago/trunk/example/sandbox/src/main/webapp/navigation.jsp
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/sandbox/src/main/webapp/navigation.jsp?rev=647120&r1=647119&r2=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/sandbox/src/main/webapp/navigation.jsp (original)
+++ myfaces/tobago/trunk/example/sandbox/src/main/webapp/navigation.jsp Fri Apr 11 04:41:05 2008
@@ -28,16 +28,6 @@
 
     <tc:link link="separator.jsp" label="separator.jsp" target="View"/>
 
-    <tc:link link="tree-normal.jsp" label="tree-normal.jsp" target="View"/>
-
-    <tc:link link="tree-select.jsp" label="tree-select.jsp" target="View"/>
-
-    <tc:link link="tree-menu.jsp" label="tree-menu.jsp" target="View"/>
-
-    <tc:link link="tree-editor.jsp" label="tree-editor.jsp" target="View"/>
-
-    <tc:link link="tree-ajax.jsp" label="tree-ajax.jsp" target="View"/>
-
     <tc:link link="inputSlider.jsp" label="inputSlider.jsp" target="View"/>
 
     <tc:link link="wizard.jsp" label="wizard.jsp" target="View"/>

Modified: myfaces/tobago/trunk/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/src/site/apt/index.apt?rev=647120&r1=647119&r2=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/src/site/apt/index.apt (original)
+++ myfaces/tobago/trunk/src/site/apt/index.apt Fri Apr 11 04:41:05 2008
@@ -48,6 +48,9 @@
 News
 
   []
+    * <<11-04-08>> - The new tree was moved from the sandbox to core (only in 1.1.x which is still alpha).
+                     The old one will be available for a few days as tc:treeOld, for migration.
+
     * <<07-04-08>> - The 1.1.x trunk supports JSF 1.1 and JSF 1.2. The JSF 1.2 version can be created with the jsf-1.2 profile.
 
     * <<18-03-08>> - Added tobago-jsf-compat and tobago-tablib-extension modules to trunk. The tobago-jsf-compat module provides some util classes for JSF 1.1 and JSF 1.2 compatibility. The tobago-taglib-extension module contains the JSF 1.1 version of the Tobago Extensions Taglib(tx).

Copied: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeDataRenderer.java (from r646781, myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeDataRenderer.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeDataRenderer.java?p2=myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeDataRenderer.java&p1=myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeDataRenderer.java&r1=646781&r2=647120&rev=647120&view=diff
==============================================================================
    (empty)

Propchange: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeDataRenderer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeDataRenderer.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java (from r646781, myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java?p2=myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java&p1=myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java&r1=646781&r2=647120&rev=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java Fri Apr 11 04:41:05 2008
@@ -25,18 +25,14 @@
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LABEL;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_STYLE;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_TIP;
-import org.apache.myfaces.tobago.util.ComponentUtil;
 import org.apache.myfaces.tobago.component.AbstractUITree;
 import org.apache.myfaces.tobago.component.AbstractUITreeNode;
+import org.apache.myfaces.tobago.component.UITree;
+import org.apache.myfaces.tobago.component.UITreeNode;
 import org.apache.myfaces.tobago.context.ResourceManagerUtil;
 import org.apache.myfaces.tobago.model.MixedTreeModel;
 import org.apache.myfaces.tobago.renderkit.CommandRendererBase;
-import org.apache.myfaces.tobago.renderkit.util.RenderUtil;
-import org.apache.myfaces.tobago.renderkit.html.util.CommandRendererHelper;
-import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtil;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
 import static org.apache.myfaces.tobago.renderkit.html.HtmlConstants.A;
@@ -45,6 +41,10 @@
 import static org.apache.myfaces.tobago.renderkit.html.HtmlConstants.SPAN;
 import org.apache.myfaces.tobago.renderkit.html.HtmlStyleMap;
 import org.apache.myfaces.tobago.renderkit.html.StyleClasses;
+import org.apache.myfaces.tobago.renderkit.html.util.CommandRendererHelper;
+import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtil;
+import org.apache.myfaces.tobago.renderkit.util.RenderUtil;
+import org.apache.myfaces.tobago.util.ComponentUtil;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.component.NamingContainer;
@@ -103,8 +103,8 @@
   @Override
   public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {
 
-    AbstractUITreeNode node = (AbstractUITreeNode) component;
-    AbstractUITree root = node.findTree();
+    UITreeNode node = (UITreeNode) component;
+    UITree root = (UITree) node.findTree();
     MixedTreeModel mixedModel = root.getModel();
 
     mixedModel.onEncodeBegin();
@@ -205,7 +205,7 @@
       writer.writeStyleAttribute(contentStyle);
     }
 
-    String label = (String) node.getAttributes().get(ATTR_LABEL);
+    String label = node.getLabel();
     int level = modelNode.getLevel();
     StringBuilder builder = new StringBuilder();
     for (int i = 0; i < level; i++) {
@@ -354,7 +354,7 @@
 */
 
   private void encodeLabel(
-      TobagoResponseWriter writer, CommandRendererHelper helper, AbstractUITreeNode node, boolean marked, String treeId)
+      TobagoResponseWriter writer, CommandRendererHelper helper, UITreeNode node, boolean marked, String treeId)
       throws IOException {
 
     if (helper.isDisabled()) {
@@ -371,12 +371,12 @@
       classes.addClass("treeNode", "marker");
       writer.writeClassAttribute(classes);
     }
-    Object objTip = node.getAttributes().get(ATTR_TIP);
+    String objTip = node.getTip();
     if (objTip != null) {
 //XXX is needed?      tip = StringEscapeUtils.escapeJavaScript(tip);
       writer.writeAttribute(HtmlAttributes.TITLE, String.valueOf(objTip), true);
     }
-    String label = (String) node.getAttributes().get(ATTR_LABEL);
+    String label = node.getLabel();
     if (label == null) {
       LOG.warn("label == null");
       label = "label";
@@ -392,8 +392,8 @@
   @Override
   public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
 
-    AbstractUITreeNode node = (AbstractUITreeNode) component;
-    AbstractUITree root = node.findTree();
+    UITreeNode node = (UITreeNode) component;
+    UITree root = (UITree) node.findTree();
     MixedTreeModel mixedModel = root.getModel();
     boolean isFolder = mixedModel.isFolder();
 
@@ -409,7 +409,7 @@
     }
 
     if (LOG.isDebugEnabled()) {
-      String label = (String) node.getAttributes().get(ATTR_LABEL);
+      String label = node.getLabel();
       int level = mixedModel.getDepth();
       StringBuilder builder = new StringBuilder();
       for (int i = 0; i < level; i++) {

Propchange: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeRenderer.java (from r646781, myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeRenderer.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeRenderer.java?p2=myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeRenderer.java&p1=myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeRenderer.java&r1=646781&r2=647120&rev=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeRenderer.java Fri Apr 11 04:41:05 2008
@@ -22,16 +22,16 @@
  * $Id$
  */
 
-import org.apache.myfaces.tobago.util.ComponentUtil;
 import org.apache.myfaces.tobago.component.AbstractUITree;
 import org.apache.myfaces.tobago.context.ResourceManagerUtil;
 import org.apache.myfaces.tobago.renderkit.LayoutableRendererBase;
-import org.apache.myfaces.tobago.renderkit.util.RenderUtil;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtil;
-import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
+import org.apache.myfaces.tobago.renderkit.util.RenderUtil;
+import org.apache.myfaces.tobago.util.ComponentUtil;
 import org.apache.myfaces.tobago.util.FastStringWriter;
+import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.component.NamingContainer;
 import javax.faces.component.UIComponent;

Propchange: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeRenderer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeRenderer.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tree.js (from r646781, myfaces/tobago/trunk/sandbox/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tree.js)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tree.js?p2=myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tree.js&p1=myfaces/tobago/trunk/sandbox/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tree.js&r1=646781&r2=647120&rev=647120&view=diff
==============================================================================
--- myfaces/tobago/trunk/sandbox/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tree.js (original)
+++ myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tree.js Fri Apr 11 04:41:05 2008
@@ -72,3 +72,48 @@
   }
   Tobago.Tree.updateMarker(node.id, true);
 }
+
+function tobagoTreeNodeToggle(node, treeHiddenId, openFolderIcon, folderIcon, openMenuIcon, closeMenuIcon) {
+  LOG.debug("toggle(" + node + ", " + treeHiddenId + ", " + openFolderIcon + ", " + folderIcon + ", "
+      + openMenuIcon + ", " + closeMenuIcon + ")");
+  var content = document.getElementById(node.id + "-cont");
+  if (content) {
+    var expandedState = document.getElementById(node.id + '-expanded');
+    var icon = document.getElementById(node.id + '-icon');
+    var menuIcon = document.getElementById(node.id + '-menuIcon');
+    var junction = document.getElementById(node.id + '-junction');
+    var hidden = document.getElementById(treeHiddenId);
+    if (content.style.display == 'none') {
+      content.style.display = 'block';
+      if (icon) {
+        icon.src = openFolderIcon;
+      }
+      if (menuIcon) {
+        menuIcon.src = openMenuIcon;
+      }
+      if (junction) {
+        junction.src = junction.src.replace(/plus\./, "minus.");
+      }
+      hidden.value = hidden.value + nodeStateId(node) + ";";
+      expandedState.value = "true";
+    } else {
+      content.style.display = 'none';
+      if (icon) {
+        icon.src = folderIcon;
+      }
+      if (menuIcon) {
+        menuIcon.src = closeMenuIcon;
+      }
+      if (junction) {
+        junction.src = junction.src.replace(/minus\./, "plus.");
+      }
+      hidden.value = hidden.value.replace(";" + nodeStateId(node) + ";", ";");
+      expandedState.value = "false";
+    }
+  }
+}
+
+function nodeStateId(node) {
+  // this must do the same as nodeStateId() in TreeRenderer.java
+  return node.id.substring(node.id.lastIndexOf(':') + 1);
+}

Propchange: myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tree.js
------------------------------------------------------------------------------
    svn:eol-style = native