Author: jpapouse
Date: 2011-11-25 09:53:19 -0500 (Fri, 25 Nov 2011)
New Revision: 23005
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/componentToInclude.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/outOfTemplateAfterToInclude.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/simpleRichFacesTreeDataModel.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/simpleRichFacesTreeNode.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/simpleSwingTreeNode.xhtml
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/AbstractTestTree.java
Removed:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/simple.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/tree/RichFacesTreeNode.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/tree/SwingTreeNode.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/rf-10994.xhtml
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreePhases.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSelection.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSimple.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeToggling.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeNode/TestTreeNodeSimple.java
Log:
RFPL-981: added more model types (rich:tree)
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeBean.java 2011-11-24
23:53:52 UTC (rev 23004)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichTreeBean.java 2011-11-25
14:53:19 UTC (rev 23005)
@@ -38,6 +38,9 @@
import javax.faces.bean.ViewScoped;
import javax.faces.event.ComponentSystemEvent;
+import org.richfaces.model.SwingTreeNodeDataModelImpl;
+import org.richfaces.model.TreeDataModel;
+
import org.richfaces.component.UITree;
import org.richfaces.event.DropEvent;
import org.richfaces.tests.metamer.Attributes;
@@ -67,7 +70,8 @@
private static Logger logger;
private Attributes attributes;
- private List<RichFacesTreeNode<Labeled>> richfacesTreeNodeRoot;
+ private RichFacesTreeNode<Labeled> richfacesTreeNodeRoot;
+ private TreeDataModel<?> richFacesTreeDataModelRoot;
private List<SwingTreeNode<Labeled>> swingTreeNodeRoot;
private Collection<? extends Serializable> selection;
@@ -116,12 +120,6 @@
for (CompactDiscXmlDescriptor descriptor : Model.unmarshallCompactDiscs()) {
createCompactDisc(descriptor);
}
- // build trees
- List<SwingTreeNode<Labeled>> swingTreeNodelist =
(List<SwingTreeNode<Labeled>>) (List<?>)
buldTree(SwingTreeNode.createFactory());
- swingTreeNodeRoot = swingTreeNodelist;
- List<RichFacesTreeNode<Labeled>> richfacesTreeNodeList =
(List<RichFacesTreeNode<Labeled>>) (List<?>)
buldTree(RichFacesTreeNode.createFactory());
- richfacesTreeNodeRoot = richfacesTreeNodeList;
-
}
public Attributes getAttributes() {
@@ -137,11 +135,32 @@
RichBean.logToPage("* dropListener");
}
- public List<RichFacesTreeNode<Labeled>> getRichFacesTreeNodeRoot() {
+ public TreeDataModel<?> getRichFacesTreeDataModelRoot() {
+ if (richFacesTreeDataModelRoot == null) {
+ richFacesTreeDataModelRoot = new SwingTreeNodeDataModelImpl();
+ richFacesTreeDataModelRoot.setWrappedData(getSwingTreeNodeRoot());
+ }
+ return richFacesTreeDataModelRoot;
+ }
+
+ public RichFacesTreeNode<Labeled> getRichFacesTreeNodeRoot() {
+ if (richfacesTreeNodeRoot == null) {
+ List<RichFacesTreeNode<Labeled>> richfacesTreeNodeList =
(List<RichFacesTreeNode<Labeled>>) (List<?>)
buldTree(RichFacesTreeNode.createFactory());
+ richfacesTreeNodeRoot = new RichFacesTreeNode<Labeled>();
+ int i=0;
+ for (RichFacesTreeNode node : richfacesTreeNodeList) {
+ richfacesTreeNodeRoot.addChild(i, node);
+ i++;
+ }
+ }
return richfacesTreeNodeRoot;
}
public List<SwingTreeNode<Labeled>> getSwingTreeNodeRoot() {
+ if (swingTreeNodeRoot == null) {
+ List<SwingTreeNode<Labeled>> swingTreeNodelist =
(List<SwingTreeNode<Labeled>>) (List<?>)
buldTree(SwingTreeNode.createFactory());
+ swingTreeNodeRoot = swingTreeNodelist;
+ }
return swingTreeNodeRoot;
}
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/tree/RichFacesTreeNode.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/tree/RichFacesTreeNode.java 2011-11-24
23:53:52 UTC (rev 23004)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/tree/RichFacesTreeNode.java 2011-11-25
14:53:19 UTC (rev 23005)
@@ -71,7 +71,8 @@
@Override
public void insertChild(int index, Object key, TreeNode child) {
- addChild(key, child);
+ children.put(key, child);
+ keys.add(index, key);
}
@Override
@@ -110,6 +111,7 @@
@Override
public RichFacesTreeNode<Labeled>
createTreeNode(TreeNodeWithContent<Labeled> parent, Labeled content) {
RichFacesTreeNode<Labeled> treeNode = new
RichFacesTreeNode<Labeled>();
+ treeNode.setContent(content);
if (parent != null) {
RichFacesTreeNode<Labeled> castedParent =
(RichFacesTreeNode<Labeled>) parent;
castedParent.addChild(treeNode.getContent(), treeNode);
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/tree/SwingTreeNode.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/tree/SwingTreeNode.java 2011-11-24
23:53:52 UTC (rev 23004)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/model/tree/SwingTreeNode.java 2011-11-25
14:53:19 UTC (rev 23005)
@@ -1,3 +1,24 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ *******************************************************************************/
package org.richfaces.tests.metamer.model.tree;
import java.io.Serializable;
@@ -11,6 +32,9 @@
import com.google.common.collect.Iterators;
+/**
+ * @author <a href="mailto:jpapouse@redhat.com">Jan Papousek</a>
+ */
public class SwingTreeNode<Content extends Labeled> implements TreeNode,
TreeNodeWithContent<Content>, Serializable {
private static final long serialVersionUID = 1L;
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/componentToInclude.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/componentToInclude.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/componentToInclude.xhtml 2011-11-25
14:53:19 UTC (rev 23005)
@@ -0,0 +1,237 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
+
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software 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 software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+ <h3><b>rich:tree</b></h3>
+
+ <p>
+ <rich:tree id="richTree"
+ nodeType="#{node.type}"
+ var="node"
+ value="#{treeRoot}"
+ selection="#{richTreeBean.selection}"
+
selectionChangeListener="#{richTreeListenerBean.processSelectionChange}"
+
toggleListener="#{richTreeListenerBean.processToggle}"
+
+
data="#{richTreeBean.attributes['data'].value}"
+
dir="#{richTreeBean.attributes['dir'].value}"
+
execute="#{richTreeBean.attributes['execute'].value}"
+
handleClass="#{richTreeBean.attributes['handleClass'].value}"
+
iconClass="#{richTreeBean.attributes['iconClass'].value}"
+
iconCollapsed="#{richTreeBean.attributes['iconCollapsed'].value}"
+
iconExpanded="#{richTreeBean.attributes['iconExpanded'].value}"
+
iconLeaf="#{richTreeBean.attributes['iconLeaf'].value}"
+
immediate="#{richTreeBean.attributes['immediate'].value}"
+
keepSaved="#{richTreeBean.attributes['keepSaved'].value}"
+
labelClass="#{richTreeBean.attributes['labelClass'].value}"
+
lang="#{richTreeBean.attributes['lang'].value}"
+
limitRender="#{richTreeBean.attributes['limitRender'].value}"
+
nodeClass="#{richTreeBean.attributes['nodeClass'].value}"
+
onbeforedomupdate="#{richTreeBean.attributes['onbeforedomupdate'].value}"
+
onbeforenodetoggle="#{richTreeBean.attributes['onbeforenodetoggle'].value}"
+
onbeforeselectionchange="#{richTreeBean.attributes['onbeforeselectionchange'].value}"
+
onbegin="#{richTreeBean.attributes['onbegin'].value}"
+
onclick="#{richTreeBean.attributes['onclick'].value}"
+
oncomplete="#{richTreeBean.attributes['oncomplete'].value}"
+
ondblclick="#{richTreeBean.attributes['ondblclick'].value}"
+
onkeydown="#{richTreeBean.attributes['onkeydown'].value}"
+
onkeypress="#{richTreeBean.attributes['onkeypress'].value}"
+
onkeyup="#{richTreeBean.attributes['onkeyup'].value}"
+
onmousedown="#{richTreeBean.attributes['onmousedown'].value}"
+
onmousemove="#{richTreeBean.attributes['onmousemove'].value}"
+
onmouseout="#{richTreeBean.attributes['onmouseout'].value}"
+
onmouseover="#{richTreeBean.attributes['onmouseover'].value}"
+
onmouseup="#{richTreeBean.attributes['onmouseup'].value}"
+
onnodetoggle="#{richTreeBean.attributes['onnodetoggle'].value}"
+
onselectionchange="#{richTreeBean.attributes['onselectionchange'].value}"
+
render="#{richTreeBean.attributes['render'].value}"
+
rendered="#{richTreeBean.attributes['rendered'].value}"
+
selectionType="#{richTreeBean.attributes['selectionType'].value}"
+
status="#{richTreeBean.attributes['status'].value}"
+
style="#{richTreeBean.attributes['style'].value}"
+
styleClass="#{richTreeBean.attributes['styleClass'].value}"
+
title="#{richTreeBean.attributes['title'].value}"
+
toggleNodeEvent="#{richTreeBean.attributes['toggleNodeEvent'].value}"
+
toggleType="#{richTreeBean.attributes['toggleType'].value}"
+ >
+
+ <rich:treeNode type="country"
+ expanded="#{richTreeBean.expanded[node]}"
+
+
dir="#{richTreeNodeBean.attributes[0]['dir'].value}"
+
handleClass="#{richTreeNodeBean.attributes[0]['handleClass'].value}"
+
iconClass="#{richTreeNodeBean.attributes[0]['iconClass'].value}"
+
iconCollapsed="#{richTreeNodeBean.attributes[0]['iconCollapsed'].value}"
+
iconExpanded="#{richTreeNodeBean.attributes[0]['iconExpanded'].value}"
+
iconLeaf="#{richTreeNodeBean.attributes[0]['iconLeaf'].value}"
+
immediate="#{richTreeNodeBean.attributes[0]['immediate'].value}"
+
labelClass="#{richTreeNodeBean.attributes[0]['labelClass'].value}"
+
lang="#{richTreeNodeBean.attributes[0]['lang'].value}"
+
onbeforetoggle="#{richTreeNodeBean.attributes[0]['onbeforetoggle'].value}"
+
onclick="#{richTreeNodeBean.attributes[0]['onclick'].value}"
+
ondblclick="#{richTreeNodeBean.attributes[0]['ondblclick'].value}"
+
onkeydown="#{richTreeNodeBean.attributes[0]['onkeydown'].value}"
+
onkeypress="#{richTreeNodeBean.attributes[0]['onkeypress'].value}"
+
onkeyup="#{richTreeNodeBean.attributes[0]['onkeyup'].value}"
+
onmousedown="#{richTreeNodeBean.attributes[0]['onmousedown'].value}"
+
onmousemove="#{richTreeNodeBean.attributes[0]['onmousemove'].value}"
+
onmouseout="#{richTreeNodeBean.attributes[0]['onmouseout'].value}"
+
onmouseover="#{richTreeNodeBean.attributes[0]['onmouseover'].value}"
+
onmouseup="#{richTreeNodeBean.attributes[0]['onmouseup'].value}"
+
ontoggle="#{richTreeNodeBean.attributes[0]['ontoggle'].value}"
+
rendered="#{richTreeNodeBean.attributes[0]['rendered'].value}"
+
style="#{richTreeNodeBean.attributes[0]['style'].value}"
+
styleClass="#{richTreeNodeBean.attributes[0]['styleClass'].value}"
+
title="#{richTreeNodeBean.attributes[0]['title'].value}"
+ >
+ <f:facet name="handleLoading">
+ <h:graphicImage
value="/resources/images/loading.gif"
rendered="#{richTreeBean.testLoadingFacet}" />
+ </f:facet>
+ #{node.content.label}
+ </rich:treeNode>
+
+ <rich:treeNode type="company"
+ expanded="#{richTreeBean.expanded[node]}"
+
+
dir="#{richTreeNodeBean.attributes[1]['dir'].value}"
+
handleClass="#{richTreeNodeBean.attributes[1]['handleClass'].value}"
+
iconClass="#{richTreeNodeBean.attributes[1]['iconClass'].value}"
+
iconCollapsed="#{richTreeNodeBean.attributes[1]['iconCollapsed'].value}"
+
iconExpanded="#{richTreeNodeBean.attributes[1]['iconExpanded'].value}"
+
iconLeaf="#{richTreeNodeBean.attributes[1]['iconLeaf'].value}"
+
immediate="#{richTreeNodeBean.attributes[1]['immediate'].value}"
+
labelClass="#{richTreeNodeBean.attributes[1]['labelClass'].value}"
+
lang="#{richTreeNodeBean.attributes[1]['lang'].value}"
+
onbeforetoggle="#{richTreeNodeBean.attributes[1]['onbeforetoggle'].value}"
+
onclick="#{richTreeNodeBean.attributes[1]['onclick'].value}"
+
ondblclick="#{richTreeNodeBean.attributes[1]['ondblclick'].value}"
+
onkeydown="#{richTreeNodeBean.attributes[1]['onkeydown'].value}"
+
onkeypress="#{richTreeNodeBean.attributes[1]['onkeypress'].value}"
+
onkeyup="#{richTreeNodeBean.attributes[1]['onkeyup'].value}"
+
onmousedown="#{richTreeNodeBean.attributes[1]['onmousedown'].value}"
+
onmousemove="#{richTreeNodeBean.attributes[1]['onmousemove'].value}"
+
onmouseout="#{richTreeNodeBean.attributes[1]['onmouseout'].value}"
+
onmouseover="#{richTreeNodeBean.attributes[1]['onmouseover'].value}"
+
onmouseup="#{richTreeNodeBean.attributes[0]['onmouseup'].value}"
+
ontoggle="#{richTreeNodeBean.attributes[1]['ontoggle'].value}"
+
rendered="#{richTreeNodeBean.attributes[1]['rendered'].value}"
+
style="#{richTreeNodeBean.attributes[1]['style'].value}"
+
styleClass="#{richTreeNodeBean.attributes[1]['styleClass'].value}"
+
title="#{richTreeNodeBean.attributes[1]['title'].value}"
+ >
+ <f:facet name="handleLoading">
+ <h:graphicImage
value="/resources/images/loading.gif"
rendered="#{richTreeBean.testLoadingFacet}" />
+ </f:facet>
+
+ #{node.content.label}
+ </rich:treeNode>
+
+ <rich:treeNode type="cd"
+ expanded="#{richTreeBean.expanded[node]}"
+
+
dir="#{richTreeNodeBean.attributes[2]['dir'].value}"
+
handleClass="#{richTreeNodeBean.attributes[2]['handleClass'].value}"
+
iconClass="#{richTreeNodeBean.attributes[2]['iconClass'].value}"
+
iconCollapsed="#{richTreeNodeBean.attributes[2]['iconCollapsed'].value}"
+
iconExpanded="#{richTreeNodeBean.attributes[2]['iconExpanded'].value}"
+
iconLeaf="#{richTreeNodeBean.attributes[2]['iconLeaf'].value}"
+
immediate="#{richTreeNodeBean.attributes[2]['immediate'].value}"
+
labelClass="#{richTreeNodeBean.attributes[2]['labelClass'].value}"
+
lang="#{richTreeNodeBean.attributes[2]['lang'].value}"
+
onbeforetoggle="#{richTreeNodeBean.attributes[2]['onbeforetoggle'].value}"
+
onclick="#{richTreeNodeBean.attributes[2]['onclick'].value}"
+
ondblclick="#{richTreeNodeBean.attributes[2]['ondblclick'].value}"
+
onkeydown="#{richTreeNodeBean.attributes[2]['onkeydown'].value}"
+
onkeypress="#{richTreeNodeBean.attributes[2]['onkeypress'].value}"
+
onkeyup="#{richTreeNodeBean.attributes[2]['onkeyup'].value}"
+
onmousedown="#{richTreeNodeBean.attributes[2]['onmousedown'].value}"
+
onmousemove="#{richTreeNodeBean.attributes[2]['onmousemove'].value}"
+
onmouseout="#{richTreeNodeBean.attributes[2]['onmouseout'].value}"
+
onmouseover="#{richTreeNodeBean.attributes[2]['onmouseover'].value}"
+
onmouseup="#{richTreeNodeBean.attributes[0]['onmouseup'].value}"
+
ontoggle="#{richTreeNodeBean.attributes[2]['ontoggle'].value}"
+
rendered="#{richTreeNodeBean.attributes[2]['rendered'].value}"
+
style="#{richTreeNodeBean.attributes[2]['style'].value}"
+
styleClass="#{richTreeNodeBean.attributes[2]['styleClass'].value}"
+
title="#{richTreeNodeBean.attributes[2]['title'].value}"
+ >
+ #{node.content.label}
+ </rich:treeNode>
+ </rich:tree>
+ </p>
+
+ <h3><b>rich:tree</b> - with default tree nodes</h3>
+ <div>(uses toString on TreeNode as content)</div>
+
+ <p>
+
+
+ <rich:tree id="richTreeDefaultNodes"
+ var="node"
+ value="#{treeRoot}"
+
+
dir="#{richTreeBean.attributes['dir'].value}"
+
lang="#{richTreeBean.attributes['lang'].value}"
+
onbeforedomupdate="#{richTreeBean.attributes['onbeforedomupdate'].value}"
+
onbeforenodetoggle="#{richTreeBean.attributes['onbeforenodetoggle'].value}"
+
onbeforeselectionchange="#{richTreeBean.attributes['onbeforeselectionchange'].value}"
+
onbegin="#{richTreeBean.attributes['onbegin'].value}"
+
onclick="#{richTreeBean.attributes['onclick'].value}"
+
oncomplete="#{richTreeBean.attributes['oncomplete'].value}"
+
ondblclick="#{richTreeBean.attributes['ondblclick'].value}"
+
onkeydown="#{richTreeBean.attributes['onkeydown'].value}"
+
onkeypress="#{richTreeBean.attributes['onkeypress'].value}"
+
onkeyup="#{richTreeBean.attributes['onkeyup'].value}"
+
onmousedown="#{richTreeBean.attributes['onmousedown'].value}"
+
onmousemove="#{richTreeBean.attributes['onmousemove'].value}"
+
onmouseup="#{richTreeBean.attributes['onmouseup'].value}"
+
onmouseout="#{richTreeBean.attributes['onmouseout'].value}"
+
onmouseover="#{richTreeBean.attributes['onmouseover'].value}"
+
onnodetoggle="#{richTreeBean.attributes['onnodetoggle'].value}"
+
onselectionchange="#{richTreeBean.attributes['onselectionchange'].value}"
+
rendered="#{richTreeBean.attributes['rendered'].value}"
+ selection="#{richTreeBean.selection}"
+
selectionType="#{richTreeBean.attributes['selectionType'].value}"
+
style="#{richTreeBean.attributes['style'].value}"
+
styleClass="#{richTreeBean.attributes['styleClass'].value}"
+
title="#{richTreeBean.attributes['title'].value}"
+
toggleType="#{richTreeBean.attributes['toggleType'].value}"
+
iconLeaf="#{richTreeBean.attributes['iconLeaf'].value}"
+
iconExpanded="#{richTreeBean.attributes['iconExpanded'].value}"
+
iconCollapsed="#{richTreeBean.attributes['iconCollapsed'].value}"
+
handleClass="#{richTreeBean.attributes['handleClass'].value}"
+
iconClass="#{richTreeBean.attributes['iconClass'].value}"
+
labelClass="#{richTreeBean.attributes['labelClass'].value}"
+
nodeClass="#{richTreeBean.attributes['nodeClass'].value}"
+
selectionChangeListener="#{richTreeListenerBean.processSelectionChange}"
+
toggleListener="#{richTreeListenerBean.processToggle}"
+
render="#{richTreeBean.attributes['render'].value}"
+
execute="#{richTreeBean.attributes['execute'].value}"
+
toggleNodeEvent="#{richTreeBean.attributes['toggleNodeEvent'].value}"
+ >
+ </rich:tree>
+ </p>
+</html>
\ No newline at end of file
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/list.xhtml 2011-11-24
23:53:52 UTC (rev 23004)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/list.xhtml 2011-11-25
14:53:19 UTC (rev 23005)
@@ -31,10 +31,18 @@
<ui:define name="links">
- <metamer:testPageLink id="simple" outcome="simple"
value="Simple">
- The simple sample of <b>rich:tree</b> usage including all its
attributes.
+ <metamer:testPageLink id="simpleSwingTreeNode"
outcome="simpleSwingTreeNode" value="Simple - Swing Tree Node">
+ The simple sample of <b>rich:tree</b> with
<b>javax.swing.tree.TreeNode</b>, usage including all its attributes.
</metamer:testPageLink>
+ <metamer:testPageLink id="simpleRichFacesTreeNode"
outcome="simpleRichFacesTreeNode" value="Simple - RichFaces Tree
Node">
+ The simple sample of <b>rich:tree</b> with
<b>org.richfaces.model.TreeNode</b>, usage including all its attributes.
+ </metamer:testPageLink>
+
+ <metamer:testPageLink id="simpleRichFacesTreeDataModel"
outcome="simpleRichFacesTreeDataModel" value="Simple - RichFaces Tree Data
Model">
+ The simple sample of <b>rich:tree</b> with
<b>org.richfaces.model.TreeDataModel</b>, usage including all its attributes.
+ </metamer:testPageLink>
+
<metamer:testPageLink id="treeAdaptors"
outcome="treeAdaptors" value="Tree Adaptors">
The <b>rich:tree</b> with declarative model using
<b>rich:treeModelRecursiveAdaptor</b> and
<b>rich:treeModelAdaptor</b>.
</metamer:testPageLink>
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/outOfTemplateAfterToInclude.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/outOfTemplateAfterToInclude.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/outOfTemplateAfterToInclude.xhtml 2011-11-25
14:53:19 UTC (rev 23005)
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
+
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software 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 software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+ <a4j:commandButton id="expandAll" value="Expand All"
action="#{richTreeBean.expandAll}" render="#{nestedComponentId}"
/>
+ <a4j:commandButton id="collapseAll" value="Collapse
All" action="#{richTreeBean.collapseAll}"
render="#{nestedComponentId}" />
+
+ <a4j:outputPanel id="panel" ajaxRendered="true">
+ <h:panelGrid columns="2">
+
+ <h:outputLabel value="Test Loading Facet:" />
+ <h:selectBooleanCheckbox id="loadingFacet"
value="#{richTreeBean.testLoadingFacet}">
+ <a4j:ajax render="#{nestedComponentId}" />
+ </h:selectBooleanCheckbox>
+
+ <h:outputLabel value="Delayed Render (1sec):" />
+ <h:selectBooleanCheckbox
value="#{richTreeBean.delayedRender}">
+ <a4j:ajax />
+ </h:selectBooleanCheckbox>
+
+ <h:outputLabel value="Selection:" />
+ <h:outputText id="selection"
value="#{richTreeBean.selection}" />
+
+ <h:outputLabel value="Selection Change Event:"
rendered="#{not empty richTreeListenerBean.treeSelectionChangeEvent}" />
+ <h:panelGrid columns="2" rendered="#{not empty
richTreeListenerBean.treeSelectionChangeEvent}">
+ <h:outputLabel value="Client ID:" />
+ <h:outputText id="selectionEventClientId"
value="#{richTreeListenerBean.treeSelectionChangeEvent.component.id}" />
+
+ <h:outputLabel value="New Selection:" />
+ <h:outputText id="selectionEventNewSelection"
value="#{richTreeListenerBean.treeSelectionChangeEvent.newSelection}" />
+
+ <h:outputLabel value="Old Selection:" />
+ <h:outputText id="selectionEventOldSelection"
value="#{richTreeListenerBean.treeSelectionChangeEvent.oldSelection}" />
+ </h:panelGrid>
+
+ <h:outputLabel value="Tree Toggle Event:"
rendered="#{not empty richTreeListenerBean.treeToggleEvent}" />
+ <h:panelGrid columns="2" rendered="#{not empty
richTreeListenerBean.treeToggleEvent}">
+ <h:outputLabel value="Client ID:" />
+ <h:outputText id="toggleEventClientId"
value="#{richTreeListenerBean.treeToggleEvent.component.id}" />
+
+ <h:outputLabel value="Collapsed:" />
+ <h:outputText id="toggleEventCollapsed"
value="#{richTreeListenerBean.treeToggleEvent.collapsed}" />
+
+ <h:outputLabel value="Expanded:" />
+ <h:outputText id="toggleEventExpanded"
value="#{richTreeListenerBean.treeToggleEvent.expanded}" />
+ </h:panelGrid>
+ </h:panelGrid>
+ </a4j:outputPanel>
+
+ <fieldset>
+ <legend>rich:tree</legend>
+ <metamer:attributes value="#{richTreeBean.attributes}"
id="attributes" />
+ </fieldset>
+ <fieldset>
+ <legend>rich:treeNode type="country"</legend>
+ <metamer:attributes
value="#{richTreeNodeBean.attributes[0]}" id="treeNode1Attributes"
/>
+ </fieldset>
+ <fieldset>
+ <legend>rich:treeNode type="company"</legend>
+ <metamer:attributes
value="#{richTreeNodeBean.attributes[1]}" id="treeNode2Attributes"
/>
+ </fieldset>
+ <fieldset>
+ <legend>rich:treeNode type="cd"</legend>
+ <metamer:attributes
value="#{richTreeNodeBean.attributes[2]}" id="treeNode3Attributes"
/>
+ </fieldset>
+
+</html>
\ No newline at end of file
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/rf-10994.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/rf-10994.xhtml 2011-11-24
23:53:52 UTC (rev 23004)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/rf-10994.xhtml 2011-11-25
14:53:19 UTC (rev 23005)
@@ -58,7 +58,7 @@
<rich:dragIndicator id="indicator" />
<p>
- <rich:tree value="#{richTreeBean.swingTreeNodeRoot}"
nodeType="#{node.type}" var="node">
+ <rich:tree value="#{richTreeBean.richFacesTreeNodeRoot}"
nodeType="#{node.type}" var="node">
<rich:treeNode type="country" title="Country node type"
expanded="#{richTreeBean.expanded[node]}" >
<a4j:outputPanel layout="block">
Deleted:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/simple.xhtml 2011-11-24
23:53:52 UTC (rev 23004)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/simple.xhtml 2011-11-25
14:53:19 UTC (rev 23005)
@@ -1,320 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
-
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">
-
- <!--
-JBoss, Home of Professional Open Source
-Copyright 2010-2011, Red Hat, Inc. and individual contributors
-by the @authors tag. See the copyright.txt in the distribution for a
-full listing of individual contributors.
-
-This is free software; you can redistribute it and/or modify it
-under the terms of the GNU Lesser General Public License as
-published by the Free Software Foundation; either version 2.1 of
-the License, or (at your option) any later version.
-
-This software 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 software; if not, write to the Free
-Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- -->
-
- <ui:composition template="/templates/template.xhtml">
- <ui:param name="componentId" value="richTree" />
-
- <ui:define name="view">
- <f:metadata>
- <f:viewParam name="templates"
value="#{templateBean.templates}">
- <f:converter converterId="templatesListConverter" />
- </f:viewParam>
- <f:event type="preRenderView"
listener="#{richTreeBean.preRenderView}" />
- </f:metadata>
- </ui:define>
-
- <ui:define name="component">
-
- <h3><b>rich:tree</b></h3>
-
- <p>
- <rich:tree id="richTree"
- nodeType="#{node.type}"
- var="node"
- value="#{richTreeBean.swingTreeNodeRoot}"
- selection="#{richTreeBean.selection}"
-
selectionChangeListener="#{richTreeListenerBean.processSelectionChange}"
-
toggleListener="#{richTreeListenerBean.processToggle}"
-
-
data="#{richTreeBean.attributes['data'].value}"
-
dir="#{richTreeBean.attributes['dir'].value}"
-
execute="#{richTreeBean.attributes['execute'].value}"
-
handleClass="#{richTreeBean.attributes['handleClass'].value}"
-
iconClass="#{richTreeBean.attributes['iconClass'].value}"
-
iconCollapsed="#{richTreeBean.attributes['iconCollapsed'].value}"
-
iconExpanded="#{richTreeBean.attributes['iconExpanded'].value}"
-
iconLeaf="#{richTreeBean.attributes['iconLeaf'].value}"
-
immediate="#{richTreeBean.attributes['immediate'].value}"
-
keepSaved="#{richTreeBean.attributes['keepSaved'].value}"
-
labelClass="#{richTreeBean.attributes['labelClass'].value}"
-
lang="#{richTreeBean.attributes['lang'].value}"
-
limitRender="#{richTreeBean.attributes['limitRender'].value}"
-
nodeClass="#{richTreeBean.attributes['nodeClass'].value}"
-
onbeforedomupdate="#{richTreeBean.attributes['onbeforedomupdate'].value}"
-
onbeforenodetoggle="#{richTreeBean.attributes['onbeforenodetoggle'].value}"
-
onbeforeselectionchange="#{richTreeBean.attributes['onbeforeselectionchange'].value}"
-
onbegin="#{richTreeBean.attributes['onbegin'].value}"
-
onclick="#{richTreeBean.attributes['onclick'].value}"
-
oncomplete="#{richTreeBean.attributes['oncomplete'].value}"
-
ondblclick="#{richTreeBean.attributes['ondblclick'].value}"
-
onkeydown="#{richTreeBean.attributes['onkeydown'].value}"
-
onkeypress="#{richTreeBean.attributes['onkeypress'].value}"
-
onkeyup="#{richTreeBean.attributes['onkeyup'].value}"
-
onmousedown="#{richTreeBean.attributes['onmousedown'].value}"
-
onmousemove="#{richTreeBean.attributes['onmousemove'].value}"
-
onmouseout="#{richTreeBean.attributes['onmouseout'].value}"
-
onmouseover="#{richTreeBean.attributes['onmouseover'].value}"
-
onmouseup="#{richTreeBean.attributes['onmouseup'].value}"
-
onnodetoggle="#{richTreeBean.attributes['onnodetoggle'].value}"
-
onselectionchange="#{richTreeBean.attributes['onselectionchange'].value}"
-
render="#{richTreeBean.attributes['render'].value}"
-
rendered="#{richTreeBean.attributes['rendered'].value}"
-
selectionType="#{richTreeBean.attributes['selectionType'].value}"
-
status="#{richTreeBean.attributes['status'].value}"
-
style="#{richTreeBean.attributes['style'].value}"
-
styleClass="#{richTreeBean.attributes['styleClass'].value}"
-
title="#{richTreeBean.attributes['title'].value}"
-
toggleNodeEvent="#{richTreeBean.attributes['toggleNodeEvent'].value}"
-
toggleType="#{richTreeBean.attributes['toggleType'].value}"
- >
-
- <rich:treeNode type="country"
- expanded="#{richTreeBean.expanded[node]}"
-
-
dir="#{richTreeNodeBean.attributes[0]['dir'].value}"
-
handleClass="#{richTreeNodeBean.attributes[0]['handleClass'].value}"
-
iconClass="#{richTreeNodeBean.attributes[0]['iconClass'].value}"
-
iconCollapsed="#{richTreeNodeBean.attributes[0]['iconCollapsed'].value}"
-
iconExpanded="#{richTreeNodeBean.attributes[0]['iconExpanded'].value}"
-
iconLeaf="#{richTreeNodeBean.attributes[0]['iconLeaf'].value}"
-
immediate="#{richTreeNodeBean.attributes[0]['immediate'].value}"
-
labelClass="#{richTreeNodeBean.attributes[0]['labelClass'].value}"
-
lang="#{richTreeNodeBean.attributes[0]['lang'].value}"
-
onbeforetoggle="#{richTreeNodeBean.attributes[0]['onbeforetoggle'].value}"
-
onclick="#{richTreeNodeBean.attributes[0]['onclick'].value}"
-
ondblclick="#{richTreeNodeBean.attributes[0]['ondblclick'].value}"
-
onkeydown="#{richTreeNodeBean.attributes[0]['onkeydown'].value}"
-
onkeypress="#{richTreeNodeBean.attributes[0]['onkeypress'].value}"
-
onkeyup="#{richTreeNodeBean.attributes[0]['onkeyup'].value}"
-
onmousedown="#{richTreeNodeBean.attributes[0]['onmousedown'].value}"
-
onmousemove="#{richTreeNodeBean.attributes[0]['onmousemove'].value}"
-
onmouseout="#{richTreeNodeBean.attributes[0]['onmouseout'].value}"
-
onmouseover="#{richTreeNodeBean.attributes[0]['onmouseover'].value}"
-
onmouseup="#{richTreeNodeBean.attributes[0]['onmouseup'].value}"
-
ontoggle="#{richTreeNodeBean.attributes[0]['ontoggle'].value}"
-
rendered="#{richTreeNodeBean.attributes[0]['rendered'].value}"
-
style="#{richTreeNodeBean.attributes[0]['style'].value}"
-
styleClass="#{richTreeNodeBean.attributes[0]['styleClass'].value}"
-
title="#{richTreeNodeBean.attributes[0]['title'].value}"
- >
- <f:facet name="handleLoading">
- <h:graphicImage
value="/resources/images/loading.gif"
rendered="#{richTreeBean.testLoadingFacet}" />
- </f:facet>
- #{node.content.label}
- </rich:treeNode>
-
- <rich:treeNode type="company"
- expanded="#{richTreeBean.expanded[node]}"
-
-
dir="#{richTreeNodeBean.attributes[1]['dir'].value}"
-
handleClass="#{richTreeNodeBean.attributes[1]['handleClass'].value}"
-
iconClass="#{richTreeNodeBean.attributes[1]['iconClass'].value}"
-
iconCollapsed="#{richTreeNodeBean.attributes[1]['iconCollapsed'].value}"
-
iconExpanded="#{richTreeNodeBean.attributes[1]['iconExpanded'].value}"
-
iconLeaf="#{richTreeNodeBean.attributes[1]['iconLeaf'].value}"
-
immediate="#{richTreeNodeBean.attributes[1]['immediate'].value}"
-
labelClass="#{richTreeNodeBean.attributes[1]['labelClass'].value}"
-
lang="#{richTreeNodeBean.attributes[1]['lang'].value}"
-
onbeforetoggle="#{richTreeNodeBean.attributes[1]['onbeforetoggle'].value}"
-
onclick="#{richTreeNodeBean.attributes[1]['onclick'].value}"
-
ondblclick="#{richTreeNodeBean.attributes[1]['ondblclick'].value}"
-
onkeydown="#{richTreeNodeBean.attributes[1]['onkeydown'].value}"
-
onkeypress="#{richTreeNodeBean.attributes[1]['onkeypress'].value}"
-
onkeyup="#{richTreeNodeBean.attributes[1]['onkeyup'].value}"
-
onmousedown="#{richTreeNodeBean.attributes[1]['onmousedown'].value}"
-
onmousemove="#{richTreeNodeBean.attributes[1]['onmousemove'].value}"
-
onmouseout="#{richTreeNodeBean.attributes[1]['onmouseout'].value}"
-
onmouseover="#{richTreeNodeBean.attributes[1]['onmouseover'].value}"
-
onmouseup="#{richTreeNodeBean.attributes[0]['onmouseup'].value}"
-
ontoggle="#{richTreeNodeBean.attributes[1]['ontoggle'].value}"
-
rendered="#{richTreeNodeBean.attributes[1]['rendered'].value}"
-
style="#{richTreeNodeBean.attributes[1]['style'].value}"
-
styleClass="#{richTreeNodeBean.attributes[1]['styleClass'].value}"
-
title="#{richTreeNodeBean.attributes[1]['title'].value}"
- >
- <f:facet name="handleLoading">
- <h:graphicImage
value="/resources/images/loading.gif"
rendered="#{richTreeBean.testLoadingFacet}" />
- </f:facet>
-
- #{node.content.label}
- </rich:treeNode>
-
- <rich:treeNode type="cd"
- expanded="#{richTreeBean.expanded[node]}"
-
-
dir="#{richTreeNodeBean.attributes[2]['dir'].value}"
-
handleClass="#{richTreeNodeBean.attributes[2]['handleClass'].value}"
-
iconClass="#{richTreeNodeBean.attributes[2]['iconClass'].value}"
-
iconCollapsed="#{richTreeNodeBean.attributes[2]['iconCollapsed'].value}"
-
iconExpanded="#{richTreeNodeBean.attributes[2]['iconExpanded'].value}"
-
iconLeaf="#{richTreeNodeBean.attributes[2]['iconLeaf'].value}"
-
immediate="#{richTreeNodeBean.attributes[2]['immediate'].value}"
-
labelClass="#{richTreeNodeBean.attributes[2]['labelClass'].value}"
-
lang="#{richTreeNodeBean.attributes[2]['lang'].value}"
-
onbeforetoggle="#{richTreeNodeBean.attributes[2]['onbeforetoggle'].value}"
-
onclick="#{richTreeNodeBean.attributes[2]['onclick'].value}"
-
ondblclick="#{richTreeNodeBean.attributes[2]['ondblclick'].value}"
-
onkeydown="#{richTreeNodeBean.attributes[2]['onkeydown'].value}"
-
onkeypress="#{richTreeNodeBean.attributes[2]['onkeypress'].value}"
-
onkeyup="#{richTreeNodeBean.attributes[2]['onkeyup'].value}"
-
onmousedown="#{richTreeNodeBean.attributes[2]['onmousedown'].value}"
-
onmousemove="#{richTreeNodeBean.attributes[2]['onmousemove'].value}"
-
onmouseout="#{richTreeNodeBean.attributes[2]['onmouseout'].value}"
-
onmouseover="#{richTreeNodeBean.attributes[2]['onmouseover'].value}"
-
onmouseup="#{richTreeNodeBean.attributes[0]['onmouseup'].value}"
-
ontoggle="#{richTreeNodeBean.attributes[2]['ontoggle'].value}"
-
rendered="#{richTreeNodeBean.attributes[2]['rendered'].value}"
-
style="#{richTreeNodeBean.attributes[2]['style'].value}"
-
styleClass="#{richTreeNodeBean.attributes[2]['styleClass'].value}"
-
title="#{richTreeNodeBean.attributes[2]['title'].value}"
- >
- #{node.content.label}
- </rich:treeNode>
- </rich:tree>
- </p>
-
- <h3><b>rich:tree</b> - with default tree nodes</h3>
- <div>(uses toString on TreeNode as content)</div>
-
- <p>
-
-
- <rich:tree id="richTreeDefaultNodes"
- var="node"
- value="#{richTreeBean.swingTreeNodeRoot}"
-
-
dir="#{richTreeBean.attributes['dir'].value}"
-
lang="#{richTreeBean.attributes['lang'].value}"
-
onbeforedomupdate="#{richTreeBean.attributes['onbeforedomupdate'].value}"
-
onbeforenodetoggle="#{richTreeBean.attributes['onbeforenodetoggle'].value}"
-
onbeforeselectionchange="#{richTreeBean.attributes['onbeforeselectionchange'].value}"
-
onbegin="#{richTreeBean.attributes['onbegin'].value}"
-
onclick="#{richTreeBean.attributes['onclick'].value}"
-
oncomplete="#{richTreeBean.attributes['oncomplete'].value}"
-
ondblclick="#{richTreeBean.attributes['ondblclick'].value}"
-
onkeydown="#{richTreeBean.attributes['onkeydown'].value}"
-
onkeypress="#{richTreeBean.attributes['onkeypress'].value}"
-
onkeyup="#{richTreeBean.attributes['onkeyup'].value}"
-
onmousedown="#{richTreeBean.attributes['onmousedown'].value}"
-
onmousemove="#{richTreeBean.attributes['onmousemove'].value}"
-
onmouseup="#{richTreeBean.attributes['onmouseup'].value}"
-
onmouseout="#{richTreeBean.attributes['onmouseout'].value}"
-
onmouseover="#{richTreeBean.attributes['onmouseover'].value}"
-
onnodetoggle="#{richTreeBean.attributes['onnodetoggle'].value}"
-
onselectionchange="#{richTreeBean.attributes['onselectionchange'].value}"
-
rendered="#{richTreeBean.attributes['rendered'].value}"
- selection="#{richTreeBean.selection}"
-
selectionType="#{richTreeBean.attributes['selectionType'].value}"
-
style="#{richTreeBean.attributes['style'].value}"
-
styleClass="#{richTreeBean.attributes['styleClass'].value}"
-
title="#{richTreeBean.attributes['title'].value}"
-
toggleType="#{richTreeBean.attributes['toggleType'].value}"
-
iconLeaf="#{richTreeBean.attributes['iconLeaf'].value}"
-
iconExpanded="#{richTreeBean.attributes['iconExpanded'].value}"
-
iconCollapsed="#{richTreeBean.attributes['iconCollapsed'].value}"
-
handleClass="#{richTreeBean.attributes['handleClass'].value}"
-
iconClass="#{richTreeBean.attributes['iconClass'].value}"
-
labelClass="#{richTreeBean.attributes['labelClass'].value}"
-
nodeClass="#{richTreeBean.attributes['nodeClass'].value}"
-
selectionChangeListener="#{richTreeListenerBean.processSelectionChange}"
-
toggleListener="#{richTreeListenerBean.processToggle}"
-
render="#{richTreeBean.attributes['render'].value}"
-
execute="#{richTreeBean.attributes['execute'].value}"
-
toggleNodeEvent="#{richTreeBean.attributes['toggleNodeEvent'].value}"
- >
- </rich:tree>
- </p>
- </ui:define>
-
- <ui:define name="outOfTemplateAfter">
-
- <a4j:commandButton id="expandAll" value="Expand All"
action="#{richTreeBean.expandAll}" render="#{nestedComponentId}"
/>
- <a4j:commandButton id="collapseAll" value="Collapse
All" action="#{richTreeBean.collapseAll}"
render="#{nestedComponentId}" />
-
- <a4j:outputPanel id="panel" ajaxRendered="true">
- <h:panelGrid columns="2">
-
- <h:outputLabel value="Test Loading Facet:" />
- <h:selectBooleanCheckbox id="loadingFacet"
value="#{richTreeBean.testLoadingFacet}">
- <a4j:ajax render="#{nestedComponentId}" />
- </h:selectBooleanCheckbox>
-
- <h:outputLabel value="Delayed Render (1sec):" />
- <h:selectBooleanCheckbox
value="#{richTreeBean.delayedRender}">
- <a4j:ajax />
- </h:selectBooleanCheckbox>
-
- <h:outputLabel value="Selection:" />
- <h:outputText id="selection"
value="#{richTreeBean.selection}" />
-
- <h:outputLabel value="Selection Change Event:"
rendered="#{not empty richTreeListenerBean.treeSelectionChangeEvent}" />
- <h:panelGrid columns="2" rendered="#{not empty
richTreeListenerBean.treeSelectionChangeEvent}">
- <h:outputLabel value="Client ID:" />
- <h:outputText id="selectionEventClientId"
value="#{richTreeListenerBean.treeSelectionChangeEvent.component.id}" />
-
- <h:outputLabel value="New Selection:" />
- <h:outputText id="selectionEventNewSelection"
value="#{richTreeListenerBean.treeSelectionChangeEvent.newSelection}" />
-
- <h:outputLabel value="Old Selection:" />
- <h:outputText id="selectionEventOldSelection"
value="#{richTreeListenerBean.treeSelectionChangeEvent.oldSelection}" />
- </h:panelGrid>
-
- <h:outputLabel value="Tree Toggle Event:"
rendered="#{not empty richTreeListenerBean.treeToggleEvent}" />
- <h:panelGrid columns="2" rendered="#{not empty
richTreeListenerBean.treeToggleEvent}">
- <h:outputLabel value="Client ID:" />
- <h:outputText id="toggleEventClientId"
value="#{richTreeListenerBean.treeToggleEvent.component.id}" />
-
- <h:outputLabel value="Collapsed:" />
- <h:outputText id="toggleEventCollapsed"
value="#{richTreeListenerBean.treeToggleEvent.collapsed}" />
-
- <h:outputLabel value="Expanded:" />
- <h:outputText id="toggleEventExpanded"
value="#{richTreeListenerBean.treeToggleEvent.expanded}" />
- </h:panelGrid>
- </h:panelGrid>
- </a4j:outputPanel>
-
- <fieldset>
- <legend>rich:tree</legend>
- <metamer:attributes value="#{richTreeBean.attributes}"
id="attributes" />
- </fieldset>
- <fieldset>
- <legend>rich:treeNode type="country"</legend>
- <metamer:attributes
value="#{richTreeNodeBean.attributes[0]}" id="treeNode1Attributes"
/>
- </fieldset>
- <fieldset>
- <legend>rich:treeNode type="company"</legend>
- <metamer:attributes
value="#{richTreeNodeBean.attributes[1]}" id="treeNode2Attributes"
/>
- </fieldset>
- <fieldset>
- <legend>rich:treeNode type="cd"</legend>
- <metamer:attributes
value="#{richTreeNodeBean.attributes[2]}" id="treeNode3Attributes"
/>
- </fieldset>
- </ui:define>
-
- </ui:composition>
-</html>
\ No newline at end of file
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/simpleRichFacesTreeDataModel.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/simpleRichFacesTreeDataModel.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/simpleRichFacesTreeDataModel.xhtml 2011-11-25
14:53:19 UTC (rev 23005)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
+
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software 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 software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+ <ui:param name="componentId" value="richTree" />
+
+ <ui:define name="view">
+ <f:metadata>
+ <f:viewParam name="templates"
value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ <f:event type="preRenderView"
listener="#{richTreeBean.preRenderView}" />
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="component">
+ <ui:include
src="/components/richTree/componentToInclude.xhtml">
+ <ui:param name="treeRoot"
value="#{richTreeBean.richFacesTreeDataModelRoot}" />
+ </ui:include>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <ui:include
src="/components/richTree/outOfTemplateAfterToInclude.xhtml" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/simpleRichFacesTreeNode.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/simpleRichFacesTreeNode.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/simpleRichFacesTreeNode.xhtml 2011-11-25
14:53:19 UTC (rev 23005)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
+
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software 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 software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+ <ui:param name="componentId" value="richTree" />
+
+ <ui:define name="view">
+ <f:metadata>
+ <f:viewParam name="templates"
value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ <f:event type="preRenderView"
listener="#{richTreeBean.preRenderView}" />
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="component">
+ <ui:include
src="/components/richTree/componentToInclude.xhtml">
+ <ui:param name="treeRoot"
value="#{richTreeBean.richFacesTreeNodeRoot}" />
+ </ui:include>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <ui:include
src="/components/richTree/outOfTemplateAfterToInclude.xhtml" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Copied:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/simpleSwingTreeNode.xhtml
(from rev 23004,
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/simple.xhtml)
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/simpleSwingTreeNode.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/simpleSwingTreeNode.xhtml 2011-11-25
14:53:19 UTC (rev 23005)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
+
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software 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 software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+ <ui:param name="componentId" value="richTree" />
+
+ <ui:define name="view">
+ <f:metadata>
+ <f:viewParam name="templates"
value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ <f:event type="preRenderView"
listener="#{richTreeBean.preRenderView}" />
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="component">
+ <ui:include
src="/components/richTree/componentToInclude.xhtml">
+ <ui:param name="treeRoot"
value="#{richTreeBean.swingTreeNodeRoot}" />
+ </ui:include>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <ui:include
src="/components/richTree/outOfTemplateAfterToInclude.xhtml" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Added:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/AbstractTestTree.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/AbstractTestTree.java
(rev 0)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/AbstractTestTree.java 2011-11-25
14:53:19 UTC (rev 23005)
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.ftest.richTree;
+
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+
+import java.net.URL;
+
+import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+import org.richfaces.tests.metamer.ftest.annotations.Inject;
+import org.richfaces.tests.metamer.ftest.annotations.Use;
+
+/**
+ * @author <a href="mailto:jpapouse@redhat.com">Jan Papousek</a>
+ */
+public class AbstractTestTree extends AbstractMetamerTest {
+
+ @Inject
+ @Use(strings = {"simpleSwingTreeNode", "simpleRichFacesTreeNode",
"simpleRichFacesTreeDataModel"})
+ private String sample;
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/richTree/" + sample +
".xhtml");
+ }
+
+}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreePhases.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreePhases.java 2011-11-24
23:53:52 UTC (rev 23004)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreePhases.java 2011-11-25
14:53:19 UTC (rev 23005)
@@ -21,14 +21,10 @@
*******************************************************************************/
package org.richfaces.tests.metamer.ftest.richTree;
-import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import static org.richfaces.tests.metamer.ftest.attributes.AttributeList.treeAttributes;
-import java.net.URL;
-
import javax.faces.event.PhaseId;
-import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
import org.richfaces.tests.metamer.ftest.annotations.Use;
import org.testng.annotations.BeforeMethod;
@@ -38,18 +34,13 @@
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
* @version $Revision$
*/
-public class TestTreePhases extends AbstractMetamerTest {
+public class TestTreePhases extends AbstractTestTree {
@Inject
@Use(booleans = { true, false })
Boolean immediate;
private TreeModel tree = new TreeModel(pjq("div.rf-tr[id$=richTree]"));
- @Override
- public URL getTestUrl() {
- return buildUrl(contextPath,
"faces/components/richTree/simple.xhtml");
- }
-
@BeforeMethod
public void initialize() {
treeAttributes.set(TreeAttributes.immediate, immediate);
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSelection.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSelection.java 2011-11-24
23:53:52 UTC (rev 23004)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSelection.java 2011-11-25
14:53:19 UTC (rev 23005)
@@ -23,13 +23,11 @@
import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
-import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+import static org.richfaces.tests.metamer.ftest.attributes.AttributeList.treeAttributes;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
-import static org.richfaces.tests.metamer.ftest.attributes.AttributeList.treeAttributes;
-import java.net.URL;
import java.util.Arrays;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -38,7 +36,6 @@
import org.jboss.test.selenium.locator.JQueryLocator;
import org.jboss.test.selenium.utils.text.SimplifiedFormat;
import org.richfaces.component.SwitchType;
-import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
import org.richfaces.tests.metamer.ftest.annotations.Use;
import org.testng.annotations.BeforeMethod;
@@ -49,7 +46,7 @@
* @version $Revision$
*/
@Use(field = "selectionPaths", value = "")
-public class TestTreeSelection extends AbstractMetamerTest {
+public class TestTreeSelection extends AbstractTestTree {
protected Integer[][] selectionPaths = new Integer[][] {{4, 3}, {1, 4}, {2, 1, 1},
{2}, {2, 1},
{3, 5 }, {4, 10, 3 } };
@@ -69,12 +66,6 @@
JQueryLocator newSelection = jq("span[id$=selectionEventNewSelection]");
JQueryLocator oldSelection = jq("span[id$=selectionEventOldSelection]");
-
- @Override
- public URL getTestUrl() {
- return buildUrl(contextPath,
"faces/components/richTree/simple.xhtml");
- }
-
@BeforeMethod
public void testInitialize() {
treeAttributes.set(TreeAttributes.selectionType, selectionType);
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSimple.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSimple.java 2011-11-24
23:53:52 UTC (rev 23004)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSimple.java 2011-11-25
14:53:19 UTC (rev 23005)
@@ -36,11 +36,7 @@
import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guard;
import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
-import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import static org.jboss.test.selenium.utils.text.SimplifiedFormat.format;
-import static org.richfaces.tests.metamer.ftest.BasicAttributes.handleClass;
-import static org.richfaces.tests.metamer.ftest.BasicAttributes.iconClass;
-import static org.richfaces.tests.metamer.ftest.BasicAttributes.labelClass;
import static org.richfaces.tests.metamer.ftest.BasicAttributes.nodeClass;
import static org.richfaces.tests.metamer.ftest.attributes.AttributeList.treeAttributes;
import static org.richfaces.tests.metamer.ftest.richTree.TreeAttributes.data;
@@ -59,8 +55,6 @@
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
-import java.net.URL;
-
import org.jboss.cheiron.halt.XHRHalter;
import org.jboss.test.selenium.dom.Event;
import org.jboss.test.selenium.locator.Attribute;
@@ -71,7 +65,6 @@
import org.jboss.test.selenium.request.RequestType;
import org.jboss.test.selenium.waiting.selenium.SeleniumCondition;
import org.richfaces.component.SwitchType;
-import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.richfaces.tests.metamer.ftest.annotations.Use;
@@ -81,7 +74,7 @@
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
* @version $Revision$
*/
-public class TestTreeSimple extends AbstractMetamerTest {
+public class TestTreeSimple extends AbstractTestTree {
private static final String IMAGE_URL = "/resources/images/loading.gif";
@@ -102,18 +95,13 @@
@Use(empty = true)
Event domEvent;
Event[] domEvents = { CLICK, DBLCLICK, KEYDOWN, KEYPRESS, KEYUP, MOUSEDOWN,
MOUSEMOVE, MOUSEOUT, MOUSEOVER, MOUSEUP };
-
+
TreeModel tree = new TreeModel(pjq("div.rf-tr[id$=richTree]"));
TreeNodeModel treeNode;
JQueryLocator expandAll = jq("input:submit[id$=expandAll]");
JQueryLocator loadingFacet = jq("input:checkbox[id$=loadingFacet]");
- @Override
- public URL getTestUrl() {
- return buildUrl(contextPath,
"faces/components/richTree/simple.xhtml");
- }
-
@Test
public void testData() {
treeAttributes.set(data, "RichFaces 4");
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeToggling.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeToggling.java 2011-11-24
23:53:52 UTC (rev 23004)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeToggling.java 2011-11-25
14:53:19 UTC (rev 23005)
@@ -21,18 +21,14 @@
*******************************************************************************/
package org.richfaces.tests.metamer.ftest.richTree;
-import static org.jboss.test.selenium.locator.LocatorFactory.jq;
-import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+import static org.richfaces.tests.metamer.ftest.attributes.AttributeList.treeAttributes;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
-import static org.richfaces.tests.metamer.ftest.attributes.AttributeList.treeAttributes;
-import java.net.URL;
import java.util.Deque;
import java.util.LinkedList;
import org.richfaces.component.SwitchType;
-import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
import org.richfaces.tests.metamer.ftest.annotations.Use;
import org.testng.annotations.BeforeMethod;
@@ -42,7 +38,7 @@
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
* @version $Revision$
*/
-public class TestTreeToggling extends AbstractMetamerTest {
+public class TestTreeToggling extends AbstractTestTree {
private static final int TOP_LEVEL_NODES = 4;
@@ -55,11 +51,6 @@
private TreeModel tree = new TreeModel(pjq("div.rf-tr[id$=richTree]"));
private TreeNodeModel treeNode;
- @Override
- public URL getTestUrl() {
- return buildUrl(contextPath,
"faces/components/richTree/simple.xhtml");
- }
-
@BeforeMethod
public void verifyInitialState() {
treeAttributes.set(TreeAttributes.toggleType, toggleType);
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeNode/TestTreeNodeSimple.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeNode/TestTreeNodeSimple.java 2011-11-24
23:53:52 UTC (rev 23004)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeNode/TestTreeNodeSimple.java 2011-11-25
14:53:19 UTC (rev 23005)
@@ -104,7 +104,7 @@
@Override
public URL getTestUrl() {
- return buildUrl(contextPath,
"faces/components/richTree/simple.xhtml");
+ return buildUrl(contextPath,
"faces/components/richTree/simpleSwingTreeNode.xhtml");
}
@Test