Author: tkuprevich
Date: 2008-02-18 11:44:08 -0500 (Mon, 18 Feb 2008)
New Revision: 6145
Added:
trunk/test-applications/qa/Performance Suite/DataModels/Scrollable Data
Table/ScrollableDataTable.xhtml
trunk/test-applications/qa/Performance Suite/DataModels/Scrollable Data
Table/ScrollableDataTableProperty.xhtml
trunk/test-applications/qa/Performance Suite/DataModels/tree/
trunk/test-applications/qa/Performance Suite/DataModels/tree/Bean.java
trunk/test-applications/qa/Performance Suite/DataModels/tree/Library.java
trunk/test-applications/qa/Performance Suite/DataModels/tree/Organism.java
trunk/test-applications/qa/Performance Suite/DataModels/tree/Pathway.java
trunk/test-applications/qa/Performance Suite/DataModels/tree/Tree.xhtml
trunk/test-applications/qa/Performance Suite/DataModels/tree/TreeBean.java
trunk/test-applications/qa/Performance Suite/DataModels/tree/TreeProperty.xhtml
trunk/test-applications/qa/Performance Suite/DataModels/tree/pom_sample.xml
trunk/test-applications/qa/Performance Suite/DataModels/tree/test.xml
Modified:
trunk/test-applications/qa/Performance Suite/Performance Test Suite.doc
trunk/test-applications/qa/Test Plan/3.2.0/TestPlan-RF-3.2.0.doc
Log:
Added: trunk/test-applications/qa/Performance Suite/DataModels/Scrollable Data
Table/ScrollableDataTable.xhtml
===================================================================
--- trunk/test-applications/qa/Performance Suite/DataModels/Scrollable Data
Table/ScrollableDataTable.xhtml (rev 0)
+++ trunk/test-applications/qa/Performance Suite/DataModels/Scrollable Data
Table/ScrollableDataTable.xhtml 2008-02-18 16:44:08 UTC (rev 6145)
@@ -0,0 +1,90 @@
+
+<f:subview
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:rich="http://richfaces.org/rich"
+ id="scrollableDataTableSubviewID">
+ <rich:scrollableDataTable id="sdt" var="sdt"
rowKeyVar="key"
+ onRowDblClick="alert('row:#{key}')"
+ ajaxSingle="#{scrollableDT.ajaxSingle}"
value="#{scrollableDT.data}"
+ rows="#{scrollableDT.rows}" width="#{scrollableDT.width}"
+ height="#{scrollableDT.height}"
+ hideWhenScrolling="#{scrollableDT.hideWhenScrolling}"
+ reRender="inputID" frozenColCount="#{scrollableDT.frozenColCount}"
+ first="#{scrollableDT.first}"
+ ignoreDupResponses="#{scrollableDT.ignoreDupResponses}"
+ bypassUpdates="#{scrollableDT.bypassUpdates}"
+ rendered="#{scrollableDT.rendered}"
+ limitToList="#{scrollableDT.limitToList}"
+ timeout="#{scrollableDT.timeout}"
+ selection="#{scrollableDT.selection}"
+ onbeforedomupdate="#{event.onbeforedomupdate}"
+ oncomplete="#{event.oncomplete}" onRowClick="#{event.onRowClick}"
+ onRowMouseDown="#{event.onRowMouseDown}"
+ onRowMouseUp="#{event.onRowMouseUp}"
+ onselectionchange="#{event.onselectionchange}">
+ <f:facet name="header">
+ <h:outputText value="facet header"></h:outputText>
+ </f:facet>
+
+ <rich:column sortExpression="#{sdt.int0}" sortable="true">
+ <f:facet name="header">
+ <h:outputText value="#" />
+ </f:facet>
+ <h:outputText value="#{sdt.int0}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="#" />
+ </f:facet>
+ </rich:column>
+
+ <rich:column sortExpression="#{sdt.str0}" sortable="false">
+ <f:facet name="header">
+ <h:outputText value="Text"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{sdt.str0}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="Text"></h:outputText>
+ </f:facet>
+ </rich:column>
+
+ <rich:column sortExpression="#{sdt.str1}">
+ <f:facet name="header">
+ <h:outputText value="Link"></h:outputText>
+ </f:facet>
+ <a4j:commandLink value="#{sdt.str1}"
reRender="sdt"></a4j:commandLink>
+ <f:facet name="footer">
+ <h:outputText value="Link"></h:outputText>
+ </f:facet>
+ </rich:column>
+
+ <rich:column sortExpression="#{sdt.str2}">
+ <f:facet name="header">
+ <h:outputText value="Select"></h:outputText>
+ </f:facet>
+ <h:selectOneMenu value="#{sdt.str2}">
+ <f:selectItem itemLabel="select0" itemValue="select0" />
+ <f:selectItem itemLabel="select1" itemValue="select1" />
+ <f:selectItem itemLabel="select2" itemValue="select2" />
+ <f:selectItem itemLabel="select3" itemValue="select3" />
+ <f:selectItem itemLabel="select4" itemValue="select4" />
+ </h:selectOneMenu>
+ <f:facet name="footer">
+ <h:outputText value="Select"></h:outputText>
+ </f:facet>
+ </rich:column>
+
+ <rich:column sortExpression="#{sdt.str3}">
+ <f:facet name="header">
+ <h:outputText value="Select"></h:outputText>
+ </f:facet>
+ <h:graphicImage value="#{sdt.str3}"></h:graphicImage>
+ <f:facet name="footer">
+ <h:outputText value="Select"></h:outputText>
+ </f:facet>
+ </rich:column>
+
+ <f:facet name="footer">
+ <h:outputText value="facet footer"></h:outputText>
+ </f:facet>
+ </rich:scrollableDataTable>
+</f:subview>
Added: trunk/test-applications/qa/Performance Suite/DataModels/Scrollable Data
Table/ScrollableDataTableProperty.xhtml
===================================================================
--- trunk/test-applications/qa/Performance Suite/DataModels/Scrollable Data
Table/ScrollableDataTableProperty.xhtml (rev 0)
+++ trunk/test-applications/qa/Performance Suite/DataModels/Scrollable Data
Table/ScrollableDataTableProperty.xhtml 2008-02-18 16:44:08 UTC (rev 6145)
@@ -0,0 +1,52 @@
+
+<f:subview
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
id="scrollableDataTablePropertySubviewID">
+ <h:panelGrid columns="2">
+ <h:outputText value="length:"></h:outputText>
+ <h:inputText value="#{scrollableDT.dataLength}"
onchange="submit();">
+ </h:inputText>
+
+ <h:outputText value="rows:" />
+ <h:inputText value="#{scrollableDT.rows}"
onchange="submit();">
+ </h:inputText>
+
+ <h:outputText value="first:"></h:outputText>
+ <h:inputText value="#{scrollableDT.first}"
onchange="submit();">
+ </h:inputText>
+
+ <h:outputText value="timeout"></h:outputText>
+ <h:inputText value="#{scrollableDT.timeout}"
onchange="submit();">
+ </h:inputText>
+
+ <h:outputText value="width:" />
+ <h:inputText value="#{scrollableDT.width}"
onchange="submit();">
+ </h:inputText>
+
+ <h:outputText value="height:"></h:outputText>
+ <h:inputText value="#{scrollableDT.height}"
onchange="submit();">
+ </h:inputText>
+
+ <h:outputText value="frozenColCount"></h:outputText>
+ <h:inputText value="#{scrollableDT.frozenColCount}"
onchange="submit();">
+ </h:inputText>
+
+ <h:outputText value="limitToList"></h:outputText>
+ <h:selectBooleanCheckbox value="#{scrollableDT.limitToList}"
onchange="submit();">
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="bypassUpdates:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{scrollableDT.bypassUpdates}"
onchange="submit();">
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="ajaxSingle:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{scrollableDT.ajaxSingle}"
onchange="submit();"></h:selectBooleanCheckbox>
+
+ <h:outputText value="rendered:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{scrollableDT.rendered}"
onchange="submit();">
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="hideWhenScrolling:" />
+ <h:selectBooleanCheckbox value="#{scrollableDT.hideWhenScrolling}"
onchange="submit();">
+ </h:selectBooleanCheckbox>
+ </h:panelGrid>
+ <a4j:commandButton value="reRender"
reRender="sdt"></a4j:commandButton>
+</f:subview>
\ No newline at end of file
Added: trunk/test-applications/qa/Performance Suite/DataModels/tree/Bean.java
===================================================================
--- trunk/test-applications/qa/Performance Suite/DataModels/tree/Bean.java
(rev 0)
+++ trunk/test-applications/qa/Performance Suite/DataModels/tree/Bean.java 2008-02-18
16:44:08 UTC (rev 6145)
@@ -0,0 +1,337 @@
+package tree;
+
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Set;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.event.FacesEvent;
+
+import org.ajax4jsf.context.AjaxContext;
+import org.richfaces.component.UITree;
+import org.richfaces.component.UITreeNode;
+import org.richfaces.component.xml.XmlTreeDataBuilder;
+import org.richfaces.event.DropEvent;
+import org.richfaces.event.NodeExpandedEvent;
+import org.richfaces.event.NodeSelectedEvent;
+import org.richfaces.model.ListRowKey;
+import org.richfaces.model.TreeNode;
+import org.richfaces.model.TreeNodeImpl;
+import org.richfaces.model.TreeRowKey;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+public class Bean {
+ private String switchType = "client";
+ private TreeNode data;
+ private TreeNode selectedNode = null;
+ private Map selectedNodeChildren = new LinkedHashMap();
+ private String commandButtonCaption = "Set user icons";
+ private String iconCollapsed = null;
+ private String iconExpanded = null;
+ private String iconLeaf = null;
+ private String icon = null;
+ private boolean renderFacets = false;
+ private String pathToExpand;
+ private boolean dragOn = true;
+ private TreeNodeImpl data1;
+ private int counter = 0;
+ private String expandPath;
+ private UITree tree;
+
+ public Bean() {
+ try {
+ FacesContext context = FacesContext.getCurrentInstance();
+ data = XmlTreeDataBuilder
+ .build(new InputSource(getClass().getResourceAsStream("test.xml")));
+ TreeNode pomData = XmlTreeDataBuilder.build(new InputSource(getClass()
+ .getResourceAsStream("pom_sample.xml")));
+ Iterator children = pomData.getChildren();
+ while (children.hasNext()) {
+ Map.Entry entry = (Map.Entry) children.next();
+ data.addChild(new Long(1), (TreeNode) entry.getValue());
+ }
+ } catch (SAXException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ data1 = new TreeNodeImpl();
+ data1.setData("Root node");
+ for (int i = 0; i < 10; i++) {
+ TreeNodeImpl child = new TreeNodeImpl() {
+
+ public Object getData() {
+ return super.getData() + " " + counter;
+ }
+ };
+ String id = Integer.toString(i);
+ child.setData("Node: " + id);
+ data1.addChild(id, child);
+ }
+ //initData();
+ }
+
+ private void initData() {
+ selectedNodeChildren.clear();
+ if (selectedNode != null) {
+ Iterator iter = selectedNode.getChildren();
+ int i = 0;
+ while (iter.hasNext()) {
+ Map.Entry entry = (Map.Entry) iter.next();
+ selectedNodeChildren
+ .put(((TreeNode) entry.getValue()).getData(), Integer.toString(i++));
+ }
+ }
+ }
+
+ public String getIcon() {
+ return icon;
+ }
+
+ public void setIcon(String icon) {
+ this.icon = icon;
+ }
+
+ public String getCommandButtonCaption() {
+ return commandButtonCaption;
+ }
+
+ public void setCommandButtonCaption(String commandButtonCaption) {
+ this.commandButtonCaption = commandButtonCaption;
+ }
+
+ public void changeIcons(javax.faces.event.ActionEvent event) {
+ if (null == icon) {
+ iconCollapsed = "/pics/header.png";
+ iconExpanded = "/pics/item.png";
+ iconLeaf = "/pics/ajax_process.gif";
+ icon = "/pics/ajax_stoped.gif";
+ commandButtonCaption = "Set defoult icons";
+ } else {
+ iconCollapsed = null;
+ iconExpanded = null;
+ iconLeaf = null;
+ icon = null;
+ commandButtonCaption = "Set user icons";
+ }
+ }
+
+ public TreeNode getData() {
+ return data;
+ }
+
+ public String getSwitchType() {
+ return switchType;
+ }
+
+ public void setSwitchType(String switchType) {
+ this.switchType = switchType;
+ }
+
+ private UITree getTree(FacesEvent event) {
+ UIComponent component = event.getComponent();
+ if (component instanceof UITree) {
+ return ((UITree) component);
+ }
+
+ if (component instanceof UITreeNode) {
+ return ((UITree) component.getParent());
+ }
+
+ return null;
+ }
+
+ public void up() {
+ if (selectedNode.getParent() != null) {
+ selectedNode = selectedNode.getParent();
+ }
+ initData();
+ }
+
+ public void onSelect(NodeSelectedEvent event) {
+ System.out.println("Node selected: " + getTree(event).getRowKey());
+ if (getTree(event).getTreeNode() != null) {
+ selectedNode = getTree(event).getTreeNode();
+ data.removeChild(selectedNode.getChildren());
+ initData();
+ }
+ }
+
+ public void onSelectInc(NodeSelectedEvent event) {
+ counter++;
+
+ UITree tree = getTree(event);
+ TreeRowKey key = (TreeRowKey) tree.getRowKey();
+ Set keys = tree.getAjaxKeys();
+ if (keys == null) {
+ keys = new HashSet();
+ tree.setAjaxKeys(keys);
+ }
+
+ AjaxContext ajaxCtx = AjaxContext.getCurrentInstance();
+ FacesContext fctx = FacesContext.getCurrentInstance();
+ tree.setRowKey(null);
+ // Force more than one node to update here:
+ for (int i = 0; i < 5; i++) {
+ ListRowKey dirtyKey = new ListRowKey(Integer.toString(i));
+ keys.add(dirtyKey);
+ tree.setRowKey(dirtyKey);
+ ajaxCtx.addComponentToAjaxRender(tree.getParent(), tree.getClientId(fctx));
+ }
+ tree.setRowKey(key);
+ }
+
+ public void onExpand(NodeExpandedEvent event) {
+ UITree tree = getTree(event);
+ System.out.println("Node " + (tree.isExpanded() ? "expanded" :
"collapsed") + " "
+ + tree.getRowKey());
+ }
+
+ public String expand() {
+ if (expandPath != null && expandPath.length() != 0) {
+ try {
+ tree.queueNodeExpand(new ListRowKey(expandPath));
+ } catch (IOException e) {
+
+ e.printStackTrace();
+ }
+ }
+
+ return null;
+ }
+
+ public String getExpandPath() {
+ return expandPath;
+ }
+
+ public void setExpandPath(String expandPath) {
+ this.expandPath = expandPath;
+ }
+
+ public UIComponent getTree() {
+ return tree;
+ }
+
+ public void setTree(UIComponent tree) {
+ this.tree = (UITree) tree;
+ }
+
+ public String collapseAll() throws IOException {
+ this.tree.queueCollapseAll();
+ return null;
+ }
+
+ public String expandAll() {
+ try {
+ this.tree.queueExpandAll();
+ } catch (IOException e) {
+
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ public Map getSelectedNodeChildren() {
+ return selectedNodeChildren;
+ }
+
+ public void setSelectedNodeChildren(Map selectedNodeChildren) {
+ this.selectedNodeChildren = selectedNodeChildren;
+ }
+
+ public TreeNode getSelectedNode() {
+ return selectedNode;
+ }
+
+ public void setSelectedNode(TreeNode selectedNode) {
+ this.selectedNode = selectedNode;
+ }
+
+ public void processDrop(DropEvent dropEvent) {
+ System.out.println("Should be printed twice per event!!!");
+ System.out.println(dropEvent);
+ System.out.println("DragValue: " + dropEvent.getDragValue());
+ System.out.println("DropValue: " + dropEvent.getDropValue());
+ System.out.println("Drag row data: "
+ + getTree(dropEvent).getRowData(dropEvent.getDragValue()));
+ System.out.println("Drop row data: "
+ + getTree(dropEvent).getRowData(dropEvent.getDropValue()));
+ System.out.println("+++++");
+ }
+
+ public String getIconCollapsed() {
+ return iconCollapsed;
+ }
+
+ public void setIconCollapsed(String iconCollapsed) {
+ this.iconCollapsed = iconCollapsed;
+ }
+
+ public String getIconExpanded() {
+ return iconExpanded;
+ }
+
+ public void setIconExpanded(String iconExpanded) {
+ this.iconExpanded = iconExpanded;
+ }
+
+ public String getIconLeaf() {
+ return iconLeaf;
+ }
+
+ public void setIconLeaf(String iconLeaf) {
+ this.iconLeaf = iconLeaf;
+ }
+
+ public String getPathToExpand() {
+ return pathToExpand;
+ }
+
+ public void setPathToExpand(String pathToExpand) {
+ this.pathToExpand = pathToExpand;
+ }
+
+ public String expandNode() {
+ String pathToExpand = getPathToExpand();
+ if (pathToExpand != null && pathToExpand.trim().length() != 0) {
+ try {
+ ((UITree) getTree()).queueNodeExpand(new ListRowKey(pathToExpand));
+ } catch (IOException e) {
+ throw new FacesException(e);
+ }
+ }
+
+ return null;
+ }
+
+ public boolean isDragOn() {
+ return dragOn;
+ }
+
+ public void setDragOn(boolean dragOn) {
+ this.dragOn = dragOn;
+ }
+
+ public TreeNodeImpl getData1() {
+ return data1;
+ }
+
+ public void setData1(TreeNodeImpl data1) {
+ this.data1 = data1;
+ }
+
+ public boolean isRenderFacets() {
+ return renderFacets;
+ }
+
+ public void setRenderFacets(boolean renderFacets) {
+ this.renderFacets = renderFacets;
+ }
+}
Added: trunk/test-applications/qa/Performance Suite/DataModels/tree/Library.java
===================================================================
--- trunk/test-applications/qa/Performance Suite/DataModels/tree/Library.java
(rev 0)
+++ trunk/test-applications/qa/Performance Suite/DataModels/tree/Library.java 2008-02-18
16:44:08 UTC (rev 6145)
@@ -0,0 +1,116 @@
+package tree;
+
+
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.richfaces.model.TreeNode;
+
+public class Library implements TreeNode {
+
+ private Map pathways = null;
+ private Object state1;
+
+ private List listPathway;
+
+ public Library() {
+ }
+
+ public Library(List l) {
+ this.listPathway = l;
+ }
+
+ private Map getPathways() {
+ if (this.pathways == null) {
+ initData();
+ }
+ return this.pathways;
+ }
+
+ public void addPathway(Pathway pw) {
+ addChild(Long.toString(pw.getId()), pw);
+ pw.setParent(this);
+ }
+
+ public void addChild(Object identifier, TreeNode child) {
+ getPathways().put(identifier, child);
+ }
+
+ public TreeNode getChild(Object id) {
+ return (TreeNode) getPathways().get(id);
+ }
+
+ public Iterator getChildren() {
+ return getPathways().entrySet().iterator();
+ }
+
+ public Object getData() {
+ return this;
+ }
+
+ public TreeNode getParent() {
+ return null;
+ }
+
+ public boolean isLeaf() {
+ return getPathways().isEmpty();
+ }
+
+ public void removeChild(Object id) {
+ getPathways().remove(id);
+ }
+
+ public void setData(Object data) {
+ }
+
+ public void setParent(TreeNode parent) {
+ }
+
+ public String getType() {
+ return "library";
+ }
+
+ private long nextId = 0;
+
+ private long getNextId() {
+ return nextId++;
+ }
+
+ private Map pathCache = new HashMap();
+
+ private Pathway getPathwayByName(String name, Library library) {
+ Pathway pathway = (Pathway) pathCache.get(name);
+ if (pathway == null) {
+ pathway = new Pathway(getNextId());
+ pathway.setName(name);
+ pathCache.put(name, pathway);
+ library.addPathway(pathway);
+ }
+ return pathway;
+ }
+
+ private void initData() {
+ pathways = new HashMap();
+
+ for (int i = 0; i < 15; i++) {
+ Pathway path = getPathwayByName("PATH_" + i, this);
+ for (int j = 0; j < 20; j++) {
+ Organism org = new Organism(getNextId());
+ org.setName("ORG_" + i + "." + j);
+ path.addOrganism(org);
+ }
+ }
+
+ }
+
+ public Object getState1() {
+ return state1;
+ }
+
+ public void setState1(Object state1) {
+ this.state1 = state1;
+ }
+}
\ No newline at end of file
Added: trunk/test-applications/qa/Performance Suite/DataModels/tree/Organism.java
===================================================================
--- trunk/test-applications/qa/Performance Suite/DataModels/tree/Organism.java
(rev 0)
+++ trunk/test-applications/qa/Performance Suite/DataModels/tree/Organism.java 2008-02-18
16:44:08 UTC (rev 6145)
@@ -0,0 +1,77 @@
+package tree;
+
+
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.richfaces.model.TreeNode;
+
+public class Organism implements TreeNode {
+ private long id;
+ private String name;
+ private Pathway pathway;
+
+ public Organism(long id) {
+ this.id = id;
+ }
+
+ public void addChild(Object identifier, TreeNode child) {
+ throw new UnsupportedOperationException("Organisms do not have children");
+ }
+
+ public TreeNode getChild(Object id) {
+ throw new UnsupportedOperationException("Organisms do not have children");
+ }
+
+ public Iterator getChildren() {
+ // TODO: Fix me!
+ return new ArrayList().iterator(); // work around limitation for TreeNode
+ }
+
+ public Object getData() {
+ return this;
+ }
+
+ public TreeNode getParent() {
+ return pathway;
+ }
+
+ public boolean isLeaf() {
+ return true;
+ }
+
+ public void removeChild(Object id) {
+ throw new UnsupportedOperationException("Organisms do not have children");
+ }
+
+ public void setData(Object data) {
+ }
+
+ public void setParent(TreeNode parent) {
+ this.pathway = (Pathway) parent;
+ }
+
+ public Pathway getPathway() {
+ return pathway;
+ }
+
+ public void setPathway(Pathway artist) {
+ this.pathway = artist;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String title) {
+ this.name = title;
+ }
+
+ public long getId() {
+ return id;
+ }
+ public String getType() {
+ return "organism";
+ }
+}
Added: trunk/test-applications/qa/Performance Suite/DataModels/tree/Pathway.java
===================================================================
--- trunk/test-applications/qa/Performance Suite/DataModels/tree/Pathway.java
(rev 0)
+++ trunk/test-applications/qa/Performance Suite/DataModels/tree/Pathway.java 2008-02-18
16:44:08 UTC (rev 6145)
@@ -0,0 +1,85 @@
+package tree;
+
+
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.richfaces.model.TreeNode;
+
+public class Pathway implements TreeNode {
+
+ private long id;
+ private Map organisms = new HashMap();
+ private String name;
+ private Library library;
+
+
+ public Pathway(long id) {
+ this.id = id;
+ }
+
+ public void addOrganism(Organism org) {
+ addChild(Long.toString(org.getId()), org);
+ org.setParent(this);
+ }
+
+ public void addChild(Object identifier, TreeNode child) {
+ organisms.put(identifier, child);
+ }
+
+ public TreeNode getChild(Object id) {
+ return (TreeNode) organisms.get(id);
+ }
+
+ public Iterator getChildren() {
+ return organisms.entrySet().iterator();
+ }
+
+ public Object getData() {
+ return this;
+ }
+
+ public TreeNode getParent() {
+ return library;
+ }
+
+ public boolean isLeaf() {
+ return organisms.isEmpty();
+ }
+
+ public void removeChild(Object id) {
+ organisms.remove(id);
+ }
+
+ public void setData(Object data) {
+ }
+
+ public void setParent(TreeNode parent) {
+ library = (Library) parent;
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Library getLibrary() {
+ return library;
+ }
+
+ public void setLibrary(Library library) {
+ this.library = library;
+ }
+ public String getType() {
+ return "pathway";
+ }
+}
\ No newline at end of file
Added: trunk/test-applications/qa/Performance Suite/DataModels/tree/Tree.xhtml
===================================================================
--- trunk/test-applications/qa/Performance Suite/DataModels/tree/Tree.xhtml
(rev 0)
+++ trunk/test-applications/qa/Performance Suite/DataModels/tree/Tree.xhtml 2008-02-18
16:44:08 UTC (rev 6145)
@@ -0,0 +1,104 @@
+
+<f:subview
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich" id="treeSubviewID">
+ <a4j:outputPanel ajaxRendered="true">
+ <h:messages />
+ </a4j:outputPanel>
+
+ <rich:tree id="tree" switchType="#{bean.switchType}"
value="#{bean.data}" var="data"
+ nodeFace="#{data.name != 'param-value' ? 'input' :
'text'}" changeExpandListener="#{bean.onExpand}"
+ nodeSelectListener="#{bean.onSelect}" binding="#{bean.tree}"
onselected="window.status='selectedNode: '+event.selectedNode;"
+ onexpand="window.status='expandedNode: '+event.expandedNode"
oncollapse="window.status='collapsedNode: '+ event.collapsedNode"
+ ajaxSubmitSelection="true" reRender="outputText, selectOneListbox"
preserveModel="none" dragIndicator="treeIndicator"
+ immediate="false" acceptedTypes="file1"
dragType="#{bean.dragOn ? 'file1' : ''}"
iconCollapsed="#{bean.iconCollapsed}"
+ iconExpanded="#{bean.iconExpanded}" iconLeaf="#{bean.iconLeaf}"
icon="#{bean.icon}" dropListener="#{bean.processDrop}"
+ onclick="#{event.onclick}" ondblclick="#{event.ondblclick}"
ondragend="#{event.ondragend}" ondragenter="#{event.ondragenter}"
ondragexit="#{event.ondragexit}" ondragstart="#{event.ondragstart}"
ondrop="#{event.ondrop}" ondropend="#{event.ondropend}"
onkeydown="#{event.onkeydown}" onkeypress="#{event.onkeypress}"
onkeyup="#{event.onkeyup}" onmousedown="#{event.onmousedown}"
onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}"
onmouseover="#{event.onmouseover}" onmouseup="#{event.onmouseup}"
onbeforedomupdate="#{event.onbeforedomupdate}"
oncomplete="#{event.oncomplete}" ondropout="#{event.ondropout}"
ondropover="#{event.ondropover}">
+
+ <f:facet name="icon">
+ <h:outputText value="icon" rendered="#{bean.renderFacets}"
/>
+ </f:facet>
+ <f:facet name="iconLeaf">
+ <h:outputText value="leaf" rendered="#{bean.renderFacets}"
/>
+ </f:facet>
+ <f:facet name="iconExpanded">
+ <h:outputText value="expanded" rendered="#{bean.renderFacets}"
/>
+ </f:facet>
+ <f:facet name="iconCollapsed">
+ <h:outputText value="collapsed"
rendered="#{bean.renderFacets}" />
+ </f:facet>
+
+ <rich:dndParam name="treeParam" value="Tree Parameter" />
+ <rich:dndParam name="accept" value="accept" />
+
+ <rich:treeNode type="input" dropListener="#{bean.processDrop}"
+ oncollapse="Element.removeClassName(event['treeItem'].getElement(),
'colored')"
+ onexpand="Element.addClassName(event['treeItem'].getElement(),
'colored')"
+ onbeforedomupdate="#{event.onbeforedomupdate}"
onclick="#{event.onclick}" oncomplete="#{event.oncomplete}"
oncontextmenu="#{event.oncontextmenu}"
ondblclick="#{event.ondblclick}" ondragend="#{event.ondragend}"
ondragenter="#{event.ondragenter}" ondragexit="#{event.ondragexit}"
ondragstart="#{event.ondragstart}" ondrop="#{event.ondrop}"
ondropend="#{event.ondropend}" ondropout="#{event.ondropout}"
ondropover="#{event.ondropover}" onkeydown="#{event.onkeydown}"
onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}"
onmousedown="#{event.onmousedown}" onmousemove="#{event.onmousemove}"
onmouseout="#{event.onmouseout}" onmouseover="#{event.onmouseover}"
onmouseup="#{event.onmouseup}" onselected="#{event.onselected}">
+ <h:outputText value="#{data} : " />
+ <h:inputText value="#{data.name}" required="true"
styleClass="inputs">
+ </h:inputText>
+
+ <rich:dndParam name="nodeParam" value="Node Parameter" />
+
+ </rich:treeNode>
+ <rich:treeNode type="text" nodeClass="customNode"
acceptedTypes="file2" onselected="return false;">
+ <h:outputText value="#{data}" />
+ </rich:treeNode>
+ </rich:tree>
+
+ <f:verbatim>
+ <br />
+ </f:verbatim>
+
+ <h:outputText value="Enter path to expand:" />
+ <h:inputText value="#{bean.pathToExpand}">
+ <a4j:support event="onchange" reRender="tree"
action="#{bean.expandNode}" />
+ </h:inputText>
+
+ <rich:separator></rich:separator>
+
+ <h:panelGrid columns="2">
+ <h:outputText value="Change tree switchType:" />
+ <h:selectOneRadio value="#{bean.switchType}"
onclick="submit()">
+ <f:selectItem itemLabel="client" itemValue="client" />
+ <f:selectItem itemLabel="server" itemValue="server" />
+ <f:selectItem itemLabel="ajax" itemValue="ajax" />
+ </h:selectOneRadio>
+
+ <h:outputText value="Drag switch:" />
+ <h:selectBooleanCheckbox value="#{bean.dragOn}"
onchange="submit();"></h:selectBooleanCheckbox>
+
+ <h:outputText value="Render facets:" />
+ <h:selectBooleanCheckbox value="#{bean.renderFacets}"
onchange="submit();"></h:selectBooleanCheckbox>
+
+ <h:commandButton value="#{bean.commandButtonCaption}"
actionListener="#{bean.changeIcons}" />
+ </h:panelGrid>
+
+ <f:verbatim>
+ <br />
+ <br />
+ </f:verbatim>
+
+ <rich:tree id="testTree" var="_data" switchType="ajax"
ajaxSubmitSelection="true" preserveModel="none"
value="#{bean.data1}"
+ nodeSelectListener="#{bean.onSelectInc}" nodeFace="node">
+ <rich:treeNode type="node">
+ <h:outputText value="#{_data}" />
+ </rich:treeNode>
+ </rich:tree>
+ <rich:separator></rich:separator>
+ <h:outputText value="Tree without treeNode:"></h:outputText>
+ <rich:separator></rich:separator>
+
+ <rich:tree switchType="client" style="width:300px"
value="#{pathwayBean.pathwayTree}" var="item"
nodeFace="#{item.type}">
+ <rich:treeNode type="library">
+ <h:outputText value="#{item.type}" />
+ </rich:treeNode>
+ <rich:treeNode type="pathway">
+ <h:outputText value="#{item.name}" />
+ </rich:treeNode>
+ <rich:treeNode type="organism">
+ <h:outputText value="#{item.name}" />
+ </rich:treeNode>
+ </rich:tree>
+
+ <rich:spacer></rich:spacer>
+</f:subview>
Added: trunk/test-applications/qa/Performance Suite/DataModels/tree/TreeBean.java
===================================================================
--- trunk/test-applications/qa/Performance Suite/DataModels/tree/TreeBean.java
(rev 0)
+++ trunk/test-applications/qa/Performance Suite/DataModels/tree/TreeBean.java 2008-02-18
16:44:08 UTC (rev 6145)
@@ -0,0 +1,7 @@
+package tree;
+
+public class TreeBean {
+ public Object getPathwayTree() {
+ return new Library();
+ }
+}
Added: trunk/test-applications/qa/Performance Suite/DataModels/tree/TreeProperty.xhtml
===================================================================
--- trunk/test-applications/qa/Performance Suite/DataModels/tree/TreeProperty.xhtml
(rev 0)
+++ trunk/test-applications/qa/Performance
Suite/DataModels/tree/TreeProperty.xhtml 2008-02-18 16:44:08 UTC (rev 6145)
@@ -0,0 +1,4 @@
+
+<f:subview
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich" id="treePropertySubviewID">
+
+</f:subview>
\ No newline at end of file
Added: trunk/test-applications/qa/Performance Suite/DataModels/tree/pom_sample.xml
===================================================================
--- trunk/test-applications/qa/Performance Suite/DataModels/tree/pom_sample.xml
(rev 0)
+++ trunk/test-applications/qa/Performance Suite/DataModels/tree/pom_sample.xml 2008-02-18
16:44:08 UTC (rev 6145)
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces</groupId>
+ <artifactId>tree</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.ajax4jsf.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <library>
+ <prefix>org.richfaces</prefix>
+ <taglib>
+ <shortName>tree</shortName>
+ </taglib>
+ </library>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <repositories>
+ <repository>
+ <releases />
+ <snapshots>
+ <enabled>false</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ <id>maven2-repository.dev.java.net</id>
+ <
name>Java.net Repository for Maven</name>
+ <
url>https://maven2-repository.dev.java.net/nonav/repository</url>
+ </repository>
+ <repository>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <updatePolicy>always</updatePolicy>
+ </snapshots>
+ <id>maven2-snapshots.ajax4jsf.org</id>
+ <name>Ajax4jsf Repository for Maven Snapshots</name>
+ <
url>https://ajax4jsf.dev.java.net/nonav/snapshots</url>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <updatePolicy>always</updatePolicy>
+ </snapshots>
+ <id>maven2-snapshots.ajax4jsf.org</id>
+ <name>Ajax4jsf Repository for Maven Snapshots</name>
+ <
url>https://ajax4jsf.dev.java.net/nonav/snapshots</url>
+ </pluginRepository>
+ </pluginRepositories>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.facelets</groupId>
+ <artifactId>jsf-facelets</artifactId>
+ <version>1.1.6</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>1.1_02</version>
+ </dependency>
+ <dependency>
+ <groupId>org.ajax4jsf</groupId>
+ <artifactId>framework</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Added: trunk/test-applications/qa/Performance Suite/DataModels/tree/test.xml
===================================================================
--- trunk/test-applications/qa/Performance Suite/DataModels/tree/test.xml
(rev 0)
+++ trunk/test-applications/qa/Performance Suite/DataModels/tree/test.xml 2008-02-18
16:44:08 UTC (rev 6145)
@@ -0,0 +1,74 @@
+<?xml version="1.0"?>
+<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <description>RF Test-Application</description>
+ <display-name>test-application</display-name>
+ <context-param>
+ <param-name>org.ajax4jsf.SKIN</param-name>
+ <param-value>#{skinBean.skin}</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.REFRESH_PERIOD</param-name>
+ <param-value>2</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>client</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.verifyObjects</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.CONFIG_FILES</param-name>
+
<param-value>/WEB-INF/faces-config-RichPanelsBean.xml,/WEB-INF/faces-config-DataTable.xml,/WEB-INF/faces-config-SimpleTogglePanel.xml,
+ /WEB-INF/faces-config-Panel.xml,/WEB-INF/faces-config-PanelBar.xml,/WEB-INF/faces-config-TabPanel.xml,
+ /WEB-INF/faces-config-TogglePanel.xml,/WEB-INF/faces-config-Paint2D.xml,/WEB-INF/faces-config-InputNumberSlider.xml,
+ /WEB-INF/faces-config-InputNumberSpinner.xml,/WEB-INF/faces-config-DDMenu.xml,/WEB-INF/faces-config-Tree.xml,
+ /WEB-INF/faces-config-PanelMenu.xml,/WEB-INF/faces-config-Icon.xml,/WEB-INF/faces-config-ModalPanel.xml,
+ /WEB-INF/faces-config-tooltip.xml,/WEB-INF/faces-config-Skin.xml,/WEB-INF/faces-config-Calendar.xml,
+ /WEB-INF/faces-config-Gmap.xml,/WEB-INF/faces-config-DataFilterSlider.xml,/WEB-INF/faces-config-Separator.xml,
+ /WEB-INF/faces-config-Spacer.xml,/WEB-INF/faces-config-ToolBar.xml,/WEB-INF/faces-config-DataScroller.xml,
+ /WEB-INF/faces-config-SuggestionBox.xml,/WEB-INF/faces-config-Message.xml,
+ /WEB-INF/faces-config-VirtualEarth.xml,/WEB-INF/faces-config-Effect.xml,/WEB-INF/faces-config-Insert.xml,
+ /WEB-INF/faces-config-RichBean.xml,/WEB-INF/faces-config-ScrollableDataTable.xml,
+ /WEB-INF/faces-config-RichTest.xml,/WEB-INF/faces-config-jQuery.xml,/WEB-INF/faces-config-DragAndDrop.xml,
+ /WEB-INF/faces-config-OrderingList.xml,/WEB-INF/faces-config-DataOrderedList.xml,/WEB-INF/faces-config-DataDefinitionList.xml</param-value>
+ </context-param>
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Modified: trunk/test-applications/qa/Performance Suite/Performance Test Suite.doc
===================================================================
(Binary files differ)
Modified: trunk/test-applications/qa/Test Plan/3.2.0/TestPlan-RF-3.2.0.doc
===================================================================
(Binary files differ)