JBoss Rich Faces SVN: r12683 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/columns and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2009-02-17 10:17:59 -0500 (Tue, 17 Feb 2009)
New Revision: 12683
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/columns/testColumnsSorting.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ColumnsBean.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ColumnsTest.java
Log:
RF-6099
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ColumnsBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ColumnsBean.java 2009-02-17 12:24:01 UTC (rev 12682)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ColumnsBean.java 2009-02-17 15:17:59 UTC (rev 12683)
@@ -1,11 +1,14 @@
package org.ajax4jsf.bean;
import java.util.ArrayList;
+import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import javax.faces.event.ActionEvent;
+import org.richfaces.model.Ordering;
+
public class ColumnsBean {
static final String ROW_PREFIX = "Row";
@@ -16,6 +19,7 @@
public class Column {
String header;
+ Ordering ordering;
public Column(String header) {
super();
@@ -32,10 +36,24 @@
public void setHeader(String header) {
this.header = header;
}
+
+ public Ordering getOrdering() {
+ return ordering;
+ }
+
+ public void setOrdering(Ordering ordering) {
+ this.ordering = ordering;
+ }
+
}
public class Row {
String input;
+ int value;
+
+ public Row(int i) {
+ this.value = i;
+ }
public String getInput() {
return input;
@@ -44,9 +62,25 @@
public void setInput(String input) {
this.input = input;
}
-
+
+ public int getValue() {
+ return value;
+ }
+
+ public void setValue(int value) {
+ this.value = value;
+ }
+
}
+ Comparator<Row[]> comparator = new Comparator<Row[]>(){
+
+ public int compare(Row[] o1, Row[] o2) {
+ return new Integer(o1[0].value).compareTo(o2[0].value);
+ }
+
+ };
+
private int rows = 2;
private int cols = 3;
@@ -69,7 +103,7 @@
for (int i = 0; i < rows; i++) {
Row[] rows = new Row [cols];
for (int j=0; j<cols; j++) {
- rows[j] = new Row();
+ rows[j] = new Row(i + j);
}
model.add(rows);
}
@@ -121,5 +155,13 @@
this.status = status;
}
+ public Comparator<Row[]> getComparator() {
+ return comparator;
+ }
+
+ public void setComparator(Comparator<Row[]> comparator) {
+ this.comparator = comparator;
+ }
+
}
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/columns/testColumnsSorting.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/columns/testColumnsSorting.xhtml (rev 0)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/columns/testColumnsSorting.xhtml 2009-02-17 15:17:59 UTC (rev 12683)
@@ -0,0 +1,37 @@
+<!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:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<ui:composition template="#{templateBean.template}">
+ <ui:define name="component">
+ <h:form id="_form">
+ <br/><br/>
+ <rich:dataTable id="table" value="#{columnsBean.model}" var="row">
+ <rich:columns id="c#{index}" value="#{columnsBean.columns}" var="column"
+ index="index" sortBy="#{row[index].value}" sortOrder="#{column.ordering}">
+ <f:facet name="header">
+ <h:outputText value="#{column.ordering}"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{row[index].value}" />
+ </rich:columns>
+ </rich:dataTable><br/>
+
+ <rich:dataTable id="table2" value="#{columnsBean.model}" var="row">
+ <rich:columns id="c#{index}" value="#{columnsBean.columns}" var="column"
+ index="index" comparator="#{columnsBean.comparator}" sortOrder="#{column.ordering}">
+ <f:facet name="header">
+ <h:outputText value="#{column.ordering}"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{row[index].value}" />
+ </rich:columns>
+ </rich:dataTable>
+
+ <h:commandButton id="submit" value="Submit"></h:commandButton>
+ </h:form>
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ColumnsTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ColumnsTest.java 2009-02-17 12:24:01 UTC (rev 12682)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ColumnsTest.java 2009-02-17 15:17:59 UTC (rev 12683)
@@ -20,32 +20,37 @@
*/
package org.richfaces.testng;
+import java.util.Arrays;
+
import org.ajax4jsf.template.Template;
import org.richfaces.SeleniumTestBase;
+import org.richfaces.model.Ordering;
import org.testng.Assert;
import org.testng.annotations.Test;
public class ColumnsTest extends SeleniumTestBase {
static final String RESET_METHOD = "#{columnsBean.reset}";
+
+ static final String SORTING_TEST_URL = "pages/columns/testColumnsSorting.xhtml";
- private static final String DATA_TABLE = "table";
+
+ @Test
+ public void testSortingFeature(Template template) {
+ renderPage(SORTING_TEST_URL, template, RESET_METHOD);
+
+ final int columnsCount = 3;
+
+ // Test sorting by sortBy attribute
+ testOrdering(getParentId() + "_form:table", columnsCount);
- private static final String APPLY_BUTTON = "apply";
-
- private static final String RESET_BUTTON = "reset";
-
- private static final String CTRL_FORM = "_controls";
-
- private static final String ROWS_COUNT_CTRL = "rows";
-
- private static final String COLUMNS_COUNT_CTRL = "rows";
-
- private static final String BEGIN_ROW = "begin";
-
- private static final String END_ROW = "end";
+ // Test sorting by comparator attribute
+ testOrdering(getParentId() + "_form:table2", columnsCount);
+
+ }
+
+
-
@Test
public void testOutputAndNestedInputsAndCommands(Template template) {
renderPage(template, RESET_METHOD);
@@ -114,65 +119,7 @@
Assert.fail("Nested command dont work.");
}
}
-
- // @Test
- public void testColumnsComponentLayout(Template template) {
- renderPage(template);
- writeStatus("Testing columns component layout");
-
- String parentId = getParentId() + "_form:";
- String tableId = parentId + DATA_TABLE;
-
- writeStatus("Check columns count equals to 3 ");
- assertColumnsCount(3, tableId);
-
- writeStatus("Check rows count equals to 20 ");
- assertRowsCount(20, tableId);
-
- writeStatus("Check columns headers");
-
- AssertTextEquals("xpath=//table[@id='" + tableId + "']/tHead/tr[1]/th[1]", "header0");
- AssertTextEquals("xpath=//table[@id='" + tableId + "']/tHead/tr[1]/th[2]", "header1");
- AssertTextEquals("xpath=//table[@id='" + tableId + "']/tHead/tr[1]/th[3]", "header2");
-
- writeStatus("Check columns footers");
-
- AssertTextEquals("xpath=//table[@id='" + tableId + "']/tFoot/tr[1]/td[1]", "footer0");
- AssertTextEquals("xpath=//table[@id='" + tableId + "']/tFoot/tr[1]/td[2]", "footer1");
- AssertTextEquals("xpath=//table[@id='" + tableId + "']/tFoot/tr[1]/td[3]", "footer2");
-
- }
-
- // @Test
- public void testColumnsComponentCoreAttributes(Template template) {
- renderPage(template);
-
- writeStatus("Testing columns component core attributes");
-
- String parentId = getParentId() + "_form:";
- String tableId = parentId + DATA_TABLE;
-
- writeStatus("Set columns count == 5, rows count == 10");
- adjustTableParams(10, 5, 0, 10);
-
- writeStatus("Check columns count equals to 5 ");
- assertColumnsCount(5, tableId);
- writeStatus("Check rows count equals to 10 ");
- assertRowsCount(10, tableId);
-
- writeStatus("Set begin column == 2, end column == 2, rows count = 2");
- adjustTableParams(2, 5, 2, 2);
-
- writeStatus("Only one column has to be rendered");
- assertColumnsCount(1, tableId);
- assertRowsCount(2, tableId);
-
- writeStatus("Set end column == 0. there have to be no rows and no columns in the table");
- adjustTableParams(10, 5, 10, 0);
- assertRowsCount(0, tableId);
-
- reset();
- }
+
private void setInputs(String tableId, int rows, int cols) {
for (int i=0;i<rows; i++) {
@@ -182,22 +129,53 @@
selenium.type(path, v);
}
}
-
}
-
- private void adjustTableParams(int rows, int columns, int begin, int end) {
- String ctrlForm = getParentId() + CTRL_FORM;
- type(ctrlForm + ":rows", String.valueOf(rows));
- type(ctrlForm + ":columns", String.valueOf(columns));
- type(ctrlForm + ":begin", String.valueOf(begin));
- type(ctrlForm + ":end", String.valueOf(end));
- clickAjaxCommandAndWait(ctrlForm + ":apply");
+
+ private void checkSorting (String tableId, int col, String [] expected) {
+ int l = expected.length;
+ String [] values = new String [l];
+ for (int i = 0; i < l; i++) {
+ values[i] = selenium.getText("//table[@id='"+tableId+"']/tbody/tr["+(i+1)+"]/td["+(col+1)+"]");
+ }
+
+ for (int i = 0; i < l; i++) {
+ if (!expected[i].equals(values[i])) {
+ Assert.fail("Column number [" + col + "] was sorted unexpected. Column's value should be: " + Arrays.toString(expected) + ". But was: " + Arrays.toString(values));
+ }
+ }
}
-
- private void reset() {
- clickAjaxCommandAndWait(getParentId() + CTRL_FORM + ":reset");
+
+ private void clickSort(String tableId, int col) {
+ selenium.click("//table[@id='"+tableId+"']/thead/tr[1]/th["+(col+1)+"]");
+ waitForAjaxCompletion();
}
+ private void checkSortOrderAttribute(String tableId, int col, Ordering ordering) {
+ String header = selenium.getText("//table[@id='"+tableId+"']/thead/tr[1]/th["+(col+1)+"]");
+ if (!ordering.equals(Ordering.valueOf(header))) {
+ Assert.fail("SortOrder attribute was not changed for columns number ["+col+"]. Expected : " + ordering + ". But was : " + header);
+ }
+ }
+
+ private void testOrdering(String tableId, int cols) {
+ for (int i=0; i<cols; i++) {
+ clickSort(tableId, i);
+
+ checkSorting(tableId, 0, new String [] {"0", "1"});
+ checkSorting(tableId, 1, new String [] {"1", "2"});
+ checkSorting(tableId, 2, new String [] {"2", "3"});
+ checkSortOrderAttribute(tableId, i, Ordering.ASCENDING);
+
+ clickSort(tableId, i);
+
+ checkSorting(tableId, 0, new String [] {"1", "0"});
+ checkSorting(tableId, 1, new String [] {"2", "1"});
+ checkSorting(tableId, 2, new String [] {"3", "2"});
+ checkSortOrderAttribute(tableId, i, Ordering.DESCENDING);
+
+ }
+ }
+
@Override
public String getTestUrl() {
15 years, 11 months
JBoss Rich Faces SVN: r12682 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/dataFilterSlider and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2009-02-17 07:24:01 -0500 (Tue, 17 Feb 2009)
New Revision: 12682
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataFilterSliderBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataFilterSlider/dataFilterSliderTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataFilterSliderTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5986
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataFilterSliderBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataFilterSliderBean.java 2009-02-17 12:17:44 UTC (rev 12681)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataFilterSliderBean.java 2009-02-17 12:24:01 UTC (rev 12682)
@@ -56,6 +56,8 @@
private Integer increment = 1;
+ private boolean storeResults = true;
+
private Integer handleValue = 20;
public DataFilterSliderBean() {
@@ -151,6 +153,22 @@
this.increment = increment;
}
+ /**
+ * Gets value of storeResults field.
+ * @return value of storeResults field
+ */
+ public boolean isStoreResults() {
+ return storeResults;
+ }
+
+ /**
+ * Set a new value for storeResults field.
+ * @param storeResults a new value for storeResults field
+ */
+ public void setStoreResults(boolean storeResults) {
+ this.storeResults = storeResults;
+ }
+
public String action() {
return null;
}
@@ -160,10 +178,16 @@
increment = 5;
}
+ public void initStoreResultsTest() {
+ reset();
+ storeResults = false;
+ }
+
public String reset() {
eventSnapshot = "";
handleValue = 20;
increment = 1;
+ storeResults = true;
return null;
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataFilterSlider/dataFilterSliderTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataFilterSliderTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataFilterSliderTest.java 2009-02-17 12:17:44 UTC (rev 12681)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataFilterSliderTest.java 2009-02-17 12:24:01 UTC (rev 12682)
@@ -50,6 +50,8 @@
private static final String INIT_INCREMENT_TEST = "#{dataFilterSliderBean.initIncrementTest}";
+ private static final String INIT_STORE_RESULTS_TEST = "#{dataFilterSliderBean.initStoreResultsTest}";
+
private static final String FORM_ID = "autoTestForm:";
@Test
@@ -172,6 +174,34 @@
}
@Test
+ public void testStoreResultsAttribute(Template template) {
+ renderPage(template, INIT_STORE_RESULTS_TEST);
+
+ String parentId = getParentId() + FORM_ID;
+ String tableId = parentId + TABLE;
+ String submittedValueId = parentId + "submittedValue";
+
+ writeStatus("Check 'storeResults' attributes");
+
+ writeStatus("Check that if storeResults set to false dataFilterSlider has no effect on result dataTable");
+
+ writeStatus("All planets are shown at every turn");
+
+ clickSlider(1);
+ assertRowsCount(PLANETS_ALL, tableId);
+ AssertTextEquals(submittedValueId, "1");
+ checkDataFilterSliderEventFired(20, 1);
+
+ clickSlider(2);
+ assertRowsCount(PLANETS_ALL, tableId);
+ checkDataFilterSliderEventFired(1, 2);
+
+ clickSlider(5);
+ assertRowsCount(PLANETS_ALL, tableId);
+ checkDataFilterSliderEventFired(2, 5);
+ }
+
+ @Test
public void testRenderedAttribute(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
15 years, 11 months
JBoss Rich Faces SVN: r12681 - trunk/ui/contextMenu/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2009-02-17 07:17:44 -0500 (Tue, 17 Feb 2009)
New Revision: 12681
Modified:
trunk/ui/contextMenu/src/main/config/component/contextMenu.xml
Log:
https://jira.jboss.org/jira/browse/RF-3532
Modified: trunk/ui/contextMenu/src/main/config/component/contextMenu.xml
===================================================================
--- trunk/ui/contextMenu/src/main/config/component/contextMenu.xml 2009-02-17 12:05:48 UTC (rev 12680)
+++ trunk/ui/contextMenu/src/main/config/component/contextMenu.xml 2009-02-17 12:17:44 UTC (rev 12681)
@@ -58,7 +58,7 @@
<description>
Forbids default handling for adjusted event. Default value "true".
</description>
- <defaultvalue>true</defaultvalue>
+ <defaultvalue>false</defaultvalue>
</property>
<property>
<name>showDelay</name>
15 years, 11 months
JBoss Rich Faces SVN: r12680 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/WEB-INF and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2009-02-17 07:05:48 -0500 (Tue, 17 Feb 2009)
New Revision: 12680
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ColumnGroupBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/columnGroup/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/columnGroup/columnGroupTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ColumnGroupTest.java
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/faces-config.xml
Log:
RF-6094, RF-6092
Added: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ColumnGroupBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ColumnGroupBean.java (rev 0)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ColumnGroupBean.java 2009-02-17 12:05:48 UTC (rev 12680)
@@ -0,0 +1,33 @@
+/**
+ *
+ */
+package org.ajax4jsf.bean;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Andrey Markavtsov
+ *
+ */
+public class ColumnGroupBean {
+
+ List<String> rows = new ArrayList<String>();
+
+ public ColumnGroupBean() {
+ for (int i=0; i<2; i++) {
+ rows.add("Text" + i);
+ }
+ }
+
+ public List<String> getRows() {
+ return rows;
+ }
+
+ public void setRows(List<String> rows) {
+ this.rows = rows;
+ }
+
+
+
+}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/faces-config.xml 2009-02-17 12:00:22 UTC (rev 12679)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/faces-config.xml 2009-02-17 12:05:48 UTC (rev 12680)
@@ -337,6 +337,11 @@
<managed-bean-name>columnsBean</managed-bean-name>
<managed-bean-class>org.ajax4jsf.bean.ColumnsBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>columnGroupBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.ColumnGroupBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/pages/ajaxInclude/step1.xhtml</from-view-id>
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/columnGroup/columnGroupTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/columnGroup/columnGroupTest.xhtml (rev 0)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/columnGroup/columnGroupTest.xhtml 2009-02-17 12:05:48 UTC (rev 12680)
@@ -0,0 +1,40 @@
+<!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:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<ui:composition template="#{templateBean.template}">
+ <ui:define name="component">
+ <rich:dataTable id="table" value="#{columnGroupBean.rows}" var="row">
+ <f:facet name="header">
+ <rich:columnGroup columnClasses="columnClass"
+ rowClasses="rowClass"
+ style="color: green"
+ title="title">
+ <rich:column colspan="2">
+ <h:outputText value="Header1"></h:outputText>
+ </rich:column>
+ <rich:column colspan="2">
+ <h:outputText value="Header2"></h:outputText>
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+ <rich:column>
+ <h:outputText value="#{row}"></h:outputText>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{row}"></h:outputText>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{row}"></h:outputText>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{row}"></h:outputText>
+ </rich:column>
+ </rich:dataTable>
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
Added: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ColumnGroupTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ColumnGroupTest.java (rev 0)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ColumnGroupTest.java 2009-02-17 12:05:48 UTC (rev 12680)
@@ -0,0 +1,82 @@
+/**
+ *
+ */
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+/**
+ * @author Andrey Markavtsov
+ *
+ */
+public class ColumnGroupTest extends SeleniumTestBase {
+
+ @Test
+ public void testStylesAndClasses(Template template) {
+ renderPage(template, null);
+ String tableId = getParentId() + "table";
+
+ // Check rowClass attribute
+ String rowClass = selenium.getAttribute(getTableXpath(tableId) + "/thead/tr/@class");
+ if (!rowClass.contains("rowClass")) {
+ Assert.fail("RowClasses attribute does not work. 'rowClass' css class should be rendered for header row");
+ }
+
+ // Check style attribute
+ assertStyleAttributeContains(getTableXpath(tableId) + "/thead/tr", "color: green", "Style attribute does not work ");
+
+ // Check title attribute
+ String title = selenium.getAttribute(getTableXpath(tableId) + "/thead/tr/@title");
+ Assert.assertEquals(title, "title", "Title was not output to client");
+
+ // Check columnClasses attribute
+ String columnClass = selenium.getAttribute(getTableXpath(tableId) + "/thead/tr/th[1]/@class");
+ if (!columnClass.contains("columnClass")) {
+ Assert.fail("ColumnClasses attribute does not work. 'columnClass' css class should be rendered for header cell");
+ }
+
+ }
+
+
+ @Test
+ public void testOutput(Template template) {
+ renderPage(template, null);
+
+ String tableId = getParentId() + "table";
+
+ // Check colgroup tag
+ int colGroupTagCount = selenium.getXpathCount(getTableXpath(tableId) + "/colgroup").intValue();
+ Assert.assertEquals(colGroupTagCount, 1, "Colgroup tag was not output to client");
+
+ String colGroupSpan = selenium.getAttribute(getTableXpath(tableId) + "/colgroup/@span");
+ Assert.assertEquals(colGroupSpan, "4", "Colgroup span is incorrect. Should be 4. But was " + colGroupSpan);
+
+ // Check grouped columns rendering
+ int rows = selenium.getXpathCount(getTableXpath(tableId) + "/thead/tr").intValue();
+ Assert.assertEquals(rows, 1, "Table header should have one row");
+
+ int cols = selenium.getXpathCount(getTableXpath(tableId) + "/thead/tr/th").intValue();
+ Assert.assertEquals(cols, 2, "Table header should have two columns");
+
+ String colspan = selenium.getAttribute(getTableXpath(tableId) + "/thead/tr/th/@colspan");
+ Assert.assertEquals(colspan, "2", "Table header column should have colspan=2 attribute ");
+ AssertTextEquals(getTableXpath(tableId) + "/thead/tr/th[1]", "Header1", "Columns header was not rendered as expected");
+
+ }
+
+ String getTableXpath(String clientId) {
+ return "//table[@id='"+clientId+"']";
+ }
+
+ /* (non-Javadoc)
+ * @see org.richfaces.SeleniumTestBase#getTestUrl()
+ */
+ @Override
+ public String getTestUrl() {
+ return "pages/columnGroup/columnGroupTest.xhtml";
+ }
+
+}
15 years, 11 months
JBoss Rich Faces SVN: r12679 - in trunk/test-applications/seleniumTest/richfaces/src: test/java/org/richfaces/testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-02-17 07:00:22 -0500 (Tue, 17 Feb 2009)
New Revision: 12679
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/comboBox/comboBoxTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java
Log:
RF-6070
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/comboBox/comboBoxTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java 2009-02-16 21:04:37 UTC (rev 12678)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java 2009-02-17 12:00:22 UTC (rev 12679)
@@ -272,6 +272,15 @@
Assert.assertTrue(selenium.isEditable(comboboxField));
}
+ /**
+ * check default label.
+ */
+ @Test
+ public void testDefaultLabel(Template template) {
+ init(template);
+ Assert.assertEquals(selenium.getValue(comboboxField), "Select ...");
+ }
+
@Override
public void setValueEmpty() {
selenium.type(getParentId() + "autoTestForm:componentIdcomboboxValue", "");
15 years, 11 months
JBoss Rich Faces SVN: r12678 - in trunk/samples/extendedDataTable-sample/src/main: resources/i18n and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pkawiak
Date: 2009-02-16 16:04:37 -0500 (Mon, 16 Feb 2009)
New Revision: 12678
Modified:
trunk/samples/extendedDataTable-sample/src/main/java/org/richfaces/samples/extdt/beans/ExtendedDataTableControlBean.java
trunk/samples/extendedDataTable-sample/src/main/resources/i18n/messages.properties
trunk/samples/extendedDataTable-sample/src/main/resources/i18n/messages_en.properties
trunk/samples/extendedDataTable-sample/src/main/resources/i18n/messages_pl.properties
trunk/samples/extendedDataTable-sample/src/main/webapp/pages/index.jsp
Log:
RF-5086: ExtDt's context menu can now be enabled / disabled via enableContextMenu parameter. Changes to demo project reflecting that new functionality introduced.
Modified: trunk/samples/extendedDataTable-sample/src/main/java/org/richfaces/samples/extdt/beans/ExtendedDataTableControlBean.java
===================================================================
--- trunk/samples/extendedDataTable-sample/src/main/java/org/richfaces/samples/extdt/beans/ExtendedDataTableControlBean.java 2009-02-16 21:03:30 UTC (rev 12677)
+++ trunk/samples/extendedDataTable-sample/src/main/java/org/richfaces/samples/extdt/beans/ExtendedDataTableControlBean.java 2009-02-16 21:04:37 UTC (rev 12678)
@@ -14,6 +14,7 @@
String sortMode;
String selectionMode;
Integer rowsNumber;
+ boolean contextMenuEnabled = true;
boolean paginated = false;
public ExtendedDataTableControlBean() {
@@ -91,4 +92,12 @@
this.height = height;
}
+ public boolean isContextMenuEnabled() {
+ return contextMenuEnabled;
+ }
+
+ public void setContextMenuEnabled(boolean contextMenuEnabled) {
+ this.contextMenuEnabled = contextMenuEnabled;
+ }
+
}
Modified: trunk/samples/extendedDataTable-sample/src/main/resources/i18n/messages.properties
===================================================================
--- trunk/samples/extendedDataTable-sample/src/main/resources/i18n/messages.properties 2009-02-16 21:03:30 UTC (rev 12677)
+++ trunk/samples/extendedDataTable-sample/src/main/resources/i18n/messages.properties 2009-02-16 21:04:37 UTC (rev 12678)
@@ -16,3 +16,4 @@
table.rowsNumber=Number of rows
table.selectedPatients=Selected patients
select=Select
+table.enableContextMenu=Enable context menu
Modified: trunk/samples/extendedDataTable-sample/src/main/resources/i18n/messages_en.properties
===================================================================
--- trunk/samples/extendedDataTable-sample/src/main/resources/i18n/messages_en.properties 2009-02-16 21:03:30 UTC (rev 12677)
+++ trunk/samples/extendedDataTable-sample/src/main/resources/i18n/messages_en.properties 2009-02-16 21:04:37 UTC (rev 12678)
@@ -16,3 +16,4 @@
table.rowsNumber=Number of rows
table.selectedPatients=Selected patients
select=Select
+table.enableContextMenu=Enable context menu
Modified: trunk/samples/extendedDataTable-sample/src/main/resources/i18n/messages_pl.properties
===================================================================
--- trunk/samples/extendedDataTable-sample/src/main/resources/i18n/messages_pl.properties 2009-02-16 21:03:30 UTC (rev 12677)
+++ trunk/samples/extendedDataTable-sample/src/main/resources/i18n/messages_pl.properties 2009-02-16 21:04:37 UTC (rev 12678)
@@ -16,3 +16,4 @@
table.rowsNumber=Number of rows
table.selectedPatients=Selected patients
select=Selekt
+table.enableContextMenu=Enable context menu
Modified: trunk/samples/extendedDataTable-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/extendedDataTable-sample/src/main/webapp/pages/index.jsp 2009-02-16 21:03:30 UTC (rev 12677)
+++ trunk/samples/extendedDataTable-sample/src/main/webapp/pages/index.jsp 2009-02-16 21:04:37 UTC (rev 12678)
@@ -61,6 +61,7 @@
sortMode="#{extendedDataTableControlBean.sortMode}"
selectionMode="#{extendedDataTableControlBean.selectionMode}"
selection="#{extendedDataTableBean.selection}" rowKeyVar="rkvar"
+ enableContextMenu="#{extendedDataTableControlBean.contextMenuEnabled}"
tableState="#{extendedDataTableBean.tableState}">
<rich:column id="firstName" headerClass="dataTableHeader"
width="25%" label="#{msg['patient.firstName']}" sortable="true"
@@ -120,7 +121,11 @@
<h:outputLabel value="#{msg['table.patientsNumber']}" for="tablePatientsNumberInput" />
<h:inputText
id="tablePatientsNumberInput"
- value="#{extendedDataTableBean.patientsNumber}" />
+ value="#{extendedDataTableBean.patientsNumber}" />
+ <h:outputLabel value="#{msg['table.enableContextMenu']}" for="tableEnableContextMenu" />
+ <h:selectBooleanCheckbox
+ id="tableEnableContextMenu"
+ value="#{extendedDataTableControlBean.contextMenuEnabled}" />
<h:outputLabel value="#{msg['table.sortMode']}" for="tableSortModeSelect" />
<h:selectOneMenu
id="tableSortModeSelect"
15 years, 11 months
JBoss Rich Faces SVN: r12677 - in trunk/ui/extendedDataTable/src: main/java/org/richfaces/renderkit and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pkawiak
Date: 2009-02-16 16:03:30 -0500 (Mon, 16 Feb 2009)
New Revision: 12677
Modified:
trunk/ui/extendedDataTable/src/main/config/component/ExtendedDataTable.xml
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js
trunk/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx
trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/renderer/ExtendedDataTableRendererTest.java
Log:
RF-5086: ExtDt's context menu can now be enabled / disabled via enableContextMenu parameter.
Modified: trunk/ui/extendedDataTable/src/main/config/component/ExtendedDataTable.xml
===================================================================
--- trunk/ui/extendedDataTable/src/main/config/component/ExtendedDataTable.xml 2009-02-16 20:24:25 UTC (rev 12676)
+++ trunk/ui/extendedDataTable/src/main/config/component/ExtendedDataTable.xml 2009-02-16 21:03:30 UTC (rev 12677)
@@ -213,6 +213,12 @@
<description>Defines a set of column ids in the order the columns
could be set</description>
</property>
+ <property>
+ <name>enableContextMenu</name>
+ <classname>java.lang.Boolean</classname>
+ <description>If set to true, table header context menu will be enabled</description>
+ <defaultvalue>true</defaultvalue>
+ </property>
<property hidden="true" existintag="false" exist="false">
<name>sortFields</name>
</property>
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2009-02-16 20:24:25 UTC (rev 12676)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2009-02-16 21:03:30 UTC (rev 12677)
@@ -95,6 +95,8 @@
private static final String GROUP_FUNCTION = "groupFunction";
private static final String SHOW_MENU_FUNCTION = "showMenuFunction";
+
+ private static final String ENABLE_CONTEXT_MENU = "enableContextMenu";
private static final String ON_RESIZE_FUNCTION = "onColumnResize";
@@ -890,6 +892,7 @@
table));
scriptOptions.addOption(SHOW_MENU_FUNCTION, getShowMenuFunction(
context, table));
+ scriptOptions.addOption(ENABLE_CONTEXT_MENU,table.getAttributes().get(ENABLE_CONTEXT_MENU));
/* Not needed if we do not save open/close state */
scriptOptions.addOption(ON_GROUP_TOGGLE_FUNCTION,
getOnGroupToggleFunctionDef(context, table));
Modified: trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js
===================================================================
--- trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js 2009-02-16 20:24:25 UTC (rev 12676)
+++ trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js 2009-02-16 21:03:30 UTC (rev 12677)
@@ -13,9 +13,10 @@
this.eventSepMouseDown = this.OnSepMouseDown.bindAsEventListener(this);
this.eventSepMouseMove = this.OnSepMouseMove.bindAsEventListener(this);
this.eventSepMouseUp = this.OnSepMouseUp.bindAsEventListener(this);
- this.eventHeaderCellMouseOver = this.OnHeaderCellMouseOver.bindAsEventListener(this);
- this.eventHeaderCellMouseOut = this.OnHeaderCellMouseOut.bindAsEventListener(this);
-
+ if (this.extDt.options.enableContextMenu) {
+ this.eventHeaderCellMouseOver = this.OnHeaderCellMouseOver.bindAsEventListener(this);
+ this.eventHeaderCellMouseOut = this.OnHeaderCellMouseOut.bindAsEventListener(this);
+ }
if (this.extDt.sortFct) {
this.eventHeaderCellClicked = this.OnHeaderCellMouseClicked.bindAsEventListener(this);
}
Modified: trunk/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx
===================================================================
--- trunk/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx 2009-02-16 20:24:25 UTC (rev 12676)
+++ trunk/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx 2009-02-16 21:03:30 UTC (rev 12677)
@@ -137,6 +137,12 @@
//]]>
</script>
</div>
- <f:call name="encodeTableMenu"/>
+ <jsp:scriptlet>
+ <![CDATA[
+ if((Boolean)component.getAttributes().get("enableContextMenu") == true) {
+ encodeTableMenu(context, component);
+ }
+ ]]>
+ </jsp:scriptlet>
</div>
</f:root>
Modified: trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/renderer/ExtendedDataTableRendererTest.java
===================================================================
--- trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/renderer/ExtendedDataTableRendererTest.java 2009-02-16 20:24:25 UTC (rev 12676)
+++ trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/renderer/ExtendedDataTableRendererTest.java 2009-02-16 21:03:30 UTC (rev 12677)
@@ -26,7 +26,6 @@
import java.util.List;
import java.util.Set;
-import javax.el.MethodExpression;
import javax.faces.component.UIOutput;
import javax.faces.component.html.HtmlOutputText;
15 years, 11 months
JBoss Rich Faces SVN: r12676 - in trunk/samples/richfaces-demo/src/main/webapp/richfaces: orderingList and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-02-16 15:24:25 -0500 (Mon, 16 Feb 2009)
New Revision: 12676
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/editor/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/orderingList/usage.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-5761
editor and orderingList live demo sections are corrected
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/editor/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/editor/usage.xhtml 2009-02-16 19:41:51 UTC (rev 12675)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/editor/usage.xhtml 2009-02-16 20:24:25 UTC (rev 12676)
@@ -9,21 +9,21 @@
<ui:define name="sample">
<p>
<b>RichFaces Editor</b> component provides possibility to use <b>tinyMCE
- widget </b>as first class citizen within JSF environment.
+ widget </b>as the first class citizen within JSF environment.
</p>
<p>
It has almost all the properties and features of original widget
- and adds next additional features:
+ and adds the following additional features:
</p>
<ul>
<li>
- Seam text supported out of the box using built-in converter.
+ Seam text support out of the box using built-in converter
</li>
<li>
RichFaces skinnability
</li>
<li>
- Manageable configurations mechanism implemented.
+ Implementation of manageable configurations mechanism
</li>
</ul>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/orderingList/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/orderingList/usage.xhtml 2009-02-16 19:41:51 UTC (rev 12675)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/orderingList/usage.xhtml 2009-02-16 20:24:25 UTC (rev 12676)
@@ -13,19 +13,19 @@
<p>
Ordering List could contain several columns in list representation. And it
also has strong keyboard support out of the box.
- </p>
-
- <fieldset class="demo_fieldset">
- <legend class="demo_legend">OrderingList example</legend>
- <div class="sample-container">
- <p>Manage simple playlist represented via Ordering List:</p>
- <br/>
+ </p>
+
+ <fieldset class="demo_fieldset">
+ <legend class="demo_legend">OrderingList example</legend>
+ <div class="sample-container">
+ <p>Manage simple playlist represented via Ordering List:</p>
+ <br/>
<ui:include src="/richfaces/orderingList/example/playlist.xhtml"/>
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath" value="/richfaces/orderingList/example/playlist.xhtml"/>
- </ui:include>
+ </ui:include>
<br/>
- </div>
+ </div>
</fieldset>
<p>
In this example you may select some songs (using the mouse and Ctrl/Shift keys) and move them
15 years, 11 months
JBoss Rich Faces SVN: r12675 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/support.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-02-16 14:41:51 -0500 (Mon, 16 Feb 2009)
New Revision: 12675
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/dropDowns.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/usage.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-5761
ajaxSupport live demo section is corrected
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/dropDowns.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/dropDowns.xhtml 2009-02-16 19:26:43 UTC (rev 12674)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/dropDowns.xhtml 2009-02-16 19:41:51 UTC (rev 12675)
@@ -10,7 +10,7 @@
<p>
One of the most frequently asked question from the community is about the
- problems occurring while trying to create so called dependent selects.
+ problems occurring while trying to create so-called dependent selects.
</p>
<p>
Here you could explore a simple sample of this case and check the source
@@ -18,7 +18,7 @@
</p>
<p>
After you select the produce type, the second select list is populated
- and contains the items of this type, and if you change the type it will
+ and contains items of this type, and if you change the type it will
be updated again with proper values.
</p>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/usage.xhtml 2009-02-16 19:26:43 UTC (rev 12674)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/usage.xhtml 2009-02-16 19:41:51 UTC (rev 12675)
@@ -52,8 +52,8 @@
<p>
In case of attaching a4j:support to non-Ajax JSF command component, such as h:commandButton
- or h:commandLink, it is important to set disableDefault equals true. Otherwise, a non-ajax
- request will be send just after an Ajax request and the page will be unexpectedly refreshed.
+ or h:commandLink, it is important to set disableDefault to true. Otherwise, a non-ajax
+ request is sent just after an Ajax request and the page is unexpectedly refreshed.
</p>
<p>
15 years, 11 months
JBoss Rich Faces SVN: r12674 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/dataTable.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-02-16 14:26:43 -0500 (Mon, 16 Feb 2009)
New Revision: 12674
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/editDataTable.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/extended-data-model.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/usage.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-5761
dataTable live demo section is corrected
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/editDataTable.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/editDataTable.xhtml 2009-02-16 18:15:41 UTC (rev 12673)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/editDataTable.xhtml 2009-02-16 19:26:43 UTC (rev 12674)
@@ -12,7 +12,7 @@
<p>
In this example you could see two basic and frequently asked use-cases
- implemented. It's a editing and deletion of the table cells via modal panel component.
+ implemented. These are editing and deleting of the table cells via modal panel component.
</p>
<fieldset class="demo_fieldset">
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/extended-data-model.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/extended-data-model.xhtml 2009-02-16 18:15:41 UTC (rev 12673)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/extended-data-model.xhtml 2009-02-16 19:26:43 UTC (rev 12674)
@@ -8,28 +8,28 @@
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
<p>
-Perhaps the most obvious problem of DataTable and javax.faces.model.DataModel is lack of support for more complicated scenarios that uses
+Perhaps the most obvious problem of DataTable and javax.faces.model.DataModel is lack of support for more complicated scenarios that use
data from the database.
-To solve that problem <b>Richfaces</b> has two major tools:
+To solve this problem <b>Richfaces</b> has two major tools:
<ul>
<li>
- set of data-driven components that render data sets in many different ways (<b>rich:dataTable</b> , <b>rich:dataGrid</b>, <b>rich:dataList</b>, <b>a4j:repeat</b> etc.).
- All this components derived it common functionality from the common core that, in addition to standard javax.faces.model.DataModel,
+ A set of data-driven components that render data sets in various ways (<b>rich:dataTable</b> , <b>rich:dataGrid</b>, <b>rich:dataList</b>, <b>a4j:repeat</b> etc.).
+ All these components derive their common functionality from the common core that in addition to standard javax.faces.model.DataModel,
can understand and use
</li>
<li>
- extended data model classes <b>org.ajax4jsf.model.ExtendedDataModel</b> and <b>org.ajax4jsf.model.SerializableDataModel</b>. This two classes works
- together to provide functions that missing in standard DataModel.
+ extended data model classes <b>org.ajax4jsf.model.ExtendedDataModel</b> and <b>org.ajax4jsf.model.SerializableDataModel</b>. These two classes work
+ together to provide functions that missing in the standard DataModel.
</li>
</ul>
The most important additional functions are:
<ul>
<li>access for rows by primary keys instead of index position</li>
<li>implementation of "visitor" pattern over the "range" of rows to support "table scroller" or "paginator" functions</li>
- <li>ability to serialize table data so it may be used on a post-back processing without additional database query</li>
+ <li>ability to serialize table data, so it can be used on post-back processing without additional database query</li>
</ul>
-To use this extensions you need to implement your own DataModel that extends one of our ExtendedDataModel classes and implement few of
-important functions. Below is the example of such implementation.
+To use these extensions you need to implement your own DataModel that extends one of our ExtendedDataModel classes and implement some of
+important functions. Below there is an example of such implementation.
</p>
<div class="sample-container" >
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/usage.xhtml 2009-02-16 18:15:41 UTC (rev 12673)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/usage.xhtml 2009-02-16 19:26:43 UTC (rev 12674)
@@ -10,7 +10,7 @@
- <p>DataTable allows to show a tabular data. Additional to the standard <h:dataTable>, this component
+ <p>DataTable allows to show tabular data. In addition to the standard <h:dataTable>, this component
enables row and column spans for columns, a flexible layout for a header and a footer.
DataTable supports "master-detail" pattern and allows to show the combination
of a master table and detail sub-tables.<br />
15 years, 11 months