Author: ppitonak(a)redhat.com
Date: 2011-04-06 09:16:26 -0400 (Wed, 06 Apr 2011)
New Revision: 22381
Added:
modules/tests/metamer/trunk/application/src/main/webapp/templates/richCollapsibleSubTable.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/templates/richList.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Template.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java
Log:
https://issues.jboss.org/browse/RFPL-946
added two new templates - rich:collapsibleSubTable, rich:list
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Template.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Template.java 2011-04-06
13:15:36 UTC (rev 22380)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Template.java 2011-04-06
13:16:26 UTC (rev 22381)
@@ -33,9 +33,11 @@
PLAIN("plain", "Plain", ""),
REDDIV("redDiv", "Red div", ""),
BLUEDIV("blueDiv", "Blue div", ""),
+ RICHCOLLAPSIBLESUBTABLE("richCollapsibleSubTable", "Rich Collapsible
Sub Table", "containerRichCollapsibleSubTable:2:"),
RICHDATATABLE("richDataTable", "Rich Data Table",
"containerRichDataTable:2:"),
RICHDATAGRID("richDataGrid", "Rich Data Grid",
"containerRichDataGrid:1:"),
RICHEXTENDEDDATATABLE("richExtendedDataTable", "Rich Extended Data
Table", "containerRichExtendedDataTable:2:"),
+ RICHLIST("richList", "Rich List",
"containerRichList:2:"),
HDATATABLE("hDataTable", "JSF Data Table",
"containerHDataTable:2:"),
UIREPEAT("uiRepeat", "UI Repeat",
"containerUiRepeat:1:"),
A4JREPEAT("a4jRepeat", "A4J Repeat",
"containerA4JRepeat:1:");
Added:
modules/tests/metamer/trunk/application/src/main/webapp/templates/richCollapsibleSubTable.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/templates/richCollapsibleSubTable.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/templates/richCollapsibleSubTable.xhtml 2011-04-06
13:16:26 UTC (rev 22381)
@@ -0,0 +1,63 @@
+<?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:rich="http://richfaces.org/rich">
+
+ <!--
+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>
+ <rich:dataTable id="containerRichCollapsibleSubTable"
value="#{richSubTableBean.lists}" var="list">
+
+ <f:facet name="header">
+ Rich Collapible Sub Table
+ </f:facet>
+
+ <rich:column id="columnSubTable" colspan="3">
+ <rich:collapsibleSubTableToggler id="subTableTC"
for="richSubTable"/>
+ <h:outputText value="#{list[0].sex == 'MALE' ?
'xxx' : 'yyy'}" />
+ </rich:column>
+
+ <rich:collapsibleSubTable id="richSubTable"
value="#{model.simple}"
var="containerRichCollapsibleSubTableItem">
+
+ <h:column>
+ <f:facet name="header">
+ Column 1
+ </f:facet>
+ #{containerRichCollapsibleSubTableItem}
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ Column 2
+ </f:facet>
+ <h:panelGroup
rendered="#{containerRichCollapsibleSubTableItem == 'row 3' and list[0].sex
== 'MALE'}">
+ <ui:decorate
template="#{templateBean.nextTemplate}.xhtml" />
+ </h:panelGroup>
+ <h:outputText
value="#{containerRichCollapsibleSubTableItem}"
rendered="#{containerRichCollapsibleSubTableItem != 'row 3' or list[0].sex !=
'MALE'}" />
+ </h:column>
+
+ </rich:collapsibleSubTable>
+ </rich:dataTable>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Added: modules/tests/metamer/trunk/application/src/main/webapp/templates/richList.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/templates/richList.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/templates/richList.xhtml 2011-04-06
13:16:26 UTC (rev 22381)
@@ -0,0 +1,43 @@
+<?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:rich="http://richfaces.org/rich">
+
+ <!--
+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>
+ <rich:list value="#{model.simple}"
var="containerRichListItem" id="containerRichList"
type="unordered">
+
+ <f:facet name="header">
+ Rich List
+ </f:facet>
+
+ <h:panelGroup rendered="#{containerRichListItem == 'row
3'}">
+ <ui:decorate template="#{templateBean.nextTemplate}.xhtml"
/>
+ </h:panelGroup>
+ <h:outputText value="#{containerRichListItem}"
rendered="#{containerRichListItem != 'row 3'}" />
+
+ </rich:list>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2011-04-06
13:15:36 UTC (rev 22380)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2011-04-06
13:16:26 UTC (rev 22381)
@@ -89,13 +89,14 @@
protected TextRetriever retrieveStatusChecker =
retrieveText.locator(jq("#statusCheckerOutput"));
protected PhaseInfo phaseInfo = new PhaseInfo();
protected LocatorReference<JQueryLocator> attributesRoot = new
LocatorReference<JQueryLocator>(
- pjq("span[id$=:attributes:panel]"));
+ pjq("span[id$=:attributes:panel]"));
/**
* timeout in miliseconds
*/
public static final long TIMEOUT = 5000;
@Inject
- @Templates({ "plain", "richDataTable", "a4jRepeat",
"hDataTable", "uiRepeat" })
+ @Templates({"plain", "richDataTable",
"richCollapsibleSubTable", "richExtendedDataTable",
"richDataGrid", "richList",
+ "a4jRepeat", "hDataTable", "uiRepeat"})
private TemplatesList template;
/**
@@ -204,7 +205,7 @@
selenium.fireEvent(element, event);
waitGui.failWith("Attribute on" + attributeName + " does not work
correctly").until(
- new EventFiredCondition(event));
+ new EventFiredCondition(event));
}
/**
@@ -279,9 +280,9 @@
public void testRequestEventsAfter(String... events) {
String[] actualEvents = selenium.getEval(new
JavaScript("window.metamerEvents")).split(" ");
assertEquals(
- actualEvents,
- events,
- format("The events ({0}) don't came in right order ({1})",
Arrays.deepToString(actualEvents),
+ actualEvents,
+ events,
+ format("The events ({0}) don't came in right order ({1})",
Arrays.deepToString(actualEvents),
Arrays.deepToString(events)));
}
@@ -297,9 +298,9 @@
String[] actualEvents = list.toArray(new String[list.size()]);
assertEquals(
- actualEvents,
- events,
- format("The events ({0}) don't came in right order ({1})",
Arrays.deepToString(actualEvents),
+ actualEvents,
+ events,
+ format("The events ({0}) don't came in right order ({1})",
Arrays.deepToString(actualEvents),
Arrays.deepToString(events)));
}
@@ -398,7 +399,7 @@
selenium.waitForPageToLoad();
assertTrue(selenium.getAttribute(attr).contains(value), "Attribute " +
attribute + " should contain \"" + value
- + "\".");
+ + "\".");
}
/**