Author: ppitonak(a)redhat.com
Date: 2010-03-31 04:21:38 -0400 (Wed, 31 Mar 2010)
New Revision: 16688
Added:
branches/community/3.3.X/test-applications/regression-test/src/main/java/org/
branches/community/3.3.X/test-applications/regression-test/src/main/java/org/richfaces/
branches/community/3.3.X/test-applications/regression-test/src/main/java/org/richfaces/regressiontest/
branches/community/3.3.X/test-applications/regression-test/src/main/java/org/richfaces/regressiontest/rf8212/
branches/community/3.3.X/test-applications/regression-test/src/main/java/org/richfaces/regressiontest/rf8212/Capital.java
branches/community/3.3.X/test-applications/regression-test/src/main/java/org/richfaces/regressiontest/rf8212/CapitalData.java
branches/community/3.3.X/test-applications/regression-test/src/main/java/org/richfaces/regressiontest/rf8212/ExtendedTableBean.java
branches/community/3.3.X/test-applications/regression-test/src/main/java/org/richfaces/regressiontest/rf8212/ExtendedTableBean2.java
branches/community/3.3.X/test-applications/regression-test/src/main/webapp/pages/rf8212.xhtml
Modified:
branches/community/3.3.X/test-applications/regression-test/src/main/webapp/WEB-INF/faces-config.xml
branches/community/3.3.X/test-applications/regression-test/src/main/webapp/WEB-INF/web.xml
branches/community/3.3.X/test-applications/regression-test/src/main/webapp/pages/index.xhtml
Log:
https://jira.jboss.org/jira/browse/RFPL-511
test case for RF-8212 (keyboard navigation in Extended Data Table)
Added:
branches/community/3.3.X/test-applications/regression-test/src/main/java/org/richfaces/regressiontest/rf8212/Capital.java
===================================================================
---
branches/community/3.3.X/test-applications/regression-test/src/main/java/org/richfaces/regressiontest/rf8212/Capital.java
(rev 0)
+++
branches/community/3.3.X/test-applications/regression-test/src/main/java/org/richfaces/regressiontest/rf8212/Capital.java 2010-03-31
08:21:38 UTC (rev 16688)
@@ -0,0 +1,59 @@
+package org.richfaces.regressiontest.rf8212;
+
+import java.io.Serializable;
+
+/**
+ * @author Ilya Shaikovsky
+ */
+public class Capital implements Serializable {
+
+ private static final long serialVersionUID = -1042449580199397136L;
+ private boolean checked=false;
+ private String name;
+ private String state;
+ private String timeZone;
+ private CapitalData data;
+
+ public CapitalData getData() {
+ return data;
+ }
+ public void setData(CapitalData data) {
+ this.data = data;
+ }
+ private final static String FILE_EXT = ".gif";
+ public Capital() {
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public String getState() {
+ return state;
+ }
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ private String stateNameToFileName() {
+ return state.replaceAll("\\s", "").toLowerCase();
+ }
+
+ public String getStateFlag() {
+ return "/images/capitals/" + stateNameToFileName() + FILE_EXT;
+ }
+
+ public String getTimeZone() {
+ return timeZone;
+ }
+ public void setTimeZone(String timeZone) {
+ this.timeZone = timeZone;
+ }
+ public boolean isChecked() {
+ return checked;
+ }
+ public void setChecked(boolean checked) {
+ this.checked = checked;
+ }
+}
Property changes on:
branches/community/3.3.X/test-applications/regression-test/src/main/java/org/richfaces/regressiontest/rf8212/Capital.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added:
branches/community/3.3.X/test-applications/regression-test/src/main/java/org/richfaces/regressiontest/rf8212/CapitalData.java
===================================================================
---
branches/community/3.3.X/test-applications/regression-test/src/main/java/org/richfaces/regressiontest/rf8212/CapitalData.java
(rev 0)
+++
branches/community/3.3.X/test-applications/regression-test/src/main/java/org/richfaces/regressiontest/rf8212/CapitalData.java 2010-03-31
08:21:38 UTC (rev 16688)
@@ -0,0 +1,23 @@
+package org.richfaces.regressiontest.rf8212;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Ilya Shaikovsky
+ */
+public class CapitalData implements Serializable {
+
+ private static final long serialVersionUID = -3456988151970108426L;
+ private List<String> items = new ArrayList<String>();
+
+ public void addItem(String item) {
+ items.add(item);
+ }
+
+ public List<String> getItems() {
+ return items;
+ }
+
+}
Property changes on:
branches/community/3.3.X/test-applications/regression-test/src/main/java/org/richfaces/regressiontest/rf8212/CapitalData.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
branches/community/3.3.X/test-applications/regression-test/src/main/java/org/richfaces/regressiontest/rf8212/ExtendedTableBean.java
===================================================================
---
branches/community/3.3.X/test-applications/regression-test/src/main/java/org/richfaces/regressiontest/rf8212/ExtendedTableBean.java
(rev 0)
+++
branches/community/3.3.X/test-applications/regression-test/src/main/java/org/richfaces/regressiontest/rf8212/ExtendedTableBean.java 2010-03-31
08:21:38 UTC (rev 16688)
@@ -0,0 +1,123 @@
+package org.richfaces.regressiontest.rf8212;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.richfaces.model.DataProvider;
+import org.richfaces.model.ExtendedTableDataModel;
+import org.richfaces.model.selection.Selection;
+import org.richfaces.model.selection.SimpleSelection;
+
+/**
+ * @author Ilya Shaikovsky, Pavol Pitonak
+ */
+public class ExtendedTableBean {
+ private String sortMode="single";
+ private String selectionMode="multi";
+ private Object tableState;
+ private Selection selection = new SimpleSelection();
+ private List<Capital> capitals = new ArrayList<Capital>();
+ private ExtendedTableDataModel<Capital> dataModel;
+ private List<Capital> selectedCapitals = new ArrayList<Capital>();
+
+ public String getSortMode() {
+ return sortMode;
+ }
+
+ public void setSortMode(String sortMode) {
+ this.sortMode = sortMode;
+ }
+
+ public String getSelectionMode() {
+ return selectionMode;
+ }
+
+ public void setSelectionMode(String selectionMode) {
+ this.selectionMode = selectionMode;
+ }
+
+ public ExtendedTableBean() {
+
+ for (char charr = 'a'; charr <= 'z'; charr++) {
+ Capital c = new Capital();
+ c.setName("name " + charr + charr + charr);
+ c.setState("state " + charr + charr + charr);
+ capitals.add(c);
+ }
+
+
+
+ }
+
+ public void takeSelection(){
+ selectedCapitals.clear();
+ Iterator<Object> iterator = getSelection().getKeys();
+ while (iterator.hasNext()) {
+ Object key = iterator.next();
+ selectedCapitals.add(getCapitalsDataModel().getObjectByKey(key));
+ }
+ }
+
+ public ExtendedTableDataModel<Capital> getCapitalsDataModel() {
+ if (dataModel == null) {
+ dataModel = new ExtendedTableDataModel<Capital>(new
DataProvider<Capital>(){
+
+ private static final long serialVersionUID = 5054087821033164847L;
+
+ public Capital getItemByKey(Object key) {
+ for(Capital c : capitals){
+ if (key.equals(getKey(c))){
+ return c;
+ }
+ }
+ return null;
+ }
+
+ public List<Capital> getItemsByRange(int firstRow, int endRow) {
+ return capitals.subList(firstRow, endRow);
+ }
+
+ public Object getKey(Capital item) {
+ return item.getName();
+ }
+
+ public int getRowCount() {
+ return capitals.size();
+ }
+
+ });
+
+ }
+ return dataModel;
+ }
+
+ public void setCapitals(List<Capital> capitals) {
+ this.capitals = capitals;
+ }
+
+ public Object getTableState() {
+ return tableState;
+ }
+
+ public void setTableState(Object tableState) {
+ this.tableState = tableState;
+ }
+
+ public Selection getSelection() {
+ return selection;
+ }
+
+ public void setSelection(Selection selection) {
+ this.selection = selection;
+ }
+
+ public List<Capital> getSelectedCapitals() {
+ return selectedCapitals;
+ }
+
+ public void setSelectedCapitals(List<Capital> selectedCapitals) {
+ this.selectedCapitals = selectedCapitals;
+ }
+
+}
Property changes on:
branches/community/3.3.X/test-applications/regression-test/src/main/java/org/richfaces/regressiontest/rf8212/ExtendedTableBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
branches/community/3.3.X/test-applications/regression-test/src/main/java/org/richfaces/regressiontest/rf8212/ExtendedTableBean2.java
===================================================================
---
branches/community/3.3.X/test-applications/regression-test/src/main/java/org/richfaces/regressiontest/rf8212/ExtendedTableBean2.java
(rev 0)
+++
branches/community/3.3.X/test-applications/regression-test/src/main/java/org/richfaces/regressiontest/rf8212/ExtendedTableBean2.java 2010-03-31
08:21:38 UTC (rev 16688)
@@ -0,0 +1,127 @@
+/**
+ *
+ */
+package org.richfaces.regressiontest.rf8212;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.richfaces.model.DataProvider;
+import org.richfaces.model.ExtendedTableDataModel;
+import org.richfaces.model.selection.Selection;
+import org.richfaces.model.selection.SimpleSelection;
+
+/**
+ * @author Ilya Shaikovsky, Pavol Pitonak
+ *
+ */
+public class ExtendedTableBean2 {
+ private String sortMode="single";
+ private String selectionMode="none";
+ private Object tableState;
+ private Selection selection = new SimpleSelection();
+ private List<Capital> capitals = new ArrayList<Capital>();
+ private ExtendedTableDataModel<Capital> dataModel;
+ private List<Capital> selectedCapitals = new ArrayList<Capital>();
+
+ public String getSortMode() {
+ return sortMode;
+ }
+
+ public void setSortMode(String sortMode) {
+ this.sortMode = sortMode;
+ }
+
+ public String getSelectionMode() {
+ return selectionMode;
+ }
+
+ public void setSelectionMode(String selectionMode) {
+ this.selectionMode = selectionMode;
+ }
+
+ public ExtendedTableBean2() {
+
+ for (char charr = 'a'; charr <= 'z'; charr++) {
+ Capital c = new Capital();
+ c.setName("name " + charr + charr + charr);
+ c.setState("state " + charr + charr + charr);
+ capitals.add(c);
+ }
+
+
+
+ }
+
+ public void takeSelection(){
+ selectedCapitals.clear();
+ Iterator<Object> iterator = getSelection().getKeys();
+ while (iterator.hasNext()) {
+ Object key = iterator.next();
+ selectedCapitals.add(getCapitalsDataModel().getObjectByKey(key));
+ }
+ }
+
+ public ExtendedTableDataModel<Capital> getCapitalsDataModel() {
+ if (dataModel == null) {
+ dataModel = new ExtendedTableDataModel<Capital>(new
DataProvider<Capital>(){
+
+ private static final long serialVersionUID = 5054087821033164847L;
+
+ public Capital getItemByKey(Object key) {
+ for(Capital c : capitals){
+ if (key.equals(getKey(c))){
+ return c;
+ }
+ }
+ return null;
+ }
+
+ public List<Capital> getItemsByRange(int firstRow, int endRow) {
+ return capitals.subList(firstRow, endRow);
+ }
+
+ public Object getKey(Capital item) {
+ return item.getName();
+ }
+
+ public int getRowCount() {
+ return capitals.size();
+ }
+
+ });
+
+ }
+ return dataModel;
+ }
+
+ public void setCapitals(List<Capital> capitals) {
+ this.capitals = capitals;
+ }
+
+ public Object getTableState() {
+ return tableState;
+ }
+
+ public void setTableState(Object tableState) {
+ this.tableState = tableState;
+ }
+
+ public Selection getSelection() {
+ return selection;
+ }
+
+ public void setSelection(Selection selection) {
+ this.selection = selection;
+ }
+
+ public List<Capital> getSelectedCapitals() {
+ return selectedCapitals;
+ }
+
+ public void setSelectedCapitals(List<Capital> selectedCapitals) {
+ this.selectedCapitals = selectedCapitals;
+ }
+
+}
Property changes on:
branches/community/3.3.X/test-applications/regression-test/src/main/java/org/richfaces/regressiontest/rf8212/ExtendedTableBean2.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
branches/community/3.3.X/test-applications/regression-test/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
---
branches/community/3.3.X/test-applications/regression-test/src/main/webapp/WEB-INF/faces-config.xml 2010-03-31
00:11:47 UTC (rev 16687)
+++
branches/community/3.3.X/test-applications/regression-test/src/main/webapp/WEB-INF/faces-config.xml 2010-03-31
08:21:38 UTC (rev 16688)
@@ -1,20 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
-<faces-config version="1.2"
xmlns="http://java.sun.com/xml/ns/javaee"
-
xmlns:xi="http://www.w3.org/2001/XInclude"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
- <managed-bean>
- <managed-bean-name>gameBean</managed-bean-name>
-
<managed-bean-class>org.jboss.richfaces.samples.tictactoe.GameBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
- <navigation-rule>
- <from-view-id>/pages/*</from-view-id>
- <navigation-case>
- <from-outcome>index</from-outcome>
- <to-view-id>/pages/index.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <application>
- <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
- </application>
+<faces-config version="1.2"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xi="http://www.w3.org/2001/XInclude"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+ <managed-bean>
+ <managed-bean-name>extendedTableBean</managed-bean-name>
+
<managed-bean-class>org.richfaces.regressiontest.rf8212.ExtendedTableBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>extendedTableBean2</managed-bean-name>
+
<managed-bean-class>org.richfaces.regressiontest.rf8212.ExtendedTableBean2</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <navigation-rule>
+ <from-view-id>/pages/*</from-view-id>
+ <navigation-case>
+ <from-outcome>index</from-outcome>
+ <to-view-id>/pages/index.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <application>
+ <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+ </application>
</faces-config>
Modified:
branches/community/3.3.X/test-applications/regression-test/src/main/webapp/WEB-INF/web.xml
===================================================================
---
branches/community/3.3.X/test-applications/regression-test/src/main/webapp/WEB-INF/web.xml 2010-03-31
00:11:47 UTC (rev 16687)
+++
branches/community/3.3.X/test-applications/regression-test/src/main/webapp/WEB-INF/web.xml 2010-03-31
08:21:38 UTC (rev 16688)
@@ -1,61 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
-<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
- <display-name>Tic Tac Toe</display-name>
- <context-param>
- <param-name>javax.faces.CONFIG_FILES</param-name>
- <param-value>/WEB-INF/faces-config.xml</param-value>
- </context-param>
- <context-param>
- <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
- <param-value>server</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.VIEW_MAPPINGS</param-name>
- <param-value>*.xhtml</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.SKIN</param-name>
- <param-value>DEFAULT</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.CONTROL_SKINNING</param-name>
- <param-value>enable</param-value>
- </context-param>
- <context-param>
- <param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>
- <param-value>true</param-value>
- </context-param>
- <filter>
- <display-name>RichFaces Filter</display-name>
- <filter-name>richfaces</filter-name>
- <filter-class>org.ajax4jsf.Filter</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>richfaces</filter-name>
- <servlet-name>Faces Servlet</servlet-name>
- <dispatcher>REQUEST</dispatcher>
- <dispatcher>FORWARD</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>/faces/*</url-pattern>
- </servlet-mapping>
- <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>
+<web-app
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
+ <display-name>Tic Tac Toe</display-name>
+ <context-param>
+ <param-name>javax.faces.CONFIG_FILES</param-name>
+ <param-value>/WEB-INF/faces-config.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</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.VIEW_MAPPINGS</param-name>
+ <param-value>*.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.SKIN</param-name>
+ <param-value>DEFAULT</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.CONTROL_SKINNING</param-name>
+ <param-value>enable</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <filter>
+ <display-name>RichFaces Filter</display-name>
+ <filter-name>richfaces</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>richfaces</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>FORWARD</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>/faces/*</url-pattern>
+ </servlet-mapping>
+ <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>
\ No newline at end of file
Modified:
branches/community/3.3.X/test-applications/regression-test/src/main/webapp/pages/index.xhtml
===================================================================
---
branches/community/3.3.X/test-applications/regression-test/src/main/webapp/pages/index.xhtml 2010-03-31
00:11:47 UTC (rev 16687)
+++
branches/community/3.3.X/test-applications/regression-test/src/main/webapp/pages/index.xhtml 2010-03-31
08:21:38 UTC (rev 16688)
@@ -25,9 +25,13 @@
<td><a id="rf7994-jira"
href="https://jira.jboss.org/jira/browse/RF-7994">https://ji...
</tr>
<tr>
- <td><a id="rf8356-tc"
href="/regression-test/pages/rf8356.jsf">Items inside
menu</a></td>
- <td><a id="rf8356-jira"
href="https://jira.jboss.org/jira/browse/RF-8356">https://ji...
+ <td><a id="rf8212-tc"
href="/regression-test/pages/rf8212.jsf">Extended Data
Table</a></td>
+ <td><a id="rf8212-jira"
href="https://jira.jboss.org/jira/browse/RF-8212">https://ji...
</tr>
+ <tr>
+ <td><a id="rf8356-tc"
href="/regression-test/pages/rf8356.jsf">Items inside
menu</a></td>
+ <td><a id="rf8356-jira"
href="https://jira.jboss.org/jira/browse/RF-8356">https://ji...
+ </tr>
</table>
</h:form>
</ui:define>
Added:
branches/community/3.3.X/test-applications/regression-test/src/main/webapp/pages/rf8212.xhtml
===================================================================
---
branches/community/3.3.X/test-applications/regression-test/src/main/webapp/pages/rf8212.xhtml
(rev 0)
+++
branches/community/3.3.X/test-applications/regression-test/src/main/webapp/pages/rf8212.xhtml 2010-03-31
08:21:38 UTC (rev 16688)
@@ -0,0 +1,165 @@
+<!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"
+
xmlns:a4j="http://richfaces.org/a4j">
+
+<body>
+<ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="title">Extended Data Table -
RF-8212</ui:define>
+
+ <ui:define name="body">
+ <h1>Extended Data Table</h1>
+ <h3><a
href="https://jira.jboss.org/jira/browse/RF-8212">https://ji...
+
+
+ <a id="back1"
href="#{facesContext.externalContext.requestContextPath}">Back to main
page</a>
+
+
+ <h:form>
+
+
+ <fieldset><legend>Extended DataTable example 1</legend>
+
+ <h:panelGrid columns="2">
+ <rich:extendedDataTable
value="#{extendedTableBean.capitalsDataModel}" var="cap"
id="table1"
+ width="580px" height="400px"
sortMode="#{extendedTableBean.sortMode}"
+ selectionMode="#{extendedTableBean.selectionMode}"
tableState="#{extendedTableBean.tableState}"
+ selection="#{extendedTableBean.selection}">
+ <rich:column sortable="true"
sortBy="#{cap.state}" id="col1_1" filterBy="#{cap.state}"
+ filterEvent="onkeyup" width="170px"
label="State Name">
+ <f:facet name="header">
+ <h:outputText value="State Name"
id="stateName1" />
+ </f:facet>
+ <h:outputText value="#{cap.state}"
id="capState" />
+ </rich:column>
+ <rich:column sortable="true"
sortBy="#{cap.name}" id="col2_1" filterBy="#{cap.name}"
+ filterEvent="onkeyup" width="170px"
label="State Capital">
+ <f:facet name="header">
+ <h:outputText value="State Capital"
id="stateCapital1" />
+ </f:facet>
+ <h:outputText value="#{cap.name}"
id="capName1" />
+ </rich:column>
+ <a4j:support reRender="table2"
id="extendedTableBeanTakeSelection"
+ action="#{extendedTableBean.takeSelection}"
event="onselectionchange" />
+ </rich:extendedDataTable>
+ <h:panelGroup layout="block"
style="width:250px">
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Sort/Selection modes
changing" />
+ </f:facet>
+ <h:panelGrid columns="2">
+ <h:outputText value="Sort Mode:" />
+ <h:selectOneMenu
value="#{extendedTableBean.sortMode}">
+ <f:selectItem itemLabel="Single"
itemValue="single" />
+ <f:selectItem itemLabel="Multi"
itemValue="multi" />
+ <a4j:support event="onchange"
ajaxSingle="true" reRender="table1"
+ id="supportSortOnchange1" />
+ </h:selectOneMenu>
+ <h:outputText value="Selection Mode:" />
+ <h:selectOneMenu
value="#{extendedTableBean.selectionMode}">
+ <a4j:support ajaxSingle="true"
event="onchange" reRender="table1"
+ id="supportSelectOnchange1" />
+ <f:selectItem itemLabel="Single"
itemValue="single" />
+ <f:selectItem itemLabel="Multi"
itemValue="multi" />
+ <f:selectItem itemLabel="None"
itemValue="none" />
+ </h:selectOneMenu>
+ </h:panelGrid>
+ </rich:panel>
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Currently selected rows:"
/>
+ </f:facet>
+ <rich:dataTable
value="#{extendedTableBean.selectedCapitals}" var="sel"
id="selectionTable1">
+ <rich:column>
+ <h:outputText value="#{sel.state}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{sel.name}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{sel.timeZone}" />
+ </rich:column>
+ </rich:dataTable>
+ </rich:panel>
+ </h:panelGroup>
+ </h:panelGrid>
+ </fieldset>
+ <rich:spacer height="20" />
+
+
+
+ <fieldset><legend>Extended Data Table example 2 -
none</legend> <h:panelGrid columns="2"
+ columnClasses="top , top">
+ <rich:extendedDataTable
value="#{extendedTableBean2.capitalsDataModel}" var="cap"
id="table2"
+ width="580px" height="400px"
sortMode="#{extendedTableBean2.sortMode}"
+ selectionMode="#{extendedTableBean2.selectionMode}"
tableState="#{extendedTableBean2.tableState}"
+ selection="#{extendedTableBean2.selection}">
+ <rich:column sortable="true"
sortBy="#{cap.state}" id="col1_2" filterBy="#{cap.state}"
+ filterEvent="onkeyup" width="170px"
label="State Name">
+ <f:facet name="header">
+ <h:outputText value="State Name"
id="stateName2" />
+ </f:facet>
+ <h:outputText value="#{cap.state}"
id="capState2" />
+ </rich:column>
+ <rich:column sortable="true"
sortBy="#{cap.name}" id="col2_2" filterBy="#{cap.name}"
+ filterEvent="onkeyup" width="170px"
label="State Capital">
+ <f:facet name="header">
+ <h:outputText value="State Capital"
id="stateCapital2" />
+ </f:facet>
+ <h:outputText value="#{cap.name}"
id="capName2" />
+ </rich:column>
+ </rich:extendedDataTable>
+ <h:panelGroup layout="block"
style="width:250px">
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Sort/Selection modes
changing" />
+ </f:facet>
+ <h:panelGrid columns="2">
+ <h:outputText value="Sort Mode:" />
+ <h:selectOneMenu
value="#{extendedTableBean2.sortMode}">
+ <f:selectItem itemLabel="Single"
itemValue="single" />
+ <f:selectItem itemLabel="Multi"
itemValue="multi" />
+ <a4j:support event="onchange"
ajaxSingle="true" reRender="table2"
+ id="supportSortOnchange2" />
+ </h:selectOneMenu>
+ <h:outputText value="Selection Mode:" />
+ <h:selectOneMenu
value="#{extendedTableBean2.selectionMode}">
+ <a4j:support ajaxSingle="true"
event="onchange" reRender="table2"
+ id="supportSelectOnchange2" />
+ <f:selectItem itemLabel="Single"
itemValue="single" />
+ <f:selectItem itemLabel="Multi"
itemValue="multi" />
+ <f:selectItem itemLabel="None"
itemValue="none" />
+ </h:selectOneMenu>
+ </h:panelGrid>
+ </rich:panel>
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Currently selected rows:"
/>
+ </f:facet>
+ <rich:dataTable
value="#{extendedTableBean2.selectedCapitals}" var="sel"
id="selectionTable2">
+ <rich:column>
+ <h:graphicImage value="#{sel.stateFlag}"
/>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{sel.state}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{sel.name}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{sel.timeZone}" />
+ </rich:column>
+ </rich:dataTable>
+ </rich:panel>
+ </h:panelGroup>
+ </h:panelGrid></fieldset>
+
+ </h:form>
+ <a id="back2"
href="#{facesContext.externalContext.requestContextPath}">Back to main
page</a>
+
+ </ui:define>
+
+</ui:composition>
+</body>
+</html>
Property changes on:
branches/community/3.3.X/test-applications/regression-test/src/main/webapp/pages/rf8212.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain