Author: ppitonak(a)redhat.com
Date: 2011-08-16 08:24:43 -0400 (Tue, 16 Aug 2011)
New Revision: 22633
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/filtering.xhtml
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTableToggler/TestCollapsibleSubTableToggler.java
Log:
sample for rich:collapsibleSubTable reformatted
added issue tracking info to a4j:outputPanel test
locator fixed in sub table
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/filtering.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/filtering.xhtml 2011-08-16
11:43:57 UTC (rev 22632)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/filtering.xhtml 2011-08-16
12:24:43 UTC (rev 22633)
@@ -1,10 +1,11 @@
<?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"
xmlns:fn="http://java.sun.com/jsp/jstl/functions">
+
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"
+
xmlns:fn="http://java.sun.com/jsp/jstl/functions">
- <!--
+<!--
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
@@ -26,115 +27,115 @@
02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-->
- <ui:composition template="/templates/template.xhtml">
+<ui:composition template="/templates/template.xhtml">
- <ui:define name="view">
- <f:metadata>
- <f:viewParam name="templates"
value="#{templateBean.templates}">
- <f:converter converterId="templatesListConverter" />
- </f:viewParam>
- </f:metadata>
- </ui:define>
+ <ui:define name="view">
+ <f:metadata>
+ <f:viewParam name="templates"
value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
- <ui:define name="outOfTemplateBefore">
- <br/>
- <h:outputText value="Show data in table: " />
- <h:selectBooleanCheckbox id="noDataCheckbox"
value="#{richSubTableBean.state}">
- <a4j:ajax render="richDataTable"/>
- </h:selectBooleanCheckbox>
- <br/><br/>
- </ui:define>
+ <ui:define name="outOfTemplateBefore">
+ <br />
+ <h:outputText value="Show data in table: " />
+ <h:selectBooleanCheckbox id="noDataCheckbox"
value="#{richSubTableBean.state}">
+ <a4j:ajax render="richDataTable" />
+ </h:selectBooleanCheckbox>
+ <br />
+ <br />
+ </ui:define>
- <ui:define name="component">
+ <ui:define name="component">
- <rich:dataTable id="richDataTable"
value="#{richSubTableBean.lists}" var="list"
keepSaved="true">
- <f:facet name="header">
- <rich:columnGroup id="columnGroup">
- <rich:column id="columnHeaderEmployees"
colspan="3">
- <h:outputText id="columnHeaderEmployeesText"
value="Employees" />
- </rich:column>
- <rich:column id="columnHeaderName"
breakRowBefore="true">
- <h:outputText id="columnHeaderNameText"
value="Name" />
- <br/>
- <h:outputText id="columnHeaderNameType"
value="(expression contains ignore case)" />
- <br/>
- <h:inputText id="columnHeaderNameInput"
value="#{richSubTableBean.filtering['name']}">
- <a4j:ajax render="commonGrid"
event="change"/>
- </h:inputText>
- </rich:column>
- <rich:column id="columnHeaderTitle">
- <h:outputText id="columnHeaderTitleText"
value="Title" />
- <br/>
- <h:outputText id="columnHeaderTitleType"
value="(expression equals)" />
- <br/>
- <h:inputText id="columnHeaderTitleInput"
value="#{richSubTableBean.filtering['title']}">
- <a4j:ajax render="commonGrid"
event="change"/>
- </h:inputText>
- </rich:column>
- <rich:column id="columnHeaderBirthdate">
- <h:outputText id="columnHeaderBirthdateText"
value="Birthdate" />
- </rich:column>
- </rich:columnGroup>
- </f:facet>
-
- <rich:column id="columnSubTable" colspan="3">
- <rich:collapsibleSubTableToggler id="subTableTC"
for="richSubTable"/>
- <h:outputText value="#{list[0].sex == 'MALE' ?
'Men' : 'Women'}" />
- </rich:column>
-
- <rich:collapsibleSubTable id="richSubTable"
-
expanded="#{richSubTableBean.expanded[list]}"
-
expandMode="#{richSubTableBean.attributes['expandMode'].value}"
-
filterVar="#{richSubTableBean.attributes['filterVar'].value}"
-
first="#{richSubTableBean.attributes['first'].value}"
-
iterationStatusVar="#{richSubTableBean.attributes['iterationStatusVar'].value}"
-
keepSaved="#{richSubTableBean.attributes['keepSaved'].value}"
-
noDataLabel="#{richSubTableBean.attributes['noDataLabel'].value}"
-
onrowclick="#{richSubTableBean.attributes['onrowclick'].value}"
-
onrowdblclick="#{richSubTableBean.attributes['onrowdblclick'].value}"
-
onrowkeydown="#{richSubTableBean.attributes['onrowkeydown'].value}"
-
onrowkeypress="#{richSubTableBean.attributes['onrowkeypress'].value}"
-
onrowkeyup="#{richSubTableBean.attributes['onrowkeyup'].value}"
-
onrowmousedown="#{richSubTableBean.attributes['onrowmousedown'].value}"
-
onrowmousemove="#{richSubTableBean.attributes['onrowmousemove'].value}"
-
onrowmouseout="#{richSubTableBean.attributes['onrowmouseout'].value}"
-
onrowmouseover="#{richSubTableBean.attributes['onrowmouseover'].value}"
-
onrowmouseup="#{richSubTableBean.attributes['onrowmouseup'].value}"
-
rendered="#{richSubTableBean.attributes['rendered'].value}"
-
rowKeyConverter="#{richSubTableBean.attributes['rowKeyConverter'].value}"
-
rows="#{richSubTableBean.attributes['rows'].value}"
-
sortMode="#{richSubTableBean.attributes['sortMode'].value}"
-
sortPriority="#{richSubTableBean.attributes['sortPriority'].value}"
-
columnClasses="#{richSubTableBean.attributes['columnClasses'].value}"
-
footerClass="#{richSubTableBean.attributes['footerClass'].value}"
-
headerClass="#{richSubTableBean.attributes['headerClass'].value}"
-
rowClass="#{richSubTableBean.attributes['rowClass'].value}"
-
rowClasses="#{richSubTableBean.attributes['rowClasses'].value}"
-
style="#{richSubTableBean.attributes['style'].value}"
-
styleClass="#{richSubTableBean.attributes['styleClass'].value}"
- value="#{richSubTableBean.state ? list :
null}"
- var="item">
-
- <rich:column id="columnName"
filterExpression="#{fn:containsIgnoreCase(item.name,
richSubTableBean.filtering['name'])}">
- <h:outputText id="name"
value="#{item.name}" />
+ <rich:dataTable id="richDataTable"
value="#{richSubTableBean.lists}" var="list"
keepSaved="true">
+ <f:facet name="header">
+ <rich:columnGroup id="columnGroup">
+ <rich:column id="columnHeaderEmployees"
colspan="3">
+ <h:outputText id="columnHeaderEmployeesText"
value="Employees" />
</rich:column>
- <rich:column id="columnTitle"
filterExpression="#{richSubTableBean.filtering['title'] == null ||
richSubTableBean.filtering['title'] == '' || item.title ==
richSubTableBean.filtering['title']}">
- <h:outputText id="title"
value="#{item.title}" />
+ <rich:column id="columnHeaderName"
breakRowBefore="true">
+ <h:outputText id="columnHeaderNameText"
value="Name" />
+ <br />
+ <h:outputText id="columnHeaderNameType"
value="(expression contains ignore case)" />
+ <br />
+ <h:inputText id="columnHeaderNameInput"
value="#{richSubTableBean.filtering['name']}">
+ <a4j:ajax execute="columnHeaderNameInput"
render="richDataTable" event="change" />
+ </h:inputText>
</rich:column>
- <rich:column id="columnBirthdate">
- <h:outputText id="birthdate"
value="#{item.birthdate}">
- <f:convertDateTime pattern="d MMM yyyy"/>
- </h:outputText>
+ <rich:column id="columnHeaderTitle">
+ <h:outputText id="columnHeaderTitleText"
value="Title" />
+ <br />
+ <h:outputText id="columnHeaderTitleType"
value="(expression equals)" />
+ <br />
+ <h:inputText id="columnHeaderTitleInput"
value="#{richSubTableBean.filtering['title']}">
+ <a4j:ajax execute="columnHeaderTitleInput"
render="richDataTable" event="change" />
+ </h:inputText>
</rich:column>
+ <rich:column id="columnHeaderBirthdate">
+ <h:outputText id="columnHeaderBirthdateText"
value="Birthdate" />
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
- </rich:collapsibleSubTable>
- </rich:dataTable>
+ <rich:column id="columnSubTable" colspan="3">
+ <rich:collapsibleSubTableToggler id="subTableTC"
for="richSubTable" />
+ <h:outputText value="#{list[0].sex == 'MALE' ?
'Men' : 'Women'}" />
+ </rich:column>
- </ui:define>
+ <rich:collapsibleSubTable id="richSubTable"
expanded="#{richSubTableBean.expanded[list]}"
+
expandMode="#{richSubTableBean.attributes['expandMode'].value}"
+
filterVar="#{richSubTableBean.attributes['filterVar'].value}"
+ first="#{richSubTableBean.attributes['first'].value}"
+
iterationStatusVar="#{richSubTableBean.attributes['iterationStatusVar'].value}"
+
keepSaved="#{richSubTableBean.attributes['keepSaved'].value}"
+
noDataLabel="#{richSubTableBean.attributes['noDataLabel'].value}"
+
onrowclick="#{richSubTableBean.attributes['onrowclick'].value}"
+
onrowdblclick="#{richSubTableBean.attributes['onrowdblclick'].value}"
+
onrowkeydown="#{richSubTableBean.attributes['onrowkeydown'].value}"
+
onrowkeypress="#{richSubTableBean.attributes['onrowkeypress'].value}"
+
onrowkeyup="#{richSubTableBean.attributes['onrowkeyup'].value}"
+
onrowmousedown="#{richSubTableBean.attributes['onrowmousedown'].value}"
+
onrowmousemove="#{richSubTableBean.attributes['onrowmousemove'].value}"
+
onrowmouseout="#{richSubTableBean.attributes['onrowmouseout'].value}"
+
onrowmouseover="#{richSubTableBean.attributes['onrowmouseover'].value}"
+
onrowmouseup="#{richSubTableBean.attributes['onrowmouseup'].value}"
+
rendered="#{richSubTableBean.attributes['rendered'].value}"
+
rowKeyConverter="#{richSubTableBean.attributes['rowKeyConverter'].value}"
+ rows="#{richSubTableBean.attributes['rows'].value}"
sortMode="#{richSubTableBean.attributes['sortMode'].value}"
+
sortPriority="#{richSubTableBean.attributes['sortPriority'].value}"
+
columnClasses="#{richSubTableBean.attributes['columnClasses'].value}"
+
footerClass="#{richSubTableBean.attributes['footerClass'].value}"
+
headerClass="#{richSubTableBean.attributes['headerClass'].value}"
+
rowClass="#{richSubTableBean.attributes['rowClass'].value}"
+
rowClasses="#{richSubTableBean.attributes['rowClasses'].value}"
+ style="#{richSubTableBean.attributes['style'].value}"
+
styleClass="#{richSubTableBean.attributes['styleClass'].value}"
value="#{richSubTableBean.state ? list : null}"
+ var="item">
- <ui:define name="outOfTemplateAfter">
- <metamer:attributes value="#{richSubTableBean.attributes}"
id="attributes" />
- </ui:define>
+ <rich:column id="columnName"
+ filterExpression="#{fn:containsIgnoreCase(item.name,
richSubTableBean.filtering['name'])}">
+ <h:outputText id="name" value="#{item.name}"
/>
+ </rich:column>
+ <rich:column id="columnTitle"
+ filterExpression="#{richSubTableBean.filtering['title']
== null || richSubTableBean.filtering['title'] == '' || item.title ==
richSubTableBean.filtering['title']}">
+ <h:outputText id="title" value="#{item.title}"
/>
+ </rich:column>
+ <rich:column id="columnBirthdate">
+ <h:outputText id="birthdate"
value="#{item.birthdate}">
+ <f:convertDateTime pattern="d MMM yyyy" />
+ </h:outputText>
+ </rich:column>
- </ui:composition>
+ </rich:collapsibleSubTable>
+ </rich:dataTable>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richSubTableBean.attributes}"
id="attributes" />
+ </ui:define>
+
+</ui:composition>
</html>
\ No newline at end of file
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java 2011-08-16
11:43:57 UTC (rev 22632)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java 2011-08-16
12:24:43 UTC (rev 22633)
@@ -87,6 +87,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11312")
public void testClick() {
selenium.click(increaseCounterButton);
waitGui.until(textEquals.locator(outputDiv).text("1"));
@@ -148,6 +149,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-11312")
public void testRendered() {
JQueryLocator renderedInputFalse =
pjq("input[type=radio][name$=renderedInput][value=false]");
JQueryLocator renderedInputTrue =
pjq("input[type=radio][name$=renderedInput][value=true]");
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTableToggler/TestCollapsibleSubTableToggler.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTableToggler/TestCollapsibleSubTableToggler.java 2011-08-16
11:43:57 UTC (rev 22632)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTableToggler/TestCollapsibleSubTableToggler.java 2011-08-16
12:24:43 UTC (rev 22633)
@@ -54,7 +54,7 @@
private static final String LABEL = "Label";
CollapsibleSubTableTogglerAttributes attributes = new
CollapsibleSubTableTogglerAttributes();
- DataTable dataTable = new DataTable(pjq("table.rf-dt"));
+ DataTable dataTable = new
DataTable(pjq("table.rf-dt[id$=richDataTable]"));
JQueryLocator link = jq("a");
JQueryLocator image = jq("img");