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 2010/08/12 17:56:36 UTC

svn commit: r984844 - in /myfaces/tobago/trunk: tobago-core/src/main/java/org/apache/myfaces/tobago/component/ tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ tobago-example/tobago-example-demo/src/main/webapp/overview/ t...

Author: lofwyr
Date: Thu Aug 12 15:56:35 2010
New Revision: 984844

URL: http://svn.apache.org/viewvc?rev=984844&view=rev
Log:
TOBAGO-377: new tree
 - apply the last changes on "showIcons" into the examples

Modified:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeTagDeclaration.java
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/overview/tree.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-ajax.jsp
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-normal-2.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-normal-3.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-normal.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-select.jsp
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-state.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/navigation.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/tree/tree-select.xhtml

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java?rev=984844&r1=984843&r2=984844&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java Thu Aug 12 15:56:35 2010
@@ -152,7 +152,6 @@ public final class Attributes {
   public static final String SELECTABLE = "selectable";
   public static final String SHOW_DIRECT_LINKS = "showDirectLinks";
   public static final String SHOW_HEADER = "showHeader";
-  public static final String SHOW_ICONS = "showIcons";
   public static final String SHOW_JUNCTIONS = "showJunctions";
   public static final String SHOW_NAVIGATION_BAR = "showNavigationBar";
   public static final String SHOW_PAGE_RANGE = "showPageRange";

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeTagDeclaration.java?rev=984844&r1=984843&r2=984844&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeTagDeclaration.java Thu Aug 12 15:56:35 2010
@@ -71,10 +71,6 @@ public interface TreeTagDeclaration
 
   @TagAttribute
   @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
-  void setShowIcons(String showIcons);
-
-  @TagAttribute
-  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
   void setShowRoot(String showRoot);
   
   /**

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/overview/tree.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/overview/tree.xhtml?rev=984844&r1=984843&r2=984844&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/overview/tree.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/overview/tree.xhtml Thu Aug 12 15:56:35 2010
@@ -40,13 +40,12 @@
           </f:facet>
 
           <tc:tree id="tree"
-                   showIcons="#{demo.showIcons}"
                    showRootJunction="#{demo.showRootJunction}"
                    showRoot="#{demo.showRoot}">
             <tc:treeData value="#{demo.tree}" var="node" id="data">
               <tc:treeNode id="template" expanded="true">
                 <tc:treeIndent showJunctions="#{demo.showJunctions}"/>
-                <tc:treeIcon value="image/feather.png"/>
+                <tc:treeIcon value="image/feather.png" rendered="#{demo.showIcons}"/>
                 <tc:treeLabel value="#{node.userObject.name}"/>
               </tc:treeNode>
               <!--

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-ajax.jsp
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-ajax.jsp?rev=984844&r1=984843&r2=984844&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-ajax.jsp (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-ajax.jsp Thu Aug 12 15:56:35 2010
@@ -35,7 +35,6 @@
       </f:facet>
 
       <tc:tree state="#{controller.state}" id="tree"
-                showIcons="true"
                 showRootJunction="true"
                 showRoot="true"
           >

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-normal-2.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-normal-2.xhtml?rev=984844&r1=984843&r2=984844&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-normal-2.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-normal-2.xhtml Thu Aug 12 15:56:35 2010
@@ -31,7 +31,7 @@
     </f:facet>
     <tc:out value="A tree with a mixed model of static and dynamic nodes. It uses the tree event mechanism."/>
 
-    <tc:tree id="tree" showRoot="true" showIcons="true" showRootJunction="true">
+    <tc:tree id="tree" showRoot="true" showRootJunction="true">
       <tc:treeData value="#{treeController.tree}" var="node" id="data">
         <tc:treeNode id="template"
                      expanded="#{node.userObject.expanded}"

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-normal-3.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-normal-3.xhtml?rev=984844&r1=984843&r2=984844&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-normal-3.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-normal-3.xhtml Thu Aug 12 15:56:35 2010
@@ -32,7 +32,6 @@
     <tc:out value="Simple hand made tree"/>
 
     <tc:tree id="tree"
-             showIcons="true"
              showRootJunction="true"
              showRoot="true">
       <tc:treeNode id="root" expanded="true" >

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-normal.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-normal.xhtml?rev=984844&r1=984843&r2=984844&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-normal.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-normal.xhtml Thu Aug 12 15:56:35 2010
@@ -32,7 +32,6 @@
     <tc:out value="A tree with a mixed model of static and dynamic nodes. It uses the tree event mechanism."/>
 
     <tc:tree id="tree"
-             showIcons="true"
              showRootJunction="true"
              showRoot="true">
       <tc:treeNode id="root" expanded="true">

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-select.jsp
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-select.jsp?rev=984844&r1=984843&r2=984844&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-select.jsp (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-select.jsp Thu Aug 12 15:56:35 2010
@@ -28,7 +28,6 @@
     </f:facet>
 
     <tc:tree id="sel"
-              showIcons="true"
               showRootJunction="true"
               showRoot="true"
               selectable="single">

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-state.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-state.xhtml?rev=984844&r1=984843&r2=984844&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-state.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/tree/tree-state.xhtml Thu Aug 12 15:56:35 2010
@@ -31,7 +31,6 @@
     </f:facet>
     <tc:out value="A tree with a mixed model of static and dynamic nodes. It uses the tree state mechanism." />
     <tc:tree id="tree"
-             showIcons="true"
              showRootJunction="true"
              showRoot="true"
              state="#{demo.treeState}">

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/navigation.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/navigation.xhtml?rev=984844&r1=984843&r2=984844&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/navigation.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/navigation.xhtml Thu Aug 12 15:56:35 2010
@@ -46,9 +46,15 @@
         <tc:button action="#{clientConfig.submit}" label="OK"/>
       </tc:panel>
 
-      <tc:tree showIcons="true">
+      <tc:tree>
         <tc:treeData value="#{browser.tree}" var="node">
-          <tc:treeNode link="#{node.resource}" label="#{node.label}" target="page:content"/>
+          <tc:treeNode expanded="#{node.level lt 2}">
+            <tc:treeIndent/>
+            <tc:treeIcon/>
+            <tc:treeCommand link="#{node.resource}" label="#{node.label}" target="page:content"
+                            rendered="#{node.childCount == 0}"/>
+            <tc:treeLabel value="#{node.label}" rendered="#{node.childCount > 0}"/>
+          </tc:treeNode>
         </tc:treeData>
       </tc:tree>
     </tc:panel>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/tree/tree-select.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/tree/tree-select.xhtml?rev=984844&r1=984843&r2=984844&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/tree/tree-select.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/tree/tree-select.xhtml Thu Aug 12 15:56:35 2010
@@ -26,7 +26,7 @@
   <tc:page>
     <tc:gridLayoutConstraint width="600px" height="300px"/>
 
-    <tc:tree id="tree" selectable="single" showIcons="true" showRoot="true" showRootJunction="true">
+    <tc:tree id="tree" selectable="single" showRoot="true" showRootJunction="true">
       <tc:treeData value="#{tree.tree}" var="node" id="data">
         <tc:treeNode label="#{node.userObject.name}"
                      id="template"