Author: nbelaevski
Date: 2007-09-09 18:41:54 -0400 (Sun, 09 Sep 2007)
New Revision: 2827
Added:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/SimpleTreeBean.java
trunk/samples/richfaces-demo/src/main/webapp/images/tree/
trunk/samples/richfaces-demo/src/main/webapp/images/tree/cd.gif
trunk/samples/richfaces-demo/src/main/webapp/images/tree/group.gif
trunk/samples/richfaces-demo/src/main/webapp/images/tree/music.gif
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/simple-tree-data.properties
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/simple.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/simple-tree.xhtml
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Album.java
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Artist.java
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Library.java
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Song.java
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/ajaxTree.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/clientTree.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/serverTree.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/usage.xhtml
Log:
Tree-demo:
- drag-drop capabilities added
- "Hello world" demo added
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Album.java
===================================================================
---
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Album.java 2007-09-09
22:40:42 UTC (rev 2826)
+++
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Album.java 2007-09-09
22:41:54 UTC (rev 2827)
@@ -6,7 +6,7 @@
import org.richfaces.model.TreeNode;
-public class Album implements TreeNode {
+public class Album implements IdentifierTreeNode {
/**
*
*/
@@ -23,9 +23,9 @@
public void addSong(Song song) {
addChild(Long.toString(song.getId()), song);
- song.setParent(this);
}
public void addChild(Object identifier, TreeNode child) {
+ child.setParent(this);
songs.put(identifier, child);
}
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Artist.java
===================================================================
---
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Artist.java 2007-09-09
22:40:42 UTC (rev 2826)
+++
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Artist.java 2007-09-09
22:41:54 UTC (rev 2827)
@@ -6,7 +6,7 @@
import org.richfaces.model.TreeNode;
-public class Artist implements TreeNode {
+public class Artist implements IdentifierTreeNode {
private long id;
private Map albums = new HashMap();
private String name;
@@ -24,10 +24,10 @@
public void addAlbum(Album album) {
addChild(Long.toString(album.getId()), album);
- album.setParent(this);
}
public void addChild(Object identifier, TreeNode child) {
+ child.setParent(this);
albums.put(identifier, child);
}
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Library.java
===================================================================
---
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Library.java 2007-09-09
22:40:42 UTC (rev 2826)
+++
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Library.java 2007-09-09
22:41:54 UTC (rev 2827)
@@ -3,11 +3,19 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
+import javax.faces.FacesException;
+
+import org.richfaces.component.UITree;
+import org.richfaces.component.UITreeNode;
+import org.richfaces.event.DropEvent;
+import org.richfaces.model.ListRowKey;
import org.richfaces.model.TreeNode;
public class Library implements TreeNode {
@@ -27,10 +35,10 @@
}
public void addArtist(Artist artist) {
addChild(Long.toString(artist.getId()), artist);
- artist.setParent(this);
}
public void addChild(Object identifier, TreeNode child) {
+ child.setParent(this);
getArtists().put(identifier, child);
}
@@ -143,4 +151,37 @@
public void setState2(Object state2) {
this.state2 = state2;
}
+
+ public void processDrop(DropEvent event) {
+ ListRowKey srcKey = (ListRowKey) event.getDragValue();
+ ListRowKey destKey = (ListRowKey) event.getDropValue();
+
+ UITree tree = ((UITreeNode) event.getComponent()).getUITree();
+
+ TreeNode destNode = tree.getTreeNode(destKey);
+ TreeNode srcNode = tree.getTreeNode(srcKey);
+
+ try {
+ tree.queueNodeCollapse(srcKey);
+ tree.queueNodeExpand(destKey);
+ } catch (IOException e) {
+ throw new FacesException(e.getMessage(), e);
+ }
+
+ String srcNodeKey = String.valueOf(((IdentifierTreeNode) srcNode).getId());
+ srcNode.getParent().removeChild(srcNodeKey);
+ destNode.addChild(srcNodeKey, srcNode);
+
+ List list = new ArrayList();
+ //this is to get row key segments for the parent node of source node
+ //candidate for inclusion to UITree API
+ for (Iterator iterator = srcKey.iterator(); iterator.hasNext();) {
+ Object object = (Object) iterator.next();
+ if (iterator.hasNext()) {
+ list.add(object);
+ }
+ }
+ tree.addRequestKey(new ListRowKey(list));
+ tree.addRequestKey(destKey);
+ }
}
Added:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/SimpleTreeBean.java
===================================================================
---
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/SimpleTreeBean.java
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/SimpleTreeBean.java 2007-09-09
22:41:54 UTC (rev 2827)
@@ -0,0 +1,105 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.demo.tree;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+
+import org.richfaces.model.TreeNode;
+import org.richfaces.model.TreeNodeImpl;
+
+public class SimpleTreeBean {
+
+ private TreeNode rootNode = null;
+
+ private UIComponent tree;
+
+ private static final String DATA_PATH =
"/richfaces/tree/examples/simple-tree-data.properties";
+
+ private void addNodes(String path, TreeNode node, Properties properties) {
+ boolean end = false;
+ int counter = 1;
+
+ while (!end) {
+ String key = path != null ? path + '.' + counter : String.valueOf(counter);
+
+ String value = properties.getProperty(key);
+ if (value != null) {
+ TreeNodeImpl nodeImpl = new TreeNodeImpl();
+ nodeImpl.setData(value);
+ node.addChild(new Integer(counter), nodeImpl);
+
+ addNodes(key, nodeImpl, properties);
+
+ counter++;
+ } else {
+ end = true;
+ }
+ }
+ }
+
+ private void loadTree() {
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ ExternalContext externalContext = facesContext.getExternalContext();
+ InputStream dataStream = externalContext.getResourceAsStream(DATA_PATH);
+ try {
+ Properties properties = new Properties();
+ properties.load(dataStream);
+
+ rootNode = new TreeNodeImpl();
+ addNodes(null, rootNode, properties);
+
+ } catch (IOException e) {
+ throw new FacesException(e.getMessage(), e);
+ } finally {
+ if (dataStream != null) {
+ try {
+ dataStream.close();
+ } catch (IOException e) {
+ externalContext.log(e.getMessage(), e);
+ }
+ }
+ }
+ }
+
+ public TreeNode getTreeNode() {
+ if (rootNode == null) {
+ loadTree();
+ }
+
+ return rootNode;
+ }
+
+ public UIComponent getTree() {
+ return tree;
+ }
+
+ public void setTree(UIComponent tree) {
+ this.tree = tree;
+ }
+}
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Song.java
===================================================================
---
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Song.java 2007-09-09
22:40:42 UTC (rev 2826)
+++
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Song.java 2007-09-09
22:41:54 UTC (rev 2827)
@@ -5,7 +5,7 @@
import org.richfaces.model.TreeNode;
-public class Song implements TreeNode {
+public class Song implements IdentifierTreeNode {
/**
*
*/
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2007-09-09
22:40:42 UTC (rev 2826)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2007-09-09
22:41:54 UTC (rev 2827)
@@ -158,13 +158,28 @@
<property-class>java.lang.String</property-class>
<value>Paint 2D</value>
</managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>simpleTreeBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.tree.SimpleTreeBean</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>libraryAjaxTree</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.tree.Library</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>libraryClientTree</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.tree.Library</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>libraryServerTree</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.tree.Library</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
<managed-bean>
- <managed-bean-name>library</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.tree.Library</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
- <managed-bean>
<managed-bean-name>dndBean</managed-bean-name>
<managed-bean-class>org.richfaces.demo.dnd.DndBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
Added: trunk/samples/richfaces-demo/src/main/webapp/images/tree/cd.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/tree/cd.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/richfaces-demo/src/main/webapp/images/tree/group.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/tree/group.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/richfaces-demo/src/main/webapp/images/tree/music.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/tree/music.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/ajaxTree.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/ajaxTree.xhtml 2007-09-09
22:40:42 UTC (rev 2826)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/ajaxTree.xhtml 2007-09-09
22:41:54 UTC (rev 2827)
@@ -7,18 +7,19 @@
<p>This tree uses "ajax" switch type, note that for collapse/expand
operations it will be Ajax request to the server. You may see short delay in this
case.</p>
<h:form>
- <rich:tree style="width:300px" value="#{library.data}"
var="item" nodeFace="#{item.type}">
- <rich:treeNode type="library">
- <h:outputText value="#{item.type}" />
- </rich:treeNode>
- <rich:treeNode type="artist">
+ <rich:tree dragIndicator=":treeDragIndicator"
dropListener="#{libraryAjaxTree.processDrop}" style="width:300px"
value="#{libraryAjaxTree.data}" var="item"
nodeFace="#{item.type}">
+ <rich:treeNode type="artist" acceptedTypes="album"
iconLeaf="/images/tree/group.gif" icon="/images/tree/group.gif">
<h:outputText value="#{item.name}" />
</rich:treeNode>
- <rich:treeNode type="album">
+ <rich:treeNode type="album" dragType="album"
acceptedTypes="song" iconLeaf="/images/tree/cd.gif"
icon="/images/tree/cd.gif">
<h:outputText value="#{item.title}" />
+
+ <rich:dndParam name="label" type="drag" value="Album:
#{item.title}" />
</rich:treeNode>
- <rich:treeNode type="song">
+ <rich:treeNode type="song" dragType="song"
iconLeaf="/images/tree/music.gif" icon="/images/tree/music.gif">
<h:outputText value="#{item.title}" />
+
+ <rich:dndParam name="label" type="drag" value="Song:
#{item.title}" />
</rich:treeNode>
</rich:tree>
</h:form>
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/clientTree.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/clientTree.xhtml 2007-09-09
22:40:42 UTC (rev 2826)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/clientTree.xhtml 2007-09-09
22:41:54 UTC (rev 2827)
@@ -6,21 +6,23 @@
xmlns:rich="http://richfaces.org/rich">
<p>This is exactly the same tree, but now it uses "client" switch type.
Note, that all nodes actually rendered up-front and expand/collapse now do not requre
server call</p>
- <rich:tree switchType="client" style="width:300px"
value="#{library.data}" var="item"
nodeFace="#{item.type}">
- <rich:treeNode type="library">
- <h:outputText value="#{item.type}" />
- </rich:treeNode>
- <rich:treeNode type="artist">
- <h:outputText value="#{item.name}" />
- </rich:treeNode>
- <rich:treeNode type="album">
- <h:outputText value="#{item.title}" />
- </rich:treeNode>
- <rich:treeNode type="song">
- <h:outputText value="#{item.title}" />
- </rich:treeNode>
- </rich:tree>
+ <h:form>
+ <rich:tree switchType="client" style="width:300px"
dragIndicator=":treeDragIndicator"
dropListener="#{libraryClientTree.processDrop}"
value="#{libraryClientTree.data}" var="item"
nodeFace="#{item.type}">
+ <rich:treeNode type="artist" acceptedTypes="album"
iconLeaf="/images/tree/group.gif" icon="/images/tree/group.gif">
+ <h:outputText value="#{item.name}" />
+ </rich:treeNode>
+ <rich:treeNode type="album" dragType="album"
acceptedTypes="song" iconLeaf="/images/tree/cd.gif"
icon="/images/tree/cd.gif">
+ <h:outputText value="#{item.title}" />
+ <rich:dndParam name="label" type="drag" value="Album:
#{item.title}" />
+ </rich:treeNode>
+ <rich:treeNode type="song" dragType="song"
iconLeaf="/images/tree/music.gif" icon="/images/tree/music.gif">
+ <h:outputText value="#{item.title}" />
+ <rich:dndParam name="label" type="drag" value="Song:
#{item.title}" />
+ </rich:treeNode>
+ </rich:tree>
+ </h:form>
+
</ui:composition>
\ No newline at end of file
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/serverTree.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/serverTree.xhtml 2007-09-09
22:40:42 UTC (rev 2826)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/serverTree.xhtml 2007-09-09
22:41:54 UTC (rev 2827)
@@ -7,18 +7,19 @@
<p>This is again same tree, but now it uses "server" switch type. Full
page content will be reloaded at every click.</p>
<h:form>
- <rich:tree switchType="server" style="width:300px"
value="#{library.data}" var="item"
nodeFace="#{item.type}">
- <rich:treeNode type="library">
- <h:outputText value="#{item.type}" />
- </rich:treeNode>
- <rich:treeNode type="artist">
+ <rich:tree switchType="server" style="width:300px"
dragIndicator=":treeDragIndicator"
dropListener="#{libraryServerTree.processDrop}"
value="#{libraryServerTree.data}" var="item"
nodeFace="#{item.type}">
+ <rich:treeNode type="artist" acceptedTypes="album"
iconLeaf="/images/tree/group.gif" icon="/images/tree/group.gif">
<h:outputText value="#{item.name}" />
</rich:treeNode>
- <rich:treeNode type="album">
+ <rich:treeNode type="album" dragType="album"
acceptedTypes="song" iconLeaf="/images/tree/cd.gif"
icon="/images/tree/cd.gif">
<h:outputText value="#{item.title}" />
+
+ <rich:dndParam name="label" type="drag" value="Album:
#{item.title}" />
</rich:treeNode>
- <rich:treeNode type="song">
+ <rich:treeNode type="song" dragType="song"
iconLeaf="/images/tree/music.gif" icon="/images/tree/music.gif">
<h:outputText value="#{item.title}" />
+
+ <rich:dndParam name="label" type="drag" value="Song:
#{item.title}" />
</rich:treeNode>
</rich:tree>
</h:form>
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/simple-tree-data.properties
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/simple-tree-data.properties
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/simple-tree-data.properties 2007-09-09
22:41:54 UTC (rev 2827)
@@ -0,0 +1,32 @@
+1=Daniel Defo
+1.1=Robinson Crusoe
+1.1.1=Start In Life
+2=Edgar Allan Poe
+2.1=Plays
+2.1.1=Politian
+2.2=Short stories
+2.2.1=The Assignation
+2.2.2=Berenice
+2.2.3=The Black Cat
+2.2.4=The Cask of Amontillado
+2.2.5=A Descent into the Maelstrom
+2.3=Poetry
+2.3.1=Alone
+2.3.2=An Enigma
+2.3.3=Annabel Lee
+2.3.4=Bridal Ballad
+3=Henry Wadsworth Longfellow
+3.1=The Song of Hiawatha
+3.1.1=Introduction
+3.1.2=I. The Peace-Pipe
+3.1.3=II. The Four Winds
+3.1.4=III. Hiawatha's Childhood
+3.1.5=IV. Hiawatha and Mudjekeewis
+3.1.6=V. Hiawatha's Fasting
+3.1.7=VI. Hiawatha's Friends
+3.2=Poetry
+3.2.1=A Psalm Of Life
+3.2.2=Birds Of Passage
+3.2.3=Hiawatha's Childhood
+3.2.4=Hymn To The Night
+
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/simple.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/simple.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/examples/simple.xhtml 2007-09-09
22:41:54 UTC (rev 2827)
@@ -0,0 +1,17 @@
+<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+ <h:form>
+ <rich:tree style="width:300px" toggleOnClick="true"
switchType="client" binding="#{simpleTreeBean.tree}"
value="#{simpleTreeBean.treeNode}" var="item"
nodeFace="#{simpleTreeBean.tree.leaf ? 'link' : null}">
+ <rich:treeNode type="link">
+ <a4j:commandLink value="#{item}" />
+ </rich:treeNode>
+
+ </rich:tree>
+ </h:form>
+
+</ui:composition>
\ No newline at end of file
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/simple-tree.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/simple-tree.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/simple-tree.xhtml 2007-09-09
22:41:54 UTC (rev 2827)
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+ <ui:composition template="/templates/component-sample.xhtml">
+ <ui:define name="sample">
+ <div class="sample-container" >
+ <ui:include src="/richfaces/tree/examples/simple.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/tree/examples/simple.xhtml"/>
+ </ui:include>
+ </div>
+ </ui:define>
+ </ui:composition>
+</html>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/usage.xhtml 2007-09-09
22:40:42 UTC (rev 2826)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/usage.xhtml 2007-09-09
22:41:54 UTC (rev 2827)
@@ -7,6 +7,8 @@
xmlns:rich="http://richfaces.org/rich">
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
+ <rich:dragIndicator id="treeDragIndicator" />
+
<p>
Tree is a component that renders a tree control on the page.<br/>
The most important tree features are:
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree.xhtml 2007-09-09 22:40:42
UTC (rev 2826)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree.xhtml 2007-09-09 22:41:54
UTC (rev 2827)
@@ -9,10 +9,13 @@
<ui:define name="title">RichFaces - Open Source Rich JSF Components -
Tree</ui:define>
<ui:define name="current">panel</ui:define>
<ui:define name="body">
- <rich:tabPanel switchType="server" styleClass="top_tab"
contentClass="content_tab" headerClass="header_tabs_class"
inactiveTabClass="inactive_tab" activeTabClass="active_tab">
+ <rich:tabPanel switchType="server"
selectedTab="#{componentNavigator.activeTab}" styleClass="top_tab"
contentClass="content_tab" headerClass="header_tabs_class"
inactiveTabClass="inactive_tab" activeTabClass="active_tab">
<rich:tab label="Usage">
<ui:include src="/richfaces/tree/usage.xhtml"/>
</rich:tab>
+ <rich:tab label=""Hello world!" tree">
+ <ui:include src="/richfaces/tree/simple-tree.xhtml"/>
+ </rich:tab>
<ui:include src="/templates/include/tagInfo.xhtml">
<ui:param name="path" value="rich/tree"/>
</ui:include>