JBoss Rich Faces SVN: r21055 - in modules/tests/metamer/trunk: application/src/main/webapp/components/richProgressBar and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-01-18 09:48:02 -0500 (Tue, 18 Jan 2011)
New Revision: 21055
Added:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richProgressBar/
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richProgressBar/TestProgressBarAjax.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richProgressBar/TestProgressBarClient.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richProgressBar/TestProgressBarStatic.java
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichProgressBarBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/clientMode.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/static.xhtml
Log:
https://issues.jboss.org/browse/RFPL-864
* samples for rich:progressBar fixed
* added 34 tests for rich:progressBar
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichProgressBarBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichProgressBarBean.java 2011-01-18 13:01:51 UTC (rev 21054)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichProgressBarBean.java 2011-01-18 14:48:02 UTC (rev 21055)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * 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.
*
@@ -64,7 +64,7 @@
attributes.setAttribute("maxValue", 100);
attributes.setAttribute("minValue", 0);
- attributes.setAttribute("interval", 1000);
+ attributes.setAttribute("interval", 500);
attributes.setAttribute("rendered", true);
attributes.setAttribute("value", -1);
@@ -89,13 +89,13 @@
public Long getCurrentValue() {
if (Boolean.TRUE.equals(attributes.get("enabled").getValue())) {
- Long current = (new Date().getTime() - startTime) / 1000;
- if (current > 100) {
+ Long current = (new Date().getTime() - startTime) / 500;
+ if (current >= 100) {
buttonRendered = true;
} else if (current.equals(0L)) {
return 1L;
}
- return (new Date().getTime() - startTime) / 1000;
+ return (new Date().getTime() - startTime) / 500;
}
if (startTime == null) {
return -1L;
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/clientMode.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/clientMode.xhtml 2011-01-18 13:01:51 UTC (rev 21054)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/clientMode.xhtml 2011-01-18 14:48:02 UTC (rev 21055)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+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.
@@ -42,12 +42,12 @@
<script type="text/javascript">
//<![CDATA[
- var counter = 1;
+ var counter = 0;
var intervalID;
function updateProgress(i) {
- #{rich:component('progressBar')}.setValue(counter*5);
- if ((counter++)>20){
+ #{rich:component('progressBar')}.setValue(counter*2);
+ if ((counter++)>50){
clearInterval(intervalID);
#{rich:element('startButton')}.disabled=false;
#{rich:element('pauseButton')}.disabled=true;
@@ -59,7 +59,7 @@
#{rich:element('startButton')}.disabled=true;
#{rich:element('pauseButton')}.disabled=false;
#{rich:component('progressBar')}.enable();
- #{rich:component('progressBar')}.setValue(counter*5);
+ #{rich:component('progressBar')}.setValue(counter*2);
intervalID = setInterval(updateProgress,1000);
}
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/static.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/static.xhtml 2011-01-18 13:01:51 UTC (rev 21054)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/static.xhtml 2011-01-18 14:48:02 UTC (rev 21055)
@@ -41,9 +41,9 @@
<ui:define name="component">
<h:panelGrid id="settingsPanel" columns="2">
- Children rendered: <h:selectBooleanCheckbox value="#{richProgressBarBean.childrenRendered}" onclick="submit()" />
- 'initial' facet rendered: <h:selectBooleanCheckbox value="#{richProgressBarBean.initialFacetRendered}" onclick="submit()" />
- 'finish' facet rendered: <h:selectBooleanCheckbox value="#{richProgressBarBean.finishFacetRendered}" onclick="submit()" />
+ Children rendered: <h:selectBooleanCheckbox id="childrenRendered" value="#{richProgressBarBean.childrenRendered}" onclick="submit()" />
+ 'initial' facet rendered: <h:selectBooleanCheckbox id="initialFacetRendered" value="#{richProgressBarBean.initialFacetRendered}" onclick="submit()" />
+ 'finish' facet rendered: <h:selectBooleanCheckbox id="finishFacetRendered" value="#{richProgressBarBean.finishFacetRendered}" onclick="submit()" />
</h:panelGrid>
<rich:progressBar id="progressBar"
@@ -84,7 +84,7 @@
</f:facet>
<f:facet name="finish">
<h:panelGroup rendered="#{richProgressBarBean.finishFacetRendered}">
- <h:outputText id="completeOutput" value="Complete"/>
+ <h:outputText id="finishOutput" value="Finish"/>
</h:panelGroup>
</f:facet>
</rich:progressBar>
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richProgressBar/TestProgressBarAjax.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richProgressBar/TestProgressBarAjax.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richProgressBar/TestProgressBarAjax.java 2011-01-18 14:48:02 UTC (rev 21055)
@@ -0,0 +1,288 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.ftest.richProgressBar;
+
+import java.text.ParseException;
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+import java.net.URL;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.jboss.test.selenium.dom.Event;
+
+import org.jboss.test.selenium.encapsulated.JavaScript;
+import org.jboss.test.selenium.locator.Attribute;
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+import org.testng.annotations.Test;
+
+/**
+ * Test case for page /faces/components/richProgressBar/ajaxMode.xhtml
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+public class TestProgressBarAjax extends AbstractMetamerTest {
+
+ private JQueryLocator progressBar = pjq("div[id$=progressBar]");
+ private JQueryLocator initialOutput = pjq("div.rf-pb-init > span");
+ private JQueryLocator completeOutput = pjq("div.rf-pb-fin > span");
+ private JQueryLocator startButton = pjq("div.rf-pb-init > input");
+ private JQueryLocator restartButton = pjq("div.rf-pb-fin > input");
+ private JQueryLocator remain = pjq("div.rf-pb-rmng");
+ private JQueryLocator progress = pjq("div.rf-pb-prgs");
+ private JQueryLocator complete = pjq("div[id$=complete]");
+ private JQueryLocator label = pjq("div.rf-pb-lbl");
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/richProgressBar/ajaxMode.xhtml");
+ }
+
+ @Test
+ public void testInit() {
+ assertTrue(selenium.isElementPresent(progressBar), "Progress bar is not present on the page.");
+ assertTrue(selenium.isDisplayed(progressBar), "Progress bar is not present on the page.");
+ assertTrue(selenium.isDisplayed(initialOutput), "Initial output is not present on the page.");
+ assertFalse(selenium.isElementPresent(completeOutput), "Complete output should not be present on the page.");
+ assertTrue(selenium.isDisplayed(startButton), "Start button is not present on the page.");
+ assertFalse(selenium.isElementPresent(restartButton), "Restart button should not be present on the page.");
+
+ if (selenium.isElementPresent(remain)) {
+ assertFalse(selenium.isVisible(remain), "Progress bar should not show progress.");
+ }
+ if (selenium.isElementPresent(progress)) {
+ assertFalse(selenium.isVisible(progress), "Progress bar should not show progress.");
+ }
+ if (selenium.isElementPresent(label)) {
+ assertFalse(selenium.isVisible(label), "Progress bar should not show progress.");
+ }
+ }
+
+ @Test
+ public void testStart() {
+ String reqTime = selenium.getText(time);
+ guardXhr(selenium).click(startButton);
+ waitGui.failWith("Page was not updated").waitForChange(reqTime, retrieveText.locator(time));
+
+ assertTrue(selenium.isDisplayed(progressBar), "Progress bar is not present on the page.");
+ assertFalse(selenium.isElementPresent(initialOutput), "Initial output should not be present on the page.");
+ assertFalse(selenium.isElementPresent(completeOutput), "Complete output should not be present on the page.");
+ assertFalse(selenium.isElementPresent(startButton), "Start button should not be present on the page.");
+ assertFalse(selenium.isElementPresent(restartButton), "Restart button should not be present on the page.");
+
+ assertTrue(selenium.isElementPresent(remain), "Progress bar should show progress.");
+ assertTrue(selenium.isVisible(remain), "Progress bar should show progress.");
+ assertTrue(selenium.isVisible(progress), "Progress bar should not show progress.");
+ assertFalse(selenium.isElementPresent(complete), "Progress bar should not show progress.");
+
+ assertEquals(selenium.getText(label), "1 %", "Progress bar's label after start");
+ }
+
+ @Test
+ public void testProgress() throws ParseException {
+ testOneRunOfProgressBar(startButton, 500);
+ testOneRunOfProgressBar(restartButton, 500);
+ }
+
+ @Test
+ public void testData() {
+ selenium.type(pjq("input[type=text][id$=dataInput]"), "RichFaces 4");
+ selenium.waitForPageToLoad();
+
+ selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "data = event.data");
+ selenium.waitForPageToLoad();
+
+ String reqTime = selenium.getText(time);
+ guardXhr(selenium).click(startButton);
+ waitGui.failWith("Page was not updated").waitForChange(reqTime, retrieveText.locator(time));
+ reqTime = selenium.getText(time);
+ waitGui.failWith("Page was not updated").waitForChange(reqTime, retrieveText.locator(time));
+
+ String data = selenium.getEval(new JavaScript("window.data"));
+ assertEquals(data, "RichFaces 4", "Data sent with ajax request");
+ }
+
+ @Test
+ public void testInterval() throws ParseException {
+ selenium.type(pjq("input[type=text][id$=intervalInput]"), "1000");
+ selenium.waitForPageToLoad();
+
+ testOneRunOfProgressBar(startButton, 1000);
+ }
+
+ @Test
+ public void testEvents() {
+ selenium.type(pjq("input[type=text][id$=onbeginInput]"), "metamerEvents += \"begin \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=onbeforedomupdateInput]"), "metamerEvents += \"beforedomupdate \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "metamerEvents += \"complete \"");
+ selenium.waitForPageToLoad();
+
+ selenium.getEval(new JavaScript("window.metamerEvents = \"\";"));
+
+ guardXhr(selenium).click(startButton);
+ waitGui.timeout(55000).failWith("Progress bar should disappear after it finishes.").until(elementPresent.locator(restartButton));
+
+ String[] events = selenium.getEval(new JavaScript("window.metamerEvents")).split(" ");
+
+ assertEquals(events.length % 3, 0, "Number of events should be a multiple of 3.");
+ for (int i = 0; i < events.length; i += 3) {
+ assertEquals(events[i], "begin", "Event nr." + i + " should be begin.");
+ assertEquals(events[i + 1], "beforedomupdate", "Event nr." + (i + 1) + " should be beforedomupdate.");
+ assertEquals(events[i + 2], "complete", "Event nr." + (i + 2) + " should be complete.");
+ }
+ }
+
+ @Test
+ public void testOnclick() {
+ testFireEvent(Event.CLICK, progressBar);
+ }
+
+ @Test
+ public void testOndblclick() {
+ testFireEvent(Event.DBLCLICK, progressBar);
+ }
+
+ @Test
+ public void testOnfinish() {
+ selenium.type(pjq("input[type=text][id$=onfinishInput]"), "metamerEvents += \"finish \"");
+ selenium.waitForPageToLoad();
+
+ selenium.getEval(new JavaScript("window.metamerEvents = \"\";"));
+
+ guardXhr(selenium).click(startButton);
+ waitGui.timeout(55000).failWith("Progress bar should disappear after it finishes.").until(elementPresent.locator(restartButton));
+
+ String[] events = selenium.getEval(new JavaScript("window.metamerEvents")).split(" ");
+
+ assertEquals(events.length, 1, "Only one event should be fired.");
+ assertEquals(events[0], "finish", "Onfinish doesn't work.");
+ }
+
+ @Test
+ public void testOnmousedown() {
+ testFireEvent(Event.MOUSEDOWN, progressBar);
+ }
+
+ @Test
+ public void testOnmousemove() {
+ testFireEvent(Event.MOUSEMOVE, progressBar);
+ }
+
+ @Test
+ public void testOnmouseout() {
+ testFireEvent(Event.MOUSEOUT, progressBar);
+ }
+
+ @Test
+ public void testOnmouseover() {
+ testFireEvent(Event.MOUSEOVER, progressBar);
+ }
+
+ @Test
+ public void testOnmouseup() {
+ testFireEvent(Event.MOUSEUP, progressBar);
+ }
+
+ @Test
+ public void testRendered() {
+ selenium.click(pjq("input[type=radio][name$=renderedInput][value=false]"));
+ selenium.waitForPageToLoad();
+
+ assertFalse(selenium.isElementPresent(progressBar), "Progress bar should not be rendered when rendered=false.");
+ }
+
+ private void testOneRunOfProgressBar(JQueryLocator button, int interval) throws ParseException {
+ SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss.SSS");
+ long delta = (long) (interval * 0.5);
+ Set<String> timesSet = new TreeSet<String>();
+ List<String> labelsList = new ArrayList<String>();
+ List<String> progressList = new ArrayList<String>();
+
+ guardXhr(selenium).click(button);
+
+ for (int i = 0; i < 40; i++) {
+ waitFor(delta);
+ timesSet.add(selenium.getText(time));
+ labelsList.add(selenium.getText(label).replace(" %", ""));
+ String width = selenium.getAttribute(progress.getAttribute(Attribute.STYLE)).replace("%", "").replace("width:", "");
+ progressList.add(width.replace(";", "").trim());
+ }
+
+ Date[] timesArray = new Date[timesSet.size()];
+ List<String> timesList = new ArrayList<String>(timesSet);
+
+ for (int i = 1; i < timesList.size(); i++) {
+ timesArray[i] = sdf.parse(timesList.get(i));
+ }
+
+ long average = countAverage(timesArray);
+ assertTrue(Math.abs(average - interval) < delta, "Average interval " + average + " is too far from set value (" + interval + ")");
+ assertFalse(average < interval, "Average interval " + average + " cannot be smaller than set value (" + interval + ")");
+
+ int first = 0;
+ int second = -1;
+
+ for (int i = 0; i < labelsList.size() - 1; i++) {
+ first = Integer.parseInt(labelsList.get(i));
+ second = Integer.parseInt(labelsList.get(i + 1));
+ assertTrue(first <= second, "Number of percent in label should be increasing: " + first + "!<= " + second);
+ }
+
+ for (int i = 0; i < progressList.size() - 1; i++) {
+ first = Integer.parseInt(progressList.get(i));
+ second = Integer.parseInt(progressList.get(i + 1));
+ assertTrue(first <= second, "Progress of progress bar should be increasing: " + first + "!<= " + second);
+ }
+
+ waitGui.timeout(40000).failWith("Progress bar should disappear after it finishes.").until(elementPresent.locator(restartButton));
+ assertTrue(selenium.isElementPresent(completeOutput), "Complete output should be present on the page.");
+
+ assertTrue(selenium.isDisplayed(progressBar), "Progress bar is not present on the page.");
+ assertFalse(selenium.isElementPresent(initialOutput), "Initial output should not be present on the page.");
+ assertTrue(selenium.isDisplayed(completeOutput), "Complete output should be present on the page.");
+ assertFalse(selenium.isElementPresent(startButton), "Start button should not be present on the page.");
+ assertTrue(selenium.isVisible(restartButton), "Restart button should be present on the page.");
+
+ assertFalse(selenium.isDisplayed(remain), "Progress bar should not show progress.");
+ }
+
+ private long countAverage(Date[] times) {
+ long total = 0L;
+ for (int i = 1; i < times.length - 1; i++) {
+ total += (times[i].getTime() - times[i + 1].getTime());
+ }
+
+ return Math.abs(total / (times.length - 2));
+ }
+}
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richProgressBar/TestProgressBarAjax.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richProgressBar/TestProgressBarClient.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richProgressBar/TestProgressBarClient.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richProgressBar/TestProgressBarClient.java 2011-01-18 14:48:02 UTC (rev 21055)
@@ -0,0 +1,170 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.ftest.richProgressBar;
+
+import java.text.ParseException;
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardNoRequest;
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import org.jboss.test.selenium.encapsulated.JavaScript;
+
+
+import org.jboss.test.selenium.locator.Attribute;
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+import org.testng.annotations.Test;
+
+/**
+ * Test case for page /faces/components/richProgressBar/clientMode.xhtml
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+public class TestProgressBarClient extends AbstractMetamerTest {
+
+ private JQueryLocator progressBar = pjq("div[id$=progressBar]");
+ private JQueryLocator initialOutput = pjq("div.rf-pb-init > span");
+ private JQueryLocator completeOutput = pjq("div.rf-pb-fin > span");
+ private JQueryLocator startButton = pjq("input[id$=startButton]");
+ private JQueryLocator pauseButton = pjq("input[id$=pauseButton]");
+ private JQueryLocator remain = pjq("div.rf-pb-rmng");
+ private JQueryLocator progress = pjq("div.rf-pb-prgs");
+ private JQueryLocator complete = pjq("div[id$=complete]");
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/richProgressBar/clientMode.xhtml");
+ }
+
+ @Test
+ public void testInit() {
+ assertTrue(selenium.isElementPresent(progressBar), "Progress bar is not present on the page.");
+ assertTrue(selenium.isDisplayed(progressBar), "Progress bar is not present on the page.");
+ assertTrue(selenium.isDisplayed(initialOutput), "Initial output is not present on the page.");
+ assertFalse(selenium.isVisible(completeOutput), "Complete output should not be present on the page.");
+ assertTrue(selenium.isVisible(startButton), "Start button should be present on the page.");
+ assertTrue(selenium.isVisible(pauseButton), "Pause button should be present on the page.");
+
+ assertFalse(selenium.isVisible(remain), "Progress bar should not show progress.");
+ assertFalse(selenium.isVisible(progress), "Progress bar should not show progress.");
+ }
+
+ @Test
+ public void testStart() {
+ guardNoRequest(selenium).click(startButton);
+
+ assertTrue(selenium.isDisplayed(progressBar), "Progress bar is not present on the page.");
+ assertFalse(selenium.isVisible(initialOutput), "Initial output should not be present on the page.");
+ assertFalse(selenium.isVisible(completeOutput), "Complete output should not be present on the page.");
+ assertTrue(selenium.isVisible(startButton), "Start button should be present on the page.");
+ assertTrue(selenium.isVisible(pauseButton), "Restart button should be present on the page.");
+
+ assertTrue(selenium.isElementPresent(remain), "Progress bar should show progress.");
+ assertTrue(selenium.isVisible(remain), "Progress bar should show progress.");
+ assertTrue(selenium.isVisible(progress), "Progress bar should not show progress.");
+ assertFalse(selenium.isElementPresent(complete), "Progress bar should not show progress.");
+ }
+
+ @Test
+ public void testProgress() throws ParseException {
+ testOneRunOfProgressBar(startButton, 1000);
+ testOneRunOfProgressBar(startButton, 1000);
+ }
+
+ @Test
+ public void testPause() {
+ selenium.click(startButton);
+ waitFor(4000);
+
+ selenium.click(pauseButton);
+ int value = getProgress();
+ assertTrue(value > 0, "Progress bar should show non-null progress after 4 seconds.");
+
+ waitFor(4000);
+ int value2 = getProgress();
+ assertEquals(value2, value, "Progress bar should not be updated when paused.");
+ selenium.click(startButton);
+
+ value = getProgress();
+ assertTrue(value > value2, "Progress bar's value should increase after pause.");
+ }
+
+ @Test
+ public void testOnfinish() {
+ selenium.type(pjq("input[type=text][id$=onfinishInput]"), "metamerEvents += \"finish \"");
+ selenium.waitForPageToLoad();
+
+ selenium.getEval(new JavaScript("window.metamerEvents = \"\";"));
+
+ selenium.click(startButton);
+ waitGui.timeout(60000).failWith("Progress bar should disappear after it finishes.").until(isDisplayed.locator(pjq("div.rf-pb-fin")));
+
+ String[] events = selenium.getEval(new JavaScript("window.metamerEvents")).split(" ");
+
+ assertEquals(events.length, 1, "Only one event should be fired.");
+ assertEquals(events[0], "finish", "Onfinish doesn't work.");
+ }
+
+ private void testOneRunOfProgressBar(JQueryLocator button, int interval) throws ParseException {
+ long delta = (long) (interval * 0.5);
+ List<Integer> progressList = new ArrayList<Integer>();
+
+ selenium.click(button);
+
+ for (int i = 0; i < 40; i++) {
+ waitFor(delta);
+ progressList.add(getProgress());
+ }
+
+ int first = 0;
+ int second = -1;
+
+ for (int i = 0; i < progressList.size() - 1; i++) {
+ first = progressList.get(i);
+ second = progressList.get(i + 1);
+ assertTrue(first <= second, "Progress of progress bar should be increasing: " + first + "!<= " + second);
+ }
+
+ waitGui.timeout(40000).failWith("Progress bar should disappear after it finishes.").until(isDisplayed.locator(pjq("div.rf-pb-fin")));
+ assertTrue(selenium.isElementPresent(completeOutput), "Complete output should be present on the page.");
+
+ assertTrue(selenium.isDisplayed(progressBar), "Progress bar is not present on the page.");
+ assertFalse(selenium.isVisible(initialOutput), "Initial output should not be present on the page.");
+ assertTrue(selenium.isVisible(completeOutput), "Complete output should be present on the page.");
+ assertTrue(selenium.isVisible(startButton), "Start button should be present on the page.");
+ assertTrue(selenium.isVisible(pauseButton), "Restart button should be present on the page.");
+
+ assertFalse(selenium.isDisplayed(remain), "Progress bar should not show progress.");
+ }
+
+ private int getProgress() {
+ String width = selenium.getAttribute(progress.getAttribute(Attribute.STYLE));
+ width = width.replace("%", "").replace("width:", "").replace(";", "").trim();
+ return Integer.parseInt(width);
+ }
+}
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richProgressBar/TestProgressBarClient.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richProgressBar/TestProgressBarStatic.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richProgressBar/TestProgressBarStatic.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richProgressBar/TestProgressBarStatic.java 2011-01-18 14:48:02 UTC (rev 21055)
@@ -0,0 +1,213 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.ftest.richProgressBar;
+
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+import java.net.URL;
+
+import org.jboss.test.selenium.locator.Attribute;
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+import org.testng.annotations.Test;
+
+/**
+ * Test case for page /faces/components/richProgressBar/static.xhtml
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+public class TestProgressBarStatic extends AbstractMetamerTest {
+
+ private JQueryLocator progressBar = pjq("div[id$=progressBar]");
+ private JQueryLocator initialOutput = pjq("div.rf-pb-init > span");
+ private JQueryLocator finishOutput = pjq("div.rf-pb-fin > span");
+ private JQueryLocator remain = pjq("div.rf-pb-rmng");
+ private JQueryLocator progress = pjq("div.rf-pb-prgs");
+ private JQueryLocator complete = pjq("div[id$=complete]");
+ private JQueryLocator label = pjq("div.rf-pb-lbl");
+ private JQueryLocator childrenRenderedCheckbox = pjq("input[id$=childrenRendered]");
+ private JQueryLocator initialFacetRenderedCheckbox = pjq("input[id$=initialFacetRendered]");
+ private JQueryLocator finishFacetRenderedCheckbox = pjq("input[id$=finishFacetRendered]");
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/richProgressBar/static.xhtml");
+ }
+
+ @Test
+ public void testInitialFacet() {
+ assertTrue(selenium.isElementPresent(progressBar), "Progress bar is not present on the page.");
+ assertTrue(selenium.isVisible(progressBar), "Progress bar should be visible on the page.");
+ assertTrue(selenium.isVisible(initialOutput), "Initial output should be present on the page.");
+ assertFalse(selenium.isVisible(finishOutput), "Finish output should not be present on the page.");
+ assertEquals(selenium.getText(initialOutput), "Initial", "Content of initial facet.");
+
+ assertFalse(selenium.isVisible(remain), "Progress bar should not show progress.");
+ assertFalse(selenium.isVisible(progress), "Progress bar should not show progress.");
+ assertFalse(selenium.isVisible(label), "Progress bar should not show progress.");
+
+ selenium.click(initialFacetRenderedCheckbox);
+ selenium.waitForPageToLoad();
+
+ assertTrue(selenium.isElementPresent(progressBar), "Progress bar is not present on the page.");
+ assertTrue(selenium.isVisible(progressBar), "Progress bar should be visible on the page.");
+ assertFalse(selenium.isElementPresent(initialOutput), "Initial output should not be present on the page.");
+ assertFalse(selenium.isVisible(finishOutput), "Finish output should not be present on the page.");
+
+ assertTrue(selenium.isVisible(remain), "Progress bar should show progress.");
+ assertTrue(selenium.isVisible(progress), "Progress bar should show progress.");
+ assertTrue(selenium.isVisible(label), "Progress bar should show progress.");
+ }
+
+ @Test
+ public void testFinishFacet() {
+ selenium.type(pjq("input[id$=valueInput]"), "100");
+ selenium.waitForPageToLoad();
+
+ assertTrue(selenium.isElementPresent(progressBar), "Progress bar is not present on the page.");
+ assertTrue(selenium.isVisible(progressBar), "Progress bar should be visible on the page.");
+ assertFalse(selenium.isVisible(initialOutput), "Initial output should not be present on the page.");
+ assertTrue(selenium.isVisible(finishOutput), "Finish output should be present on the page.");
+ assertEquals(selenium.getText(finishOutput), "Finish", "Content of finish facet.");
+
+ assertFalse(selenium.isVisible(remain), "Progress bar should not show progress.");
+ assertFalse(selenium.isVisible(progress), "Progress bar should not show progress.");
+ assertFalse(selenium.isVisible(label), "Progress bar should not show progress.");
+
+ selenium.click(finishFacetRenderedCheckbox);
+ selenium.waitForPageToLoad();
+
+ assertTrue(selenium.isElementPresent(progressBar), "Progress bar is not present on the page.");
+ assertTrue(selenium.isVisible(progressBar), "Progress bar should be visible on the page.");
+ assertFalse(selenium.isVisible(initialOutput), "Initial output should not be present on the page.");
+ assertFalse(selenium.isElementPresent(finishOutput), "Finish output should not be present on the page.");
+
+ assertTrue(selenium.isVisible(remain), "Progress bar should show progress.");
+ assertTrue(selenium.isVisible(progress), "Progress bar should show progress.");
+ assertTrue(selenium.isVisible(label), "Progress bar should show progress.");
+ }
+
+ @Test
+ public void testFinishClass() {
+ testStyleClass(pjq("div.rf-pb-fin"), "finishClass");
+ }
+
+ @Test
+ public void testInitialClass() {
+ testStyleClass(pjq("div.rf-pb-init"), "initialClass");
+ }
+
+ @Test
+ public void testLabel() {
+ selenium.click(initialFacetRenderedCheckbox);
+ selenium.waitForPageToLoad();
+ String labelValue = selenium.getText(label);
+ assertEquals(labelValue, "", "Label when not set.");
+
+ selenium.type(pjq("input[id$=labelInput]"), "metamer");
+ selenium.waitForPageToLoad();
+ labelValue = selenium.getText(label);
+ assertEquals(labelValue, "metamer", "Label when set to metamer.");
+
+ selenium.click(childrenRenderedCheckbox);
+ selenium.waitForPageToLoad();
+ labelValue = selenium.getText(label);
+ assertEquals(labelValue, "child + metamer", "Label when set to metamer and children are rendered too.");
+ }
+
+ @Test
+ public void testMaxValue() {
+ selenium.type(pjq("input[id$=maxValueInput]"), "1000");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[id$=valueInput]"), "100");
+ selenium.waitForPageToLoad();
+
+ assertEquals(getProgress(), 10, "Progress when value=100 and maxValue=1000.");
+ }
+
+ @Test
+ public void testMinValue() {
+ selenium.type(pjq("input[id$=minValueInput]"), "90");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[id$=valueInput]"), "95");
+ selenium.waitForPageToLoad();
+
+ assertEquals(getProgress(), 50, "Progress when value=95 and minValue=90.");
+ }
+
+ @Test
+ public void testProgressClass() {
+ testStyleClass(progress, "progressClass");
+ }
+
+ @Test
+ public void testRemainingClass() {
+ testStyleClass(remain, "remainingClass");
+ }
+
+ @Test
+ public void testStyle() {
+ testStyle(progressBar, "style");
+ }
+
+ @Test
+ public void testStyleClass() {
+ testStyleClass(progressBar, "styleClass");
+ }
+
+ @Test
+ public void testValue() {
+ selenium.type(pjq("input[id$=valueInput]"), "0");
+ selenium.waitForPageToLoad();
+ assertEquals(getProgress(), 0, "Progress when value=0.");
+
+ selenium.type(pjq("input[id$=valueInput]"), "37");
+ selenium.waitForPageToLoad();
+ assertEquals(getProgress(), 37, "Progress when value=37.");
+
+ selenium.type(pjq("input[id$=valueInput]"), "100");
+ selenium.waitForPageToLoad();
+ assertEquals(getProgress(), 100, "Progress when value=100.");
+
+ selenium.type(pjq("input[id$=valueInput]"), "-345");
+ selenium.waitForPageToLoad();
+ assertEquals(getProgress(), 0, "Progress when value=-345.");
+ assertTrue(selenium.isVisible(initialOutput), "Initial output should be visible on the page.");
+ assertFalse(selenium.isVisible(finishOutput), "Finish output should not be visible on the page.");
+
+ selenium.type(pjq("input[id$=valueInput]"), "456");
+ selenium.waitForPageToLoad();
+ assertEquals(getProgress(), 100, "Progress when value=456.");
+ assertFalse(selenium.isVisible(initialOutput), "Initial output should not be visible on the page.");
+ assertTrue(selenium.isVisible(finishOutput), "Finish output should be visible on the page.");
+ }
+
+ private int getProgress() {
+ String width = selenium.getAttribute(progress.getAttribute(Attribute.STYLE));
+ width = width.replace("%", "").replace("width:", "").replace(";", "").trim();
+ return Integer.parseInt(width);
+ }
+}
Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richProgressBar/TestProgressBarStatic.java
___________________________________________________________________
Name: svn:keywords
+ Revision
13 years, 11 months
JBoss Rich Faces SVN: r21054 - in trunk/ui/output/ui/src/main: resources/META-INF/resources/org.richfaces and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2011-01-18 08:01:51 -0500 (Tue, 18 Jan 2011)
New Revision: 21054
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/DropDownMenuRendererBase.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu-base.js
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu.js
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menuitem.js
trunk/ui/output/ui/src/main/templates/dropdownmenu.template.xml
trunk/ui/output/ui/src/main/templates/menuitem.template.xml
Log:
RF-10200: bug with action, actionListener attributes is fixed. Also positioning of DropDownMenu is fixed.
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/DropDownMenuRendererBase.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/DropDownMenuRendererBase.java 2011-01-18 12:20:02 UTC (rev 21053)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/DropDownMenuRendererBase.java 2011-01-18 13:01:51 UTC (rev 21054)
@@ -96,13 +96,13 @@
if (jointPoint == null) {
jointPoint = org.richfaces.component.Positioning.DEFAULT;
}
- RenderKitUtils.addToScriptHash(map, "jointPoint", jointPoint, org.richfaces.component.Positioning.DEFAULT);
+ RenderKitUtils.addToScriptHash(map, "jointPoint", jointPoint.getValue(), org.richfaces.component.Positioning.DEFAULT.getValue());
Positioning direction = group.getDirection();
if (direction == null) {
direction = org.richfaces.component.Positioning.DEFAULT;
}
- RenderKitUtils.addToScriptHash(map, "direction", direction, org.richfaces.component.Positioning.DEFAULT);
+ RenderKitUtils.addToScriptHash(map, "direction", direction.getValue(), org.richfaces.component.Positioning.DEFAULT.getValue());
results.add(map);
}
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java 2011-01-18 12:20:02 UTC (rev 21053)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java 2011-01-18 13:01:51 UTC (rev 21054)
@@ -92,30 +92,23 @@
return "";
}
-
+
protected String getOnClickFunction(FacesContext facesContext, UIComponent component) {
AbstractMenuItem menuItem = (AbstractMenuItem) component;
Mode subminMode = resolveSubmitMode(menuItem);
- if (menuItem.isDisabled()) {
- return "";
- } else if (subminMode == null || Mode.server.equals(subminMode)) {
- return getServerSubmitFunction(menuItem);
- } else if (Mode.ajax.equals(subminMode)) {
+ if (Mode.ajax.equals(subminMode)) {
return getOnClick(facesContext, menuItem);
- } else if (Mode.client.equals(subminMode)) {
+ } else {
return "";
}
-
- return "";
}
protected Mode resolveSubmitMode(AbstractMenuItem menuItem) {
- Mode submitMode = menuItem.getMode();
- if (null != submitMode) {
- return submitMode;
+ if (menuItem.getMode() != null) {
+ return menuItem.getMode();
}
AbstractDropDownMenu parent = getDDMenu(menuItem);
- if (parent != null) {
+ if (parent != null && parent.getMode() != null) {
return parent.getMode();
}
return Mode.server;
@@ -182,5 +175,9 @@
return false;
}
return true;
- }
+ }
+
+ public String getSubmitMode(UIComponent component){
+ return this.resolveSubmitMode((AbstractMenuItem) component).name();
+ }
}
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu-base.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu-base.js 2011-01-18 12:20:02 UTC (rev 21053)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu-base.js 2011-01-18 13:01:51 UTC (rev 21054)
@@ -70,7 +70,7 @@
navEventHandlers["keydown" + this.namespace] = this.__keydownHandler;
rf.Event.bind(this.popupElement, navEventHandlers, this);
- }
+ };
rf.BaseComponent.extend(rf.ui.MenuBase);
@@ -111,45 +111,41 @@
rf.ui.MenuManager.setActiveSubMenu(rf.$(this.element));
}
this.popupElement.focus();
-
},
- __hidePopup : function() {
- /*
- * for (var i in this.groupList) { this.groupList[i].hide(); }
- */
- if (this.__isShown()) {
- this.invokeEvent("hide", rf.getDomElement(this.id), null);
- this.__closeChildGroups();
- this.popup.hide();
- this.displayed = false;
- this.__deselectCurrentItem();
- this.currentSelectedItemIndex = -1;
- jqueryParentMenu=this.__getParentMenu();
- parentMenu = rf.$(this.__getParentMenu());
- if (this.id != parentMenu.id)
- {
- parentMenu.popupElement.focus();
- rf.ui.MenuManager.setActiveSubMenu(parentMenu);
- }
- }
+ __hidePopup : function() {
+ if (this.__isShown()) {
+ this.invokeEvent("hide", rf.getDomElement(this.id), null);
+ this.__closeChildGroups();
+ this.popup.hide();
+ this.displayed = false;
+ this.__deselectCurrentItem();
+ this.currentSelectedItemIndex = -1;
+ jqueryParentMenu = this.__getParentMenu();
+ parentMenu = rf.$(this.__getParentMenu());
+ if (this.id != parentMenu.id) {
+ parentMenu.popupElement.focus();
+ rf.ui.MenuManager.setActiveSubMenu(parentMenu);
+ }
+ }
+ },
- },
-
- __closeChildGroups : function() {
+ __closeChildGroups : function() {
var i = 0;
- for (i in this.items) {
- menuItem = this.items.eq(i);
- if (this.__isGroup(menuItem)) {
- rf.$(menuItem).hide();
- }
- }
+ var menuItem;
+ for (i in this.items) {
+ menuItem = this.items.eq(i);
+ if (this.__isGroup(menuItem)) {
+ rf.$(menuItem).hide();
+ }
+ }
},
__getParentMenuFromItem : function(item) {
- if (item)
- menu = item.parents('div.rf-ddm-itm')
- .has('div.rf-ddm-lst-bg').eq(1);
+ var menu;
+ if (item)
+ menu = item.parents('div.rf-ddm-itm')
+ .has('div.rf-ddm-lst-bg').eq(1);
if (menu && menu.length > 0)
return menu;
else {
@@ -162,8 +158,8 @@
},
__getParentMenu : function() {
- menu = $(this.element).parents('div.rf-ddm-itm')
- .has('div.rf-ddm-lst-bg').eq(0);
+ var menu = $(this.element).parents('div.rf-ddm-itm')
+ .has('div.rf-ddm-lst-bg').eq(0);
if (menu && menu.length > 0)
return menu;
else {
@@ -174,10 +170,7 @@
__isGroup : function(item) {
var group = item.find('div.' + this.options.listCss);
- if (group.length > 0) {
- return true;
- }
- return false;
+ return group.length > 0;
},
__isDisabled : function(item) {
@@ -218,14 +211,14 @@
}, this), this.options.showDelay);
},
- __leaveHandler : function(e) {
+ __leaveHandler : function() {
window.clearTimeout(this.showTimeoutId);
this.hideTimeoutId = window.setTimeout($.proxy(function() {
this.hide();
}, this), this.options.hideDelay);
},
- __overHandler : function(e) {
+ __overHandler : function() {
window.clearTimeout(this.hideTimeoutId);
},
@@ -239,4 +232,4 @@
};
})());
-})(jQuery, RichFaces)
\ No newline at end of file
+})(jQuery, RichFaces);
\ No newline at end of file
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu.js 2011-01-18 12:20:02 UTC (rev 21053)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu.js 2011-01-18 13:01:51 UTC (rev 21054)
@@ -19,7 +19,7 @@
disabledItemCss : "rf-ddm-itm-dis",
listCss : "rf-ddm-lst",
listContainerCss : "rf-ddm-lst-bg"
- }
+ };
// constructor definition
rf.ui.Menu = function(componentId, options) {
@@ -53,45 +53,32 @@
var groupId = groupOptions[i].id;
var positionOffset = [
groupOptions[i].horizontalOffset,
- groupOptions[i].verticalOffset]
+ groupOptions[i].verticalOffset];
var onshow = groupOptions[i].onshow;
var onhide = groupOptions[i].onhide;
- var eventType = "mouseover";
+ //var eventType = "mouseover";
if (null != groupId) {
// var popup = new RichFaces.ui.Popup(groupId +
// '_list', options);
- var group = new RichFaces.ui.MenuGroup(groupId,
- {
- rootMenuId : this.id,
- onshow : onshow,
- onhide : onhide
- });
- this.groupList[groupId] = group;
+ this.groupList[groupId] = new RichFaces.ui.MenuGroup(groupId,
+ {
+ rootMenuId : this.id,
+ onshow : onshow,
+ onhide : onhide,
+ positionOffset: positionOffset
+ });
}
}
},
- submitForm : function(item) {
- var form = this.__getParentForm(item);
- if (this.options.mode == "server") {
- rf.submitForm(form, {
- selectedMenuItem : item.id
- });
- }
- if (this.options.mode == "ajax") {
- rf.ajax(item.id);
- }
- },
-
show : function() {
if (this.menuManager.openedMenu != this.id) {
this.menuManager.shutdownMenu();
this.menuManager.addMenuId(this.id);
this.__showPopup();
}
- this.popupElement.focus();
},
hide : function() {
@@ -99,10 +86,6 @@
this.menuManager.deletedMenuId();
},
- __getParentForm : function(item) {
- return item.parents("form")[0];
- },
-
destroy : function() {
// clean up code here
this.detach(this.id);
@@ -142,4 +125,4 @@
}
}
-})(jQuery, RichFaces)
\ No newline at end of file
+})(jQuery, RichFaces);
\ No newline at end of file
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menuitem.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menuitem.js 2011-01-18 12:20:02 UTC (rev 21053)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menuitem.js 2011-01-18 13:01:51 UTC (rev 21054)
@@ -1,69 +1,82 @@
(function($, rf) {
- rf.ui = rf.ui || {};
-
- var defaultOptions = {
- selectItemCss : "rf-ddm-itm-sel",
- unselectItemCss : "rf-ddm-itm-unsel",
-
- }
-
- // constructor definition
-
- rf.ui.MenuItem = function(componentId, options) {
- this.options = options;
- $super.constructor.call(this, componentId);
- this.attachToDom(componentId);
- this.element = $(rf.getDomElement(componentId));
- rf.Event.bindById(this.id,'click', this.__clickHandler, this);
- rf.Event.bindById(this.id,'mouseenter',this.select, this);
- rf.Event.bindById(this.id,'mouseleave',this.unselect, this);
- this.selected = false;
- }
-
- rf.BaseComponent.extend(rf.ui.MenuItem);
-
- // define super class link
- var $super = rf.ui.MenuItem.$super;
-
- $.extend(rf.ui.MenuItem.prototype, (function() {
-
- return {
- name : "MenuItem",
- select : function() {
- this.element.removeClass('rf-ddm-itm-unsel');
- this.element.addClass('rf-ddm-itm-sel');
- this.selected = true;
- },
- unselect : function() {
- this.element.removeClass('rf-ddm-itm-sel');
- this.element.addClass('rf-ddm-itm-unsel');
- this.selected = false;
- },
- activate : function() {
- this.invokeEvent('click',rf.getDomElement(this.id));
- },
-
- isSelected : function() {
- return this.selected;
- },
-
- __clickHandler : function (e) {
- parentMenu = this.__getParentMenu();
- if (parentMenu){
- this.__getParentMenu().processItem(this.element);
- }
- if (this.options.submitFunction){
- this.options.submitFunction.call(this,e);
- }
- },
-
- __getParentMenu : function () {
- menu = this.element.parents('div.rf-ddm-lbl');
- if (menu && menu.length > 0) return rf.$(menu);
- else return null;
-
- },
- };
-})());
-
-})(jQuery, RichFaces)
\ No newline at end of file
+ rf.ui = rf.ui || {};
+
+ // constructor definition
+
+ rf.ui.MenuItem = function(componentId, options) {
+ this.options = options;
+ $super.constructor.call(this, componentId);
+ this.attachToDom(componentId);
+ this.element = $(rf.getDomElement(componentId));
+ rf.Event.bindById(this.id, 'click', this.__clickHandler, this);
+ rf.Event.bindById(this.id, 'mouseenter', this.select, this);
+ rf.Event.bindById(this.id, 'mouseleave', this.unselect, this);
+ this.selected = false;
+ };
+
+ rf.BaseComponent.extend(rf.ui.MenuItem);
+
+ // define super class link
+ var $super = rf.ui.MenuItem.$super;
+
+ $.extend(rf.ui.MenuItem.prototype, (function() {
+
+ return {
+ name : "MenuItem",
+ select : function() {
+ this.element.removeClass('rf-ddm-itm-unsel');
+ this.element.addClass('rf-ddm-itm-sel');
+ this.selected = true;
+ },
+ unselect : function() {
+ this.element.removeClass('rf-ddm-itm-sel');
+ this.element.addClass('rf-ddm-itm-unsel');
+ this.selected = false;
+ },
+ activate : function() {
+ this.invokeEvent('click', rf.getDomElement(this.id));
+ },
+
+ isSelected : function() {
+ return this.selected;
+ },
+
+ __clickHandler : function (e) {
+ var parentMenu = this.__getParentMenu();
+ if (parentMenu) {
+ this.__getParentMenu().processItem(this.element);
+ }
+
+ this.__submitForm(rf.getDomElement(this.id), e);
+ },
+
+ /**
+ *
+ * @param item DOM element
+ */
+ __submitForm : function(item, e) {
+ var form = this.__getParentForm(item);
+ var itemId = {};
+ itemId[item.id] = item.id;
+ if (this.options.mode == "server") {
+ rf.submitForm(form, itemId);
+ }
+ if (this.options.mode == "ajax" && this.options.submitFunction) {
+ this.options.submitFunction.call(this, e);
+ }
+ },
+
+ __getParentForm : function(item) {
+ return $($(item).parents("form").get(0));
+ },
+
+ __getParentMenu : function () {
+ var menu = this.element.parents('div.rf-ddm-lbl');
+ if (menu && menu.length > 0) return rf.$(menu);
+ else return null;
+
+ }
+ };
+ })());
+
+})(jQuery, RichFaces);
\ No newline at end of file
Modified: trunk/ui/output/ui/src/main/templates/dropdownmenu.template.xml
===================================================================
--- trunk/ui/output/ui/src/main/templates/dropdownmenu.template.xml 2011-01-18 12:20:02 UTC (rev 21053)
+++ trunk/ui/output/ui/src/main/templates/dropdownmenu.template.xml 2011-01-18 13:01:51 UTC (rev 21054)
@@ -50,8 +50,8 @@
<script type="text/javascript">
<cdk:scriptObject name="options">
- <cdk:scriptOption name="direction" value="#{getDirection(component)}"/>
- <cdk:scriptOption name="jointPoint" value="#{getJointPoint(component)}"/>
+ <cdk:scriptOption name="direction" value="#{getDirection(component).getValue()}"/>
+ <cdk:scriptOption name="jointPoint" value="#{getJointPoint(component).getValue()}"/>
<cdk:scriptOption name="showEvent" value="#{getShowEvent(component)}"/>
<cdk:scriptOption name="mode" value="#{getMode(component)}"/>
<cdk:scriptOption attributes="hideDelay showEvent showDelay horizontalOffset verticalOffset" />
Modified: trunk/ui/output/ui/src/main/templates/menuitem.template.xml
===================================================================
--- trunk/ui/output/ui/src/main/templates/menuitem.template.xml 2011-01-18 12:20:02 UTC (rev 21053)
+++ trunk/ui/output/ui/src/main/templates/menuitem.template.xml 2011-01-18 13:01:51 UTC (rev 21054)
@@ -80,7 +80,8 @@
<c:when test="#{not isDisabled}">
<script type="text/javascript">
<cdk:scriptObject name="options">
- <cdk:scriptOption name="submitFunction" value="#{getOnClickFunction(facesContext, component)}" wrapper="eventHandler"/>
+ <cdk:scriptOption name="mode" value="#{getSubmitMode(component)}" />
+ <cdk:scriptOption name="submitFunction" value="#{getOnClickFunction(facesContext, component)}" wrapper="eventHandler"/>
</cdk:scriptObject>
new RichFaces.ui.MenuItem(#{toScriptArgs(clientId, options)});
13 years, 11 months
JBoss Rich Faces SVN: r21053 - in trunk/ui/output/ui/src/main: java/org/richfaces/renderkit/html and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-01-18 07:20:02 -0500 (Tue, 18 Jan 2011)
New Revision: 21053
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPopupPanel.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractProgressBar.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractToolbar.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarBaseRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarStateEncoder.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ToolbarRendererBase.java
trunk/ui/output/ui/src/main/templates/popupPanel.template.xml
trunk/ui/output/ui/src/main/templates/progressBar.template.xml
Log:
RF-10097 Inline default values: output components I
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPopupPanel.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPopupPanel.java 2011-01-18 09:13:11 UTC (rev 21052)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPopupPanel.java 2011-01-18 12:20:02 UTC (rev 21053)
@@ -44,34 +44,34 @@
@Attribute
public abstract String getVisualOptions();
- @Attribute(defaultValue = "100")
+ @Attribute
public abstract int getZindex();
- @Attribute(defaultValue = "-1")
+ @Attribute
public abstract int getHeight();
- @Attribute(defaultValue = "-1")
+ @Attribute
public abstract int getWidth();
- @Attribute(defaultValue = "-1")
+ @Attribute
public abstract int getMinHeight();
- @Attribute(defaultValue = "-1")
+ @Attribute
public abstract int getMinWidth();
- @Attribute(defaultValue = "" + Integer.MAX_VALUE)
+ @Attribute
public abstract int getMaxHeight();
- @Attribute(defaultValue = "" + Integer.MAX_VALUE)
+ @Attribute
public abstract int getMaxWidth();
- @Attribute(defaultValue = "auto")
+ @Attribute
public abstract String getTop();
- @Attribute(defaultValue = "auto")
+ @Attribute
public abstract String getLeft();
- @Attribute(defaultValue = "false")
+ @Attribute
public abstract boolean isShow();
public abstract void setShow(boolean show);
@@ -79,22 +79,22 @@
@Attribute(defaultValue = "true")
public abstract boolean isMoveable();
- @Attribute(defaultValue = "false")
+ @Attribute
public abstract boolean isAutosized();
@Attribute(defaultValue = "true")
public abstract boolean isModal();
- @Attribute(defaultValue = "false")
+ @Attribute
public abstract boolean isKeepVisualState();
- @Attribute(defaultValue = "false")
+ @Attribute
public abstract boolean isOverlapEmbedObjects();
- @Attribute(defaultValue = "false")
+ @Attribute
public abstract boolean isResizeable();
- @Attribute(defaultValue = "false")
+ @Attribute
public abstract boolean isTrimOverlayedElements();
@Attribute
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractProgressBar.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractProgressBar.java 2011-01-18 09:13:11 UTC (rev 21052)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractProgressBar.java 2011-01-18 12:20:02 UTC (rev 21053)
@@ -96,10 +96,10 @@
public abstract void setData(Object data);
- @Attribute(defaultValue = "1000")
+ @Attribute
public abstract int getInterval();
- @Attribute(defaultValue = "false")
+ @Attribute
public abstract boolean isEnabled();
@Attribute(events = @EventName("beforedomupdate"))
@@ -123,13 +123,13 @@
@Attribute
public abstract String getFinishClass();
- @Attribute(defaultValue = "SwitchType.DEFAULT")
+ @Attribute
public abstract SwitchType getMode();
- @Attribute(defaultValue = "100")
+ @Attribute
public abstract int getMaxValue();
- @Attribute(defaultValue = "0")
+ @Attribute
public abstract int getMinValue();
@Attribute
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractToolbar.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractToolbar.java 2011-01-18 09:13:11 UTC (rev 21052)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractToolbar.java 2011-01-18 12:20:02 UTC (rev 21053)
@@ -44,7 +44,7 @@
@Attribute
public abstract String getHeight();
- @Attribute(defaultValue = "100%")
+ @Attribute
public abstract String getWidth();
@Attribute
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java 2011-01-18 09:13:11 UTC (rev 21052)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java 2011-01-18 12:20:02 UTC (rev 21053)
@@ -37,6 +37,9 @@
private static final int SIZE = 10;
private static final String STATE_OPTION_SUFFIX = "StateOption_";
+ private static final String DEFAULT_PROPERTY_LEFT = "auto";
+ private static final String DEFAULT_PROPERTY_TOP = "auto";
+
//TODO nick - use enums
private static final Set<String> ALLOWED_ATTACHMENT_OPTIONS = new HashSet<String>();
static {
@@ -207,4 +210,36 @@
+ "] must be instance of Map or String, but its type is " + value.getClass().getSimpleName());
}
}
+
+ protected String getLeftOrDefault(UIComponent component) {
+ String leftProperty = ((AbstractPopupPanel) component).getLeft();
+ if (leftProperty == null || leftProperty.length() == 0) {
+ leftProperty = DEFAULT_PROPERTY_LEFT;
+ }
+ return leftProperty;
+ }
+
+ protected String getTopOrDefault(UIComponent component) {
+ String topProperty = ((AbstractPopupPanel) component).getTop();
+ if (topProperty == null || topProperty.length() == 0) {
+ topProperty = DEFAULT_PROPERTY_TOP;
+ }
+ return topProperty;
+ }
+
+ protected int getMaxWidthOrDefault(UIComponent component) {
+ int maxWidth = ((AbstractPopupPanel) component).getMaxWidth();
+ if (maxWidth == 0) {
+ maxWidth = Integer.MAX_VALUE;
+ }
+ return maxWidth;
+ }
+
+ protected int getMaxHeightOrDefault(UIComponent component) {
+ int maxHeight = ((AbstractPopupPanel) component).getMaxHeight();
+ if (maxHeight == 0) {
+ maxHeight = Integer.MAX_VALUE;
+ }
+ return maxHeight;
+ }
}
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarBaseRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarBaseRenderer.java 2011-01-18 09:13:11 UTC (rev 21052)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarBaseRenderer.java 2011-01-18 12:20:02 UTC (rev 21053)
@@ -74,6 +74,10 @@
private static final ProgressBarStateEncoder FULL_ENCODER = new ProgressBarStateEncoder(false);
private static final ProgressBarStateEncoder PARTIAL_ENCODER = new ProgressBarStateEncoder(true);
+
+ private static final int DEFAULT_MIN_VALUE = 0;
+
+ private static final int DEFAULT_MAX_VALUE = 100;
@Override
protected void doDecode(FacesContext context, UIComponent component) {
@@ -98,7 +102,7 @@
return false;
}
- SwitchType mode = (SwitchType) component.getAttributes().get("mode");
+ SwitchType mode = getModeOrDefault(component);
if (mode == SwitchType.server) {
throw new IllegalArgumentException("Progress bar doesn't support 'server' mode");
@@ -190,4 +194,28 @@
protected ProgressBarStateEncoder getEncoder(FacesContext facesContext, UIComponent component) {
return isAjaxMode(component) ? PARTIAL_ENCODER : FULL_ENCODER;
}
+
+ protected int getMaxValueOrDefault(UIComponent component) {
+ int maxValue = ((AbstractProgressBar) component).getMaxValue();
+ if (maxValue == 0) {
+ maxValue = DEFAULT_MAX_VALUE;
+ }
+ return maxValue;
+ }
+
+ protected int getMinValueOrDefault(UIComponent component) {
+ int maxValue = ((AbstractProgressBar) component).getMinValue();
+ if (maxValue == 0) {
+ maxValue = DEFAULT_MIN_VALUE;
+ }
+ return maxValue;
+ }
+
+ protected SwitchType getModeOrDefault(UIComponent component) {
+ SwitchType mode = ((AbstractProgressBar) component).getMode();
+ if (mode == null) {
+ mode = SwitchType.DEFAULT;
+ }
+ return mode;
+ }
}
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarStateEncoder.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarStateEncoder.java 2011-01-18 09:13:11 UTC (rev 21052)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarStateEncoder.java 2011-01-18 12:20:02 UTC (rev 21053)
@@ -79,8 +79,8 @@
protected String getWidth(UIComponent component) {
Number value = NumberUtils.getNumber(component.getAttributes().get("value"));
- Number minValue = NumberUtils.getNumber(component.getAttributes().get("minValue"));
- Number maxValue = NumberUtils.getNumber(component.getAttributes().get("maxValue"));
+ Number minValue = NumberUtils.getNumber(component.getAttributes().get("minValue") == null ? 0 : component.getAttributes().get("minValue"));
+ Number maxValue = NumberUtils.getNumber(component.getAttributes().get("maxValue") == null ? 100 : component.getAttributes().get("maxValue"));
Number percent = calculatePercent(value, minValue, maxValue);
return String.valueOf(percent.intValue());
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ToolbarRendererBase.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ToolbarRendererBase.java 2011-01-18 09:13:11 UTC (rev 21052)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ToolbarRendererBase.java 2011-01-18 12:20:02 UTC (rev 21053)
@@ -355,7 +355,11 @@
protected String getWidthToolbar(UIComponent component) {
if (component instanceof AbstractToolbar) {
- return HtmlDimensions.formatSize(((AbstractToolbar)component).getWidth());
+ String width = ((AbstractToolbar)component).getWidth();
+ if (width == null || width.length() == 0) {
+ return "100%";
+ }
+ return HtmlDimensions.formatSize(width);
} else {
return "";
}
Modified: trunk/ui/output/ui/src/main/templates/popupPanel.template.xml
===================================================================
--- trunk/ui/output/ui/src/main/templates/popupPanel.template.xml 2011-01-18 09:13:11 UTC (rev 21052)
+++ trunk/ui/output/ui/src/main/templates/popupPanel.template.xml 2011-01-18 12:20:02 UTC (rev 21053)
@@ -73,9 +73,13 @@
</div>
<cdk:scriptObject name="options">
- <cdk:scriptOption attributes="width height minWidth minHeight maxWidth maxHeight moveable followByScroll left top zindex shadowDepth shadowOpacity domElementAttachment show keepVisualState autosized resizeable modal overlapEmbedObjects visualOptions " />
- <cdk:scriptOption attributes="onshow onhide onresize onmove onbeforeshow onbeforehide" wrapper="eventHandler"/>
- </cdk:scriptObject>
+ <cdk:scriptOption name="left" value="#{getLeftOrDefault(component)}"/>
+ <cdk:scriptOption name="top" value="#{getTopOrDefault(component)}"/>
+ <cdk:scriptOption name="maxWidth" value="#{getMaxWidthOrDefault(component)}"/>
+ <cdk:scriptOption name="maxHeight" value="#{getMaxHeightOrDefault(component)}"/>
+ <cdk:scriptOption attributes="width height minWidth minHeight moveable followByScroll zindex shadowDepth shadowOpacity domElementAttachment show keepVisualState autosized resizeable modal overlapEmbedObjects visualOptions " />
+ <cdk:scriptOption attributes="onshow onhide onresize onmove onbeforeshow onbeforehide" wrapper="eventHandler"/>
+ </cdk:scriptObject>
<script type="text/javascript">
new RichFaces.ui.PopupPanel(#{toScriptArgs(clientId, options)});
Modified: trunk/ui/output/ui/src/main/templates/progressBar.template.xml
===================================================================
--- trunk/ui/output/ui/src/main/templates/progressBar.template.xml 2011-01-18 09:13:11 UTC (rev 21052)
+++ trunk/ui/output/ui/src/main/templates/progressBar.template.xml 2011-01-18 12:20:02 UTC (rev 21053)
@@ -37,8 +37,8 @@
<script type="text/javascript">
<cdk:scriptObject name="options">
<cdk:scriptOption name="submitFunction" value="#{getSubmitFunction(facesContext, component)}" />
- <cdk:scriptOption name="minValue" value="#{component.attributes['minValue']}" defaultValue="0" />
- <cdk:scriptOption name="maxValue" value="#{component.attributes['maxValue']}" defaultValue="100" />
+ <cdk:scriptOption name="minValue" value="#{getMinValueOrDefault(component)}" />
+ <cdk:scriptOption name="maxValue" value="#{getMaxValueOrDefault(component)}" />
<cdk:scriptOption attributes="interval enabled value onfinish resource" />
</cdk:scriptObject>
13 years, 11 months
JBoss Rich Faces SVN: r21052 - modules/tests/metamer/trunk/ftest/src/test/resources.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-01-18 04:13:11 -0500 (Tue, 18 Jan 2011)
New Revision: 21052
Modified:
modules/tests/metamer/trunk/ftest/src/test/resources/testng-iteration.xml
modules/tests/metamer/trunk/ftest/src/test/resources/testng-misc.xml
Log:
added rich:column, rich:columnGroup, rich:collapsibleSubTable and rich:collapsibleSubTableToggler to testng-iteration.xml (dataScroller moved from misc to iteration) (RFPL-729, RFPL-730, RPFL-731, RFPL-732)
Modified: modules/tests/metamer/trunk/ftest/src/test/resources/testng-iteration.xml
===================================================================
--- modules/tests/metamer/trunk/ftest/src/test/resources/testng-iteration.xml 2011-01-18 09:04:20 UTC (rev 21051)
+++ modules/tests/metamer/trunk/ftest/src/test/resources/testng-iteration.xml 2011-01-18 09:13:11 UTC (rev 21052)
@@ -3,8 +3,13 @@
<test name="Iteration Components">
<packages>
+ <package name="org.richfaces.tests.metamer.ftest.richCollapsibleSubTable" />
+ <package name="org.richfaces.tests.metamer.ftest.richCollapsibleSubTableToggler" />
+ <package name="org.richfaces.tests.metamer.ftest.richColumn" />
+ <package name="org.richfaces.tests.metamer.ftest.richColumnGroup" />
<package name="org.richfaces.tests.metamer.ftest.richDataGrid" />
<package name="org.richfaces.tests.metamer.ftest.richDataTable" />
+ <package name="org.richfaces.tests.metamer.ftest.richDataScroller" />
<package name="org.richfaces.tests.metamer.ftest.richExtendedDataTable" />
</packages>
</test>
Modified: modules/tests/metamer/trunk/ftest/src/test/resources/testng-misc.xml
===================================================================
--- modules/tests/metamer/trunk/ftest/src/test/resources/testng-misc.xml 2011-01-18 09:04:20 UTC (rev 21051)
+++ modules/tests/metamer/trunk/ftest/src/test/resources/testng-misc.xml 2011-01-18 09:13:11 UTC (rev 21052)
@@ -5,7 +5,6 @@
<packages>
<package name="org.richfaces.tests.metamer.ftest.hCommandButton" />
<package name="org.richfaces.tests.metamer.ftest.richComponentControl" />
- <package name="org.richfaces.tests.metamer.ftest.richDataScroller" />
<package name="org.richfaces.tests.metamer.ftest.richFunctions" />
<package name="org.richfaces.tests.metamer.ftest.richJQuery" />
<package name="org.richfaces.tests.metamer.ftest.richMenuGroup" />
13 years, 11 months
JBoss Rich Faces SVN: r21051 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-01-18 04:04:20 -0500 (Tue, 18 Jan 2011)
New Revision: 21051
Added:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableFiltering.java
Log:
rich:collapsibleSubTable - automated Filtering sample (RFPL-731)
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableFiltering.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableFiltering.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableFiltering.java 2011-01-18 09:04:20 UTC (rev 21051)
@@ -0,0 +1,160 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.ftest.richCollapsibleSubTable;
+
+import static org.apache.commons.lang.StringUtils.isBlank;
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
+import static org.jboss.test.selenium.locator.LocatorFactory.jq;
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+import static org.testng.Assert.assertEquals;
+
+import java.net.URL;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.jboss.test.selenium.framework.AjaxSelenium;
+import org.jboss.test.selenium.framework.AjaxSeleniumProxy;
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.richfaces.tests.metamer.ftest.model.DataTable;
+import org.richfaces.tests.metamer.model.Employee;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.Collections2;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+public class TestCollapsibleSubTableFiltering extends AbstractCollapsibleSubTableTest {
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/richCollapsibleSubTable/filtering.xhtml");
+ }
+
+ int rows = 0;
+
+ @BeforeMethod
+ public void prepare() {
+ attributes.setRows(rows);
+ Column.resetAll();
+ }
+
+ @Test
+ public void testFilteringExpressionContainsIgnoreCase() {
+ filterBy(Column.NAME, "Alexander");
+ verifyFiltering();
+
+ filterBy(Column.NAME, "aLEX");
+ verifyFiltering();
+ }
+
+ @Test
+ public void testFilteringExpressionEquals() {
+ filterBy(Column.TITLE, "Director");
+ verifyFiltering();
+
+ filterBy(Column.TITLE, "director");
+ verifyFiltering();
+
+ filterBy(Column.TITLE, "direct");
+ verifyFiltering();
+ }
+
+ public void verifyFiltering() {
+ filterEmployees();
+
+ int length = (rows <= 0) ? employees.size() : Math.min(rows, employees.size());
+ List<Employee> visibleEmployees = employees.subList(0, length);
+
+ int rowCount = subtable.getRowCount();
+ assertEquals(rowCount, visibleEmployees.size());
+
+ for (int i = 0; i < visibleEmployees.size(); i++) {
+ String name = selenium.getText(subtable.getCell(1, i + 1));
+ String title = selenium.getText(subtable.getCell(2, i + 1));
+
+ assertEquals(name, visibleEmployees.get(i).getName());
+ assertEquals(title, visibleEmployees.get(i).getTitle());
+ }
+ }
+
+ public void filterBy(Column column, String filter) {
+ resetEmployees();
+ column.filter(dataTable, filter);
+ }
+
+ public enum Column {
+ NAME, TITLE, BIRTHDAY;
+
+ AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
+ String filter = "";
+
+ public static void resetAll() {
+ for (Column value : values()) {
+ value.reset();
+ }
+ }
+
+ public void reset() {
+ filter = "";
+ }
+
+ public void filter(DataTable dataTable, String filter) {
+ this.filter = filter;
+ int headerIndex = this.ordinal() + 2; // 1 for index; 1 for additional header on top of links
+ JQueryLocator input = dataTable.getHeader().getNthOccurence(headerIndex).getChild(jq("input:text"));
+ guardXhr(selenium).type(input, filter);
+ }
+
+ public boolean apply(Employee employee) {
+ switch (this) {
+ case NAME:
+ boolean result = isBlank(filter) || employee.getName().toLowerCase().contains(filter.toLowerCase());
+ return result;
+ case TITLE:
+ boolean result1 = isBlank(filter) || employee.getTitle().equals(filter);
+ return result1;
+ case BIRTHDAY:
+ return true;
+ default:
+ throw new IllegalStateException();
+ }
+ }
+ }
+
+ public void filterEmployees() {
+ employees = new LinkedList<Employee>(Collections2.filter(employees, new Predicate<Employee>() {
+ @Override
+ public boolean apply(Employee input) {
+ for (Column column : Column.values()) {
+ if (!column.apply(input)) {
+ return false;
+ }
+ }
+ return true;
+ }
+ }));
+ }
+}
13 years, 11 months
JBoss Rich Faces SVN: r21050 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest: richCollapsibleSubTable and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-01-18 04:03:30 -0500 (Tue, 18 Jan 2011)
New Revision: 21050
Added:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableSorting.java
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/AbstractCollapsibleSubTableTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/CollapsibleSubTableAttributes.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableScroller.java
Log:
rich:collapsibleSubTable - automated Sorting sample (RFPL-731)
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java 2011-01-18 08:48:25 UTC (rev 21049)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java 2011-01-18 09:03:30 UTC (rev 21050)
@@ -130,7 +130,7 @@
protected void applyRadio(ElementLocator<?> locator) {
guard(selenium, requestType).click(locator);
}
-
+
protected void applySelect(ElementLocator<?> locator, String value) {
OptionValueLocator optionLocator = new OptionValueLocator(value);
guard(selenium, requestType).select(locator, optionLocator);
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/AbstractCollapsibleSubTableTest.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/AbstractCollapsibleSubTableTest.java 2011-01-18 08:48:25 UTC (rev 21049)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/AbstractCollapsibleSubTableTest.java 2011-01-18 09:03:30 UTC (rev 21050)
@@ -61,7 +61,7 @@
CollapsibleSubTable subtable;
CollapsibleSubTableToggler toggler;
List<Employee> employees;
-
+
Configuration secondConfiguration;
CollapsibleSubTable secondSubtable;
CollapsibleSubTableToggler secondToggler;
@@ -69,20 +69,24 @@
@Inject
@Use(empty = true)
ExpandMode expandMode;
-
+
@BeforeMethod
public void configure() {
if (configuration != null) {
subtable = configuration.subtable;
toggler = configuration.toggler;
employees = configuration.employees;
-
+
secondConfiguration = configuration.name.equals("Men") ? configurationWomen : configurationMen;
secondSubtable = secondConfiguration.subtable;
secondToggler = secondConfiguration.toggler;
}
}
+ protected void resetEmployees() {
+ employees = configuration.employees;
+ }
+
public class Configuration {
CollapsibleSubTable subtable;
CollapsibleSubTableToggler toggler;
@@ -102,13 +106,13 @@
}
}));
}
-
+
@Override
public String toString() {
return name;
}
}
-
+
protected RequestType getRequestTypeForExpandMode() {
switch (expandMode) {
case ajax:
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/CollapsibleSubTableAttributes.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/CollapsibleSubTableAttributes.java 2011-01-18 08:48:25 UTC (rev 21049)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/CollapsibleSubTableAttributes.java 2011-01-18 09:03:30 UTC (rev 21050)
@@ -37,7 +37,7 @@
* @version $Revision$
*/
public class CollapsibleSubTableAttributes extends AbstractComponentAttributes {
-
+
JQueryLocator showDataLocator = pjq("input[id$=noDataCheckbox]");
public void setShowData(boolean showData) {
@@ -68,7 +68,7 @@
public void setRows(Integer rows) {
setProperty("rows", rows);
}
-
+
public Integer getRows() {
return Integer.valueOf(getProperty("rows"));
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableScroller.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableScroller.java 2011-01-18 08:48:25 UTC (rev 21049)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableScroller.java 2011-01-18 09:03:30 UTC (rev 21050)
@@ -86,7 +86,7 @@
@Test
@Use(field = "expandMode", enumeration = true)
- public void testScrollerWithRowsAttribute() {
+ public void testScroller() {
paginationTester.testNumberedPages();
}
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableSorting.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableSorting.java (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableSorting.java 2011-01-18 09:03:30 UTC (rev 21050)
@@ -0,0 +1,187 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.ftest.richCollapsibleSubTable;
+
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
+import static org.jboss.test.selenium.locator.LocatorFactory.jq;
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+import static org.testng.Assert.assertEquals;
+
+import java.net.URL;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.jboss.test.selenium.framework.AjaxSelenium;
+import org.jboss.test.selenium.framework.AjaxSeleniumProxy;
+import org.richfaces.component.SortOrder;
+import org.richfaces.model.SortMode;
+import org.richfaces.tests.metamer.ftest.annotations.Inject;
+import org.richfaces.tests.metamer.ftest.annotations.Use;
+import org.richfaces.tests.metamer.ftest.model.DataTable;
+import org.richfaces.tests.metamer.model.Employee;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+public class TestCollapsibleSubTableSorting extends AbstractCollapsibleSubTableTest {
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath, "faces/components/richCollapsibleSubTable/sorting-using-column.xhtml");
+ }
+
+ @Inject
+ @Use(enumeration = true)
+ SortMode sortMode;
+
+ int rows = 0;
+
+ List<Column> sortPriority = new LinkedList<Column>();
+
+ @BeforeMethod
+ public void prepare() {
+ sortPriority.clear();
+ Column.resetAll();
+ }
+
+ @Test
+ public void testSorting() {
+ attributes.setRows(rows);
+ attributes.setSortMode(sortMode);
+
+ sortBy(Column.NAME);
+ verifySorting();
+
+ sortBy(Column.TITLE);
+ verifySorting();
+
+ sortBy(Column.NAME);
+ verifySorting();
+
+ sortBy(Column.TITLE);
+ verifySorting();
+ }
+
+ private void sortBy(Column column) {
+ if (sortMode == SortMode.single) {
+ Column.resetAll();
+ resetEmployees();
+ sortPriority.clear();
+ }
+ column.sort(dataTable);
+ sortPriority.remove(column);
+ sortPriority.add(column);
+ }
+
+ public void verifySorting() {
+ sortEmployees();
+
+ List<Employee> visibleEmployees = employees.subList(0, Math.max(rows, employees.size()));
+
+ int rowCount = subtable.getRowCount();
+ assertEquals(rowCount, visibleEmployees.size());
+
+ for (int i = 0; i < visibleEmployees.size(); i++) {
+ String name = selenium.getText(subtable.getCell(1, i + 1));
+ String title = selenium.getText(subtable.getCell(2, i + 1));
+
+ assertEquals(name, visibleEmployees.get(i).getName());
+ assertEquals(title, visibleEmployees.get(i).getTitle());
+ }
+ }
+
+ public void sortEmployees() {
+ employees = new LinkedList<Employee>(employees);
+ Collections.sort(employees, new Comparator<Employee>() {
+ @Override
+ public int compare(Employee o1, Employee o2) {
+ if (sortMode == SortMode.single) {
+ Column lastColumn = sortPriority.get(sortPriority.size() - 1);
+ return lastColumn.compare(o1, o2);
+ } else {
+ for (Column column : sortPriority) {
+ if (column.compare(o1, o2) != 0) {
+ return column.compare(o1, o2);
+ }
+ }
+ return 0;
+ }
+ }
+ });
+ }
+
+ public enum Column {
+ NAME, TITLE, BIRTHDAY;
+
+ AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
+ SortOrder sortOrder = SortOrder.unsorted;
+
+ public static void resetAll() {
+ for (Column value : values()) {
+ value.reset();
+ }
+ }
+
+ public void reset() {
+ sortOrder = SortOrder.unsorted;
+ }
+
+ public void sort(DataTable dataTable) {
+ sortOrder = (sortOrder == SortOrder.ascending) ? SortOrder.descending : SortOrder.ascending;
+ int headerIndex = this.ordinal() + 2; // 1 for index; 1 for additional header on top of links
+ guardXhr(selenium).click(dataTable.getHeader().getNthOccurence(headerIndex).getChild(jq("a")));
+ }
+
+ public int compare(Employee o1, Employee o2) {
+ int result;
+
+ switch (this) {
+ case NAME:
+ result = o1.getName().compareToIgnoreCase(o2.getName());
+ break;
+ case TITLE:
+ result = o1.getTitle().compareToIgnoreCase(o2.getTitle());
+ break;
+ case BIRTHDAY:
+ result = o1.getBirthdate().compareTo(o2.getBirthdate());
+ break;
+ default:
+ throw new IllegalStateException();
+ }
+
+ switch (sortOrder) {
+ case ascending:
+ return result;
+ case descending:
+ return 0 - result;
+ default:
+ throw new IllegalStateException();
+ }
+ }
+ }
+
+}
13 years, 11 months
JBoss Rich Faces SVN: r21049 - in trunk/ui/output/ui/src: main/java/org/richfaces/renderkit/html and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-01-18 03:48:25 -0500 (Tue, 18 Jan 2011)
New Revision: 21049
Added:
trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/DropDownMenuRendererTest.java
Removed:
trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/DrowDownMenuRendererTest.java
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractDropDownMenu.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractMenuGroup.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractMenuItem.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/DropDownMenuRendererBase.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/MenuGroupRendererBase.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java
trunk/ui/output/ui/src/main/templates/dropdownmenu.template.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/dropDownMenu_ajaxMode.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/dropDownMenu_serverMode.xmlunit.xml
Log:
RF-10097 Inline default values: output components I
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractDropDownMenu.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractDropDownMenu.java 2011-01-17 22:49:07 UTC (rev 21048)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractDropDownMenu.java 2011-01-18 08:48:25 UTC (rev 21049)
@@ -19,35 +19,35 @@
public static final String COMPONENT_FAMILY = "org.richfaces.DropDownMenu";
- @Attribute (defaultValue = "click")
+ @Attribute
public abstract String getShowEvent();
- @Attribute(defaultValue = "server")
- public abstract String getMode();
+ @Attribute
+ public abstract Mode getMode();
@Attribute
public abstract boolean isDisabled();
- @Attribute(defaultValue = "300")
+ @Attribute
public abstract int getHideDelay();
- @Attribute(defaultValue = "50")
+ @Attribute
public abstract int getShowDelay();
- @Attribute(defaultValue = "250")
- public abstract int getPopupWith();
+ @Attribute
+ public abstract int getPopupWidth();
- @Attribute(defaultValue = "0")
+ @Attribute
public abstract int getHorizontalOffset();
- @Attribute(defaultValue = "0")
+ @Attribute
public abstract int getVerticalOffset();
//TODO is it correct or cdk issue
- @Attribute(defaultValue = "org.richfaces.component.Positioning.DEFAULT")
+ @Attribute
public abstract Positioning getJointPoint();
- @Attribute(defaultValue = "org.richfaces.component.Positioning.DEFAULT")
+ @Attribute
public abstract Positioning getDirection();
@Attribute(events = @EventName("groupshow"))
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractMenuGroup.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractMenuGroup.java 2011-01-17 22:49:07 UTC (rev 21048)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractMenuGroup.java 2011-01-18 08:48:25 UTC (rev 21049)
@@ -41,17 +41,17 @@
@Attribute
public abstract String getStyle();
- @Attribute(defaultValue = "org.richfaces.component.Positioning.DEFAULT")
+ @Attribute
public abstract Positioning getDirection();
//TODO is it correct or cdk issue
- @Attribute(defaultValue = "org.richfaces.component.Positioning.DEFAULT")
+ @Attribute
public abstract Positioning getJointPoint();
- @Attribute(defaultValue = "0")
+ @Attribute
public abstract String getVerticalOffset();
- @Attribute(defaultValue = "0")
+ @Attribute
public abstract String getHorizontalOffset();
@Attribute(events = @EventName("show"))
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractMenuItem.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractMenuItem.java 2011-01-17 22:49:07 UTC (rev 21048)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractMenuItem.java 2011-01-18 08:48:25 UTC (rev 21049)
@@ -17,7 +17,7 @@
public static final String COMPONENT_TYPE = "org.richfaces.MenuItem";
@Attribute
- public abstract String getMode();
+ public abstract Mode getMode();
@Attribute
public abstract Object getLabel();
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/DropDownMenuRendererBase.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/DropDownMenuRendererBase.java 2011-01-17 22:49:07 UTC (rev 21048)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/DropDownMenuRendererBase.java 2011-01-18 08:48:25 UTC (rev 21049)
@@ -15,6 +15,8 @@
import org.richfaces.component.AbstractMenuGroup;
import org.richfaces.component.AbstractMenuItem;
import org.richfaces.component.AbstractMenuSeparator;
+import org.richfaces.component.Mode;
+import org.richfaces.component.Positioning;
import org.richfaces.renderkit.RenderKitUtils;
import org.richfaces.renderkit.RenderKitUtils.ScriptHashVariableWrapper;
import org.richfaces.renderkit.RendererBase;
@@ -30,8 +32,7 @@
@ResourceDependency(library = "org.richfaces", name = "dropdownmenu.ecss", target="head"),
@ResourceDependency(library = "org.richfaces", name = "menuKeyNavigation.js"),
@ResourceDependency(library = "org.richfaces", name = "menu-base.js"),
- @ResourceDependency(library = "org.richfaces", name = "menu.js"),
- @ResourceDependency(library = "org.richfaces", name = "popupList.js")})
+ @ResourceDependency(library = "org.richfaces", name = "menu.js")})
public abstract class DropDownMenuRendererBase extends RendererBase {
public static final String RENDERER_TYPE = "org.richfaces.DropDownMenuRenderer";
@@ -90,15 +91,57 @@
RenderKitUtils.addToScriptHash(map, "onshow", group.getOnshow(), null, ScriptHashVariableWrapper.eventHandler);
RenderKitUtils.addToScriptHash(map, "verticalOffset", group.getVerticalOffset(), "0");
RenderKitUtils.addToScriptHash(map, "horizontalOffset", group.getHorizontalOffset(), "0");
- RenderKitUtils.addToScriptHash(map, "jointPoint", group.getJointPoint(), org.richfaces.component.Positioning.DEFAULT);
- RenderKitUtils.addToScriptHash(map, "direction", group.getDirection(), org.richfaces.component.Positioning.DEFAULT);
+
+ Positioning jointPoint = group.getJointPoint();
+ if (jointPoint == null) {
+ jointPoint = org.richfaces.component.Positioning.DEFAULT;
+ }
+ RenderKitUtils.addToScriptHash(map, "jointPoint", jointPoint, org.richfaces.component.Positioning.DEFAULT);
+ Positioning direction = group.getDirection();
+ if (direction == null) {
+ direction = org.richfaces.component.Positioning.DEFAULT;
+ }
+ RenderKitUtils.addToScriptHash(map, "direction", direction, org.richfaces.component.Positioning.DEFAULT);
+
results.add(map);
}
}
return results;
}
+
+ protected int getPopupWidth(UIComponent component) {
+ int width = ((AbstractDropDownMenu) component).getPopupWidth();
+ if (width <= 0) {
+ width = DEFAULT_MIN_POPUP_WIDTH;
+ }
+ return width;
+ }
+ protected Mode getMode(UIComponent component) {
+ Mode mode = ((AbstractDropDownMenu) component).getMode();
+ if (mode == null) {
+ mode = Mode.server;
+ }
+ return mode;
+ }
+
+ protected Positioning getJointPoint(UIComponent component) {
+ Positioning jointPoint = ((AbstractDropDownMenu) component).getJointPoint();
+ if (jointPoint == null) {
+ jointPoint = org.richfaces.component.Positioning.DEFAULT;
+ }
+ return jointPoint;
+ }
+
+ protected Positioning getDirection(UIComponent component) {
+ Positioning direction = ((AbstractDropDownMenu) component).getDirection();
+ if (direction == null) {
+ direction = org.richfaces.component.Positioning.DEFAULT;
+ }
+ return direction;
+ }
+
private void getMenuGroups(UIComponent component, List<AbstractMenuGroup> list) {
if (component != null && list != null) {
for (UIComponent c : component.getChildren()) {
@@ -110,10 +153,11 @@
}
}
- protected int getMinPopupWidth(FacesContext facesContext, UIComponent component) {
- if (component instanceof AbstractDropDownMenu) {
- ((AbstractDropDownMenu) component).getPopupWith();
+ protected String getShowEvent(UIComponent component) {
+ String value = ((AbstractDropDownMenu) component).getShowEvent();
+ if (value == null || "".equals(value)) {
+ value = "click";
}
- return DEFAULT_MIN_POPUP_WIDTH;
+ return value;
}
}
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/MenuGroupRendererBase.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/MenuGroupRendererBase.java 2011-01-17 22:49:07 UTC (rev 21048)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/MenuGroupRendererBase.java 2011-01-18 08:48:25 UTC (rev 21049)
@@ -86,10 +86,14 @@
protected int getMinPopupWidth(FacesContext facesContext, UIComponent component) {
UIComponent parent = getDDMenu(facesContext, component);
+ int width = 0;
if (parent != null) {
- return ((AbstractDropDownMenu) parent).getPopupWith();
+ width = ((AbstractDropDownMenu) parent).getPopupWidth();
+ if (width <= 0) {
+ width = DEFAULT_MIN_POPUP_WIDTH;
+ }
}
- return DEFAULT_MIN_POPUP_WIDTH;
+ return width;
}
/**
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java 2011-01-17 22:49:07 UTC (rev 21048)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java 2011-01-18 08:48:25 UTC (rev 21049)
@@ -56,7 +56,6 @@
@Override
public void doDecode(FacesContext context, UIComponent component) {
AbstractMenuItem menuItem = (AbstractMenuItem) component;
-
if (menuItem != null) {
Mode mode = resolveSubmitMode(menuItem);
if (!Mode.client.equals(mode)) {
@@ -111,13 +110,13 @@
}
protected Mode resolveSubmitMode(AbstractMenuItem menuItem) {
- String submitMode = menuItem.getMode();
+ Mode submitMode = menuItem.getMode();
if (null != submitMode) {
- return Mode.valueOf(submitMode);
+ return submitMode;
}
AbstractDropDownMenu parent = getDDMenu(menuItem);
if (parent != null) {
- return Mode.valueOf(parent.getMode());
+ return parent.getMode();
}
return Mode.server;
}
@@ -135,7 +134,13 @@
return concatClasses(styleClass, component.getAttributes().get(menuItemStyle));
}
-
+
+ /**
+ * Finds a parent of given UI <code>component</code>.
+ * @param component <code>UIComponent</code>
+ * @param parentClass <code>Class</code> of desired parent
+ * @return <code>UIComponent</code>
+ */
private UIComponent getParent(UIComponent component, Class<?> parentClass) {
if (component != null && parentClass != null) {
UIComponent parent = component.getParent();
Modified: trunk/ui/output/ui/src/main/templates/dropdownmenu.template.xml
===================================================================
--- trunk/ui/output/ui/src/main/templates/dropdownmenu.template.xml 2011-01-17 22:49:07 UTC (rev 21048)
+++ trunk/ui/output/ui/src/main/templates/dropdownmenu.template.xml 2011-01-18 08:48:25 UTC (rev 21049)
@@ -41,7 +41,7 @@
<c:if test="#{not isDisabled(facesContext, component)}">
<div class="rf-ddm-pos">
- <div id="#{clientId}_list" class="rf-ddm-lst" style="display:none;min-width:#{getMinPopupWidth(facesContext, component)}px;">
+ <div id="#{clientId}_list" class="rf-ddm-lst" style="display:none;min-width:#{getPopupWidth(component)}px;">
<div class="rf-ddm-lst-bg">
<cdk:call expression="renderChildren(facesContext, component)" />
</div>
@@ -50,9 +50,11 @@
<script type="text/javascript">
<cdk:scriptObject name="options">
- <cdk:call expression='addToScriptHash(options, "direction", ((org.richfaces.component.Positioning)component.getAttributes().get("direction")).getValue())' />
- <cdk:call expression='addToScriptHash(options, "jointPoint", ((org.richfaces.component.Positioning)component.getAttributes().get("jointPoint")).getValue())' />
- <cdk:scriptOption attributes="hideDelay showEvent showDelay popupWith mode horizontalOffset verticalOffset" />
+ <cdk:scriptOption name="direction" value="#{getDirection(component)}"/>
+ <cdk:scriptOption name="jointPoint" value="#{getJointPoint(component)}"/>
+ <cdk:scriptOption name="showEvent" value="#{getShowEvent(component)}"/>
+ <cdk:scriptOption name="mode" value="#{getMode(component)}"/>
+ <cdk:scriptOption attributes="hideDelay showEvent showDelay horizontalOffset verticalOffset" />
<cdk:scriptOption attributes="onshow onhide ongroupshow ongrouphide onitemclick" wrapper="eventHandler"/>
</cdk:scriptObject>
Added: trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/DropDownMenuRendererTest.java
===================================================================
--- trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/DropDownMenuRendererTest.java (rev 0)
+++ trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/DropDownMenuRendererTest.java 2011-01-18 08:48:25 UTC (rev 21049)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.
+ */
+package org.richfaces.renderkit.html;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+import org.jboss.test.faces.htmlunit.HtmlUnitEnvironment;
+import org.junit.Test;
+import org.richfaces.component.DropDownMenuBean;
+import org.xml.sax.SAXException;
+
+import com.gargoylesoftware.htmlunit.html.HtmlDivision;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+
+public class DropDownMenuRendererTest extends RendererTestBase {
+
+ @Override
+ public void setUp() throws URISyntaxException {
+ environment = new HtmlUnitEnvironment();
+ environment.withWebRoot(new File(this.getClass().getResource(".").toURI()));
+ environment.withResource("/WEB-INF/faces-config.xml", "org/richfaces/component/faces-config.xml");
+ environment.start();
+ }
+
+ @Test
+ public void testDoEncodeServerMode() throws IOException, SAXException {
+ doTest("dropDownMenu_serverMode", "form:ddmenu");
+ }
+
+ @Test
+ public void testDoEncodeAjaxMode() throws IOException, SAXException {
+ doTest("dropDownMenu_ajaxMode", "form:ddmenu");
+ }
+
+ @Test
+ public void testServerClick() throws IOException, SAXException {
+ HtmlPage page = environment.getPage("/dropDownMenu_serverMode.jsf");
+ HtmlDivision item = (HtmlDivision) page.getElementById("form:saveAll");
+ assertNotNull(item);
+ DropDownMenuBean.setCurrent("none");
+ item.click();
+
+ item = (HtmlDivision) page.getElementById("form:saveAll");
+ assertNotNull(item);
+ assertEquals("action", DropDownMenuBean.getCurrent());
+ }
+
+ @Test
+ public void testAjaxClick() throws IOException, SAXException {
+ HtmlPage page = environment.getPage("/dropDownMenu_ajaxMode.jsf");
+ HtmlDivision item = (HtmlDivision) page.getElementById("form:saveAll");
+ assertNotNull(item);
+ DropDownMenuBean.setCurrent("none");
+ item.click();
+
+ item = (HtmlDivision) page.getElementById("form:saveAll");
+ assertNotNull(item);
+ assertEquals("action", DropDownMenuBean.getCurrent());
+ }
+}
Deleted: trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/DrowDownMenuRendererTest.java
===================================================================
--- trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/DrowDownMenuRendererTest.java 2011-01-17 22:49:07 UTC (rev 21048)
+++ trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/DrowDownMenuRendererTest.java 2011-01-18 08:48:25 UTC (rev 21049)
@@ -1,85 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright ${year}, 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.
- */
-package org.richfaces.renderkit.html;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-
-import org.jboss.test.faces.htmlunit.HtmlUnitEnvironment;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.richfaces.component.DropDownMenuBean;
-import org.xml.sax.SAXException;
-
-import com.gargoylesoftware.htmlunit.html.HtmlDivision;
-import com.gargoylesoftware.htmlunit.html.HtmlPage;
-
-public class DrowDownMenuRendererTest extends RendererTestBase {
-
- @Override
- public void setUp() throws URISyntaxException {
- environment = new HtmlUnitEnvironment();
- environment.withWebRoot(new File(this.getClass().getResource(".").toURI()));
- environment.withResource("/WEB-INF/faces-config.xml", "org/richfaces/component/faces-config.xml");
- environment.start();
- }
-
- @Test
- public void testDoEncodeServerMode() throws IOException, SAXException {
- doTest("dropDownMenu_serverMode", "form:ddmenu");
- }
-
- @Test
- public void testDoEncodeAjaxMode() throws IOException, SAXException {
- doTest("dropDownMenu_ajaxMode", "form:ddmenu");
- }
-
- @Test
- public void testServerClick() throws IOException, SAXException {
- HtmlPage page = environment.getPage("/dropDownMenu_serverMode.jsf");
- HtmlDivision item = (HtmlDivision) page.getElementById("form:saveAll");
- assertNotNull(item);
- DropDownMenuBean.setCurrent("none");
- item.click();
-
- item = (HtmlDivision) page.getElementById("form:saveAll");
- assertNotNull(item);
- assertEquals("action", DropDownMenuBean.getCurrent());
- }
-
- @Test
- public void testAjaxClick() throws IOException, SAXException {
- HtmlPage page = environment.getPage("/dropDownMenu_ajaxMode.jsf");
- HtmlDivision item = (HtmlDivision) page.getElementById("form:saveAll");
- assertNotNull(item);
- DropDownMenuBean.setCurrent("none");
- item.click();
-
- item = (HtmlDivision) page.getElementById("form:saveAll");
- assertNotNull(item);
- assertEquals("action", DropDownMenuBean.getCurrent());
- }
-}
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/dropDownMenu_ajaxMode.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/dropDownMenu_ajaxMode.xmlunit.xml 2011-01-17 22:49:07 UTC (rev 21048)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/dropDownMenu_ajaxMode.xmlunit.xml 2011-01-18 08:48:25 UTC (rev 21049)
@@ -41,7 +41,7 @@
</span>
<script type="text/javascript">
//<![CDATA[
-new RichFaces.ui.MenuItem("form:save",{"submitFunction":function(event){RichFaces.ajax("form:save",event,{"incId":"1"} );return false;}} );
+new RichFaces.ui.MenuItem("form:save",{"submitFunction":function(event){RichFaces.ajax("form:save",event,{"incId":"1"});return false;}});
//]]>
</script>
</div>
@@ -60,7 +60,7 @@
<script type="text/javascript">
//<![CDATA[
-new RichFaces.ui.MenuItem("form:saveAll",{"submitFunction":function(event){RichFaces.ajax("form:saveAll",event,{"incId":"1"} );return false;}} );
+new RichFaces.ui.MenuItem("form:saveAll",{"submitFunction":function(event){RichFaces.ajax("form:saveAll",event,{"incId":"1"});return false;}});
//]]>
</script>
</div>
@@ -73,7 +73,7 @@
</div>
<script type="text/javascript">
//<![CDATA[
-new RichFaces.ui.Menu("form:ddmenu",{"direction":"AA","jointPoint":"AA","mode":"ajax"} ).initiateGroups([{"id":"form:group"} ] );
+new RichFaces.ui.Menu("form:ddmenu",{"direction":"auto","jointPoint":"auto","showEvent":"click","mode":"ajax"}).initiateGroups([{"id":"form:group"} ] );
//]]>
</script>
</div>
\ No newline at end of file
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/dropDownMenu_serverMode.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/dropDownMenu_serverMode.xmlunit.xml 2011-01-17 22:49:07 UTC (rev 21048)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/dropDownMenu_serverMode.xmlunit.xml 2011-01-18 08:48:25 UTC (rev 21049)
@@ -16,7 +16,7 @@
</span>
<script type="text/javascript">
//<![CDATA[
-new RichFaces.ui.MenuItem("form:open", {"submitFunction": function(event){RichFaces.submitForm("form", {"form:open":"form:open"})}});
+new RichFaces.ui.MenuItem("form:open",{"submitFunction":function(event){RichFaces.submitForm("form",{"form:open":"form:open"} )}} );
//]]>
</script>
</div>
@@ -72,7 +72,7 @@
</div>
<script type="text/javascript">
//<![CDATA[
-new RichFaces.ui.Menu("form:ddmenu", {"direction":"AA","jointPoint":"AA"}).initiateGroups([{"id":"form:group"} ] );
+new RichFaces.ui.Menu("form:ddmenu",{"direction":"auto","jointPoint":"auto","showEvent":"click","mode":"server"} ).initiateGroups([{"id":"form:group"} ] );
//]]>
</script>
</div>
\ No newline at end of file
13 years, 11 months
JBoss Rich Faces SVN: r21048 - modules/docs/trunk/Component_Reference/src/main/docbook/en-US/skinning.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2011-01-17 17:49:07 -0500 (Mon, 17 Jan 2011)
New Revision: 21048
Added:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/skinning/tabl-richcalendar.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/skinning/tabl-richextendedDataTable.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/skinning/tabl-richlist.xml
Log:
More skinning reference
Added: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/skinning/tabl-richcalendar.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/skinning/tabl-richcalendar.xml (rev 0)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/skinning/tabl-richcalendar.xml 2011-01-17 22:49:07 UTC (rev 21048)
@@ -0,0 +1,1099 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE table PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+
+<table id="tabl-richcalendar-Style_classes_and_corresponding_skin_parameters">
+ <title>Style classes (selectors) and corresponding skin parameters</title>
+ <tgroup cols="3">
+ <colspec colname="class"/>
+ <colspec colname="skin"/>
+ <colspec colname="css"/>
+ <spanspec spanname="noskin" namest="skin" nameend="css"/>
+ <thead>
+ <row>
+ <entry>Class (selector)</entry>
+ <entry>Skin Parameters</entry>
+ <entry>Mapped <acronym>CSS</acronym> properties</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-exterior</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for a pop-up calendar exterior.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>panelBorderColor</literal></entry>
+ <entry><literal>border-color</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="3">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-header</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for a calendar header.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>panelBorderColor</literal></entry>
+ <entry><literal>border-bottom-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>additionalBackgroundColor</literal></entry>
+ <entry><literal>background-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalSizeFont</literal></entry>
+ <entry><literal>font-size</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalFamilyFont</literal></entry>
+ <entry><literal>font-family</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="3">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-header-optional</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for an optional header.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>panelBorderColor</literal></entry>
+ <entry><literal>border-bottom-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>additionalBackgroundColor</literal></entry>
+ <entry><literal>background-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalSizeFont</literal></entry>
+ <entry><literal>font-size</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalFamilyFont</literal></entry>
+ <entry><literal>font-family</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="3">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-cell</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for cells with days.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>panelBorderColor</literal></entry>
+ <entry><literal>border-bottom-color</literal>, <literal>border-right-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>tableBackgroundColor</literal></entry>
+ <entry><literal>background-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalSizeFont</literal></entry>
+ <entry><literal>font-size</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalFamilyFont</literal></entry>
+ <entry><literal>font-family</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="4">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-tool</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for calendar toolbars.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>headerBackgroundColor</literal></entry>
+ <entry><literal>background-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>headerSizeFont</literal></entry>
+ <entry><literal>font-size</literal></entry>
+ </row>
+ <row>
+ <entry><literal>headerFamilyFont</literal></entry>
+ <entry><literal>font-family</literal></entry>
+ </row>
+ <row>
+ <entry><literal>headerWeightFont</literal></entry>
+ <entry><literal>font-weight</literal></entry>
+ </row>
+ <row>
+ <entry><literal>headerTextColor</literal></entry>
+ <entry><literal>color</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="4">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-month</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for names of months.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>headerBackgroundColor</literal></entry>
+ <entry><literal>background-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>headerSizeFont</literal></entry>
+ <entry><literal>font-size</literal></entry>
+ </row>
+ <row>
+ <entry><literal>headerFamilyFont</literal></entry>
+ <entry><literal>font-family</literal></entry>
+ </row>
+ <row>
+ <entry><literal>headerWeightFont</literal></entry>
+ <entry><literal>font-weight</literal></entry>
+ </row>
+ <row>
+ <entry><literal>headerTextColor</literal></entry>
+ <entry><literal>color</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="3">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-days</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for names of working days in a header.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>panelBorderColor</literal></entry>
+ <entry><literal>border-bottom-color</literal>, <literal>border-right-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>additionalBackgroundColor</literal></entry>
+ <entry><literal>background</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalSizeFont</literal></entry>
+ <entry><literal>font-size</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalFamilyFont</literal></entry>
+ <entry><literal>font-family</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="4">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-week</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for week numbers.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>panelBorderColor</literal></entry>
+ <entry><literal>border-bottom-color</literal>, <literal>border-right-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>additionalBackgroundColor</literal></entry>
+ <entry><literal>background</literal></entry>
+ </row>
+ <row>
+ <entry><literal>calendarWeekBackgroundColor</literal></entry>
+ <entry><literal>background-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalSizeFont</literal></entry>
+ <entry><literal>font-size</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalFamilyFont</literal></entry>
+ <entry><literal>font-family</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="1">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-holly</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for holidays.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>calendarHolidaysBackgroundColor</literal></entry>
+ <entry><literal>background-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>calendarHolidaysTextColor</literal></entry>
+ <entry><literal>color</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="1">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-today</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for the cell representing today's date.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>calendarCurrentBackgroundColor</literal></entry>
+ <entry><literal>background-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>calendarCurrentTextColor</literal></entry>
+ <entry><literal>color</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="1">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-select</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for the selected day.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>headerBackgroundColor</literal></entry>
+ <entry><literal>background-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>headerTextColor</literal></entry>
+ <entry><literal>color</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="1">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-hover</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for a cell when it is hovered over with the mouse cursor.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>calendarSpecBackgroundColor</literal></entry>
+ <entry><literal>background-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>calendarSpecTextColor</literal></entry>
+ <entry><literal>color</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="2">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-toolfooter</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for a toolbar item in the calendar footer.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>additionalBackgroundColor</literal></entry>
+ <entry><literal>background</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalSizeFont</literal></entry>
+ <entry><literal>font-size</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalFamilyFont</literal></entry>
+ <entry><literal>font-family</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="3">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-tool-btn-hover</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for toolbar items when it is hovered over with the mouse cursor.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>calendarWeekBackgroundColor</literal></entry>
+ <entry><literal>background-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalTextColor</literal></entry>
+ <entry><literal>color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>tableBackgroundColor</literal></entry>
+ <entry><literal>border-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>panelBorderColor</literal></entry>
+ <entry><literal>border-right-color</literal>, <literal>border-bottom-color</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="1">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-tool-btn-press</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for toolbar items when it is pressed.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>panelBorderColor</literal></entry>
+ <entry><literal>border-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>panelBorderColor</literal></entry>
+ <entry><literal>border-right-color</literal>, <literal>border-bottom-color</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="3">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-footer</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for a calendar footer.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>panelBorderColor</literal></entry>
+ <entry><literal>border-right-color</literal>, <literal>border-bottom-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>additionalBackgroundColor</literal></entry>
+ <entry><literal>background</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalSizeFont</literal></entry>
+ <entry><literal>font-size</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalFamilyFont</literal></entry>
+ <entry><literal>font-family</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="3">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-footer-optional</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for an optional footer.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>panelBorderColor</literal></entry>
+ <entry><literal>border-right-color</literal>, <literal>border-bottom-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>additionalBackgroundColor</literal></entry>
+ <entry><literal>background</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalSizeFont</literal></entry>
+ <entry><literal>font-size</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalFamilyFont</literal></entry>
+ <entry><literal>font-family</literal></entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-editor-shadow</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for the calendar editor shadow.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>tableBackgroundColor</literal></entry>
+ <entry><literal>background</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="3">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-time-layout</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for a pop-up element during time selection.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>panelBorderColor</literal></entry>
+ <entry><literal>border-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>additionalBackgroundColor</literal></entry>
+ <entry><literal>background</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalSizeFont</literal></entry>
+ <entry><literal>font-size</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalFamilyFont</literal></entry>
+ <entry><literal>font-family</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="3">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-date-layout</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for a pop-up element during quick month or year selection.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>panelBorderColor</literal></entry>
+ <entry><literal>border-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>tableBackgroundColor</literal></entry>
+ <entry><literal>background</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalSizeFont</literal></entry>
+ <entry><literal>font-size</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalFamilyFont</literal></entry>
+ <entry><literal>font-family</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="1">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-time-layout-input</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for an input field in a pop-up element during time selection.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>generalSizeFont</literal></entry>
+ <entry><literal>font-size</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalFamilyFont</literal></entry>
+ <entry><literal>font-family</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="1">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-date-layout-cancel</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for the <guibutton>Cancel</guibutton> button.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>additionalBackgroundColor</literal></entry>
+ <entry><literal>background</literal></entry>
+ </row>
+ <row>
+ <entry><literal>panelBorderColor</literal></entry>
+ <entry><literal>border-top-color</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="1">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-date-layout-ok</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for the <guibutton>OK</guibutton> button.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>additionalBackgroundColor</literal></entry>
+ <entry><literal>background</literal></entry>
+ </row>
+ <row>
+ <entry><literal>panelBorderColor</literal></entry>
+ <entry><literal>border-top-color</literal></entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-date-layout-split</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for a wrapper <sgmltag><td></sgmltag> element for month items near the split line.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>panelBorderColor</literal></entry>
+ <entry><literal>border-right-color</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="1">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-time-btn</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for a button in the pop-up element for the calendar's time section.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>tableBackgroundColor</literal></entry>
+ <entry><literal>border-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>panelBorderColor</literal></entry>
+ <entry><literal>border-right-color</literal>, <literal>border-bottom-color</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="2">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-time-btn-press</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for a pressed button in the pop-up element for the calendar's time section.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>tableBackgroundColor</literal></entry>
+ <entry><literal>border-right-color</literal>, <literal>border-bottom-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>panelBorderColor</literal></entry>
+ <entry><literal>border-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>calendarWeekBackgroundColor</literal></entry>
+ <entry><literal>background-color</literal></entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-spinner-buttons</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for a wrapper <sgmltag><td></sgmltag> element for spinner buttons in the pop-up element for time selection.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>headerBackgroundColor</literal></entry>
+ <entry><literal>background-color</literal>, <literal>border-color</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="2">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-spinner-input-container</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for a wrapper <sgmltag><td></sgmltag> element for a spinner input field in the pop-up element for time selection.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>controlBackgroundColor</literal></entry>
+ <entry><literal>background-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>panelBorderColor</literal></entry>
+ <entry><literal>border-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>subBorderColor</literal></entry>
+ <entry><literal>border-right-color</literal>, <literal>border-bottom-color</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="1">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-spinner-input</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for a spinner input field in the pop-up element for time selection.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>buttonSizeFont</literal></entry>
+ <entry><literal>font-size</literal></entry>
+ </row>
+ <row>
+ <entry><literal>buttonFamilyFont</literal></entry>
+ <entry><literal>font-family</literal></entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-editor-layout-shadow</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for the layout shadow of a calendar editor.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>shadowBackgroundColor</literal></entry>
+ <entry><literal>background-color</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="1">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-editor-btn-over</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for the calendar editor button when it is hovered over with the mouse cursor.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>panelBorderColor</literal></entry>
+ <entry><literal>border-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>calendarSpecBackgroundColor</literal></entry>
+ <entry><literal>background</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="1">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-editor-btn-selected</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for the calendar editor button when it is pressed.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>calendarCurrentBackgroundColor</literal></entry>
+ <entry><literal>background-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>calendarCurrentTextColor</literal></entry>
+ <entry><literal>color</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="2">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-editor-tool-over</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for a toolbar item in the calendar editor when it is hovered over with the mouse cursor.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>additionalBackgroundColor</literal></entry>
+ <entry><literal>background</literal></entry>
+ </row>
+ <row>
+ <entry><literal>tableBackgroundColor</literal></entry>
+ <entry><literal>border-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>panelBorderColor</literal></entry>
+ <entry><literal>border-right-color</literal>, <literal>border-bottom-color</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="2">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-editor-tool-press</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for a toolbar item in the calendar editor when it is pressed.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>additionalBackgroundColor</literal></entry>
+ <entry><literal>background</literal></entry>
+ </row>
+ <row>
+ <entry><literal>panelBorderColor</literal></entry>
+ <entry><literal>border-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>tableBackgroundColor</literal></entry>
+ <entry><literal>border-right-color</literal>, <literal>border-bottom-color</literal></entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-input</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for an input field.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-button</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for a pop-up button.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-weekends</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for the name of a weekend day in a header.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-popup</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for a pop-up element.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-tool-btn</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for a toolbar button.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-tool-btn-disabled</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for a disabled toolbar button.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-tool-close</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for a <guibutton>Close</guibutton> button in a toolbar.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-boundary-dates</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for an active boundary button.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-btn</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for a date button.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-editor-btn</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for a button in the calendar editor.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-time-layout-fields</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for a wrapper <sgmltag><td></sgmltag> element for input fields and buttons.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-spinner-up</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for the <guibutton>Up</guibutton> spinner button in the pop-up element for the time section.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-spinner-down</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for the <guibutton>Down</guibutton> spinner button in the pop-up element for the time section.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-spinner-pressed</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for a spinner button in the pop-up element for the time section when it is pressed.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-time-layout-ok</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for the <guibutton>OK</guibutton> button in the pop-up element for the time section.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-calendar-time-layout-cancel</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for the <guibutton>Cancel</guibutton> button in the pop-up element for the time section.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
Added: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/skinning/tabl-richextendedDataTable.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/skinning/tabl-richextendedDataTable.xml (rev 0)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/skinning/tabl-richextendedDataTable.xml 2011-01-17 22:49:07 UTC (rev 21048)
@@ -0,0 +1,602 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE table PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+
+<table id="tabl-richextendedDataTable-Style_classes_and_corresponding_skin_parameters">
+ <title>Style classes (selectors) and corresponding skin parameters</title>
+ <tgroup cols="3">
+ <colspec colname="class"/>
+ <colspec colname="skin"/>
+ <colspec colname="css"/>
+ <spanspec spanname="noskin" namest="skin" nameend="css"/>
+ <thead>
+ <row>
+ <entry>Class (selector)</entry>
+ <entry>Skin Parameters</entry>
+ <entry>Mapped <acronym>CSS</acronym> properties</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.extdt-empty-cell</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for empty cells.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>tableBorderWidth</literal>, <literal>tableBorderColor</literal></entry>
+ <entry><literal>border-bottom</literal></entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.extdt-table-layout</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for the table layout.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>tableBackgroundColor</literal></entry>
+ <entry><literal>background-color</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="3">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.extdt-cell</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for the table cells.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>tableBorderWidth</literal>, <literal>tableBorderColor</literal></entry>
+ <entry><literal>border-right, border-bottom</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalSizeFont</literal></entry>
+ <entry><literal>font-size</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalTextColor</literal></entry>
+ <entry><literal>color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalFamilyFont</literal></entry>
+ <entry><literal>font-family</literal></entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.extdt-header</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for a table header row.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>headerBackgroundColor</literal></entry>
+ <entry><literal>background-color</literal></entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.extdt-header-continue</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for all header lines after the first.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>headerBackgroundColor</literal></entry>
+ <entry><literal>background-color</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="4">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.extdt-headercell</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for the header cells.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>tableBorderWidth</literal>, <literal>tableBorderColor</literal></entry>
+ <entry><literal>border-right, border-bottom</literal></entry>
+ </row>
+ <row>
+ <entry><literal>headerTextColor</literal></entry>
+ <entry><literal>color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>headerWeightFont</literal></entry>
+ <entry><literal>font-weight</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalSizeFont</literal></entry>
+ <entry><literal>font-size</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalFamilyFont</literal></entry>
+ <entry><literal>font-family</literal></entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.extdt-subheader</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for a column sub-header.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>additionalBackgroundColor</literal></entry>
+ <entry><literal>background-color</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="1">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.extdt-table-filterrow</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for the filter row.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>additionalBackgroundColor</literal></entry>
+ <entry><literal>background-color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>tableBorderWidth</literal>, <literal>tableBorderColor</literal></entry>
+ <entry><literal>border-top</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="3">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.extdt-subheadercell</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for a column sub-header cell.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>tableBorderWidth</literal>, <literal>tableBorderColor</literal></entry>
+ <entry><literal>border-right</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalTextColor</literal></entry>
+ <entry><literal>color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalSizeFont</literal></entry>
+ <entry><literal>font-size</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalFamilyFont</literal></entry>
+ <entry><literal>font-family</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="5">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.extdt-caption</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for a table caption.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>tableBorderWidth, tableBorderColor</literal></entry>
+ <entry><literal>border-right, border-bottom</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalTextColor</literal></entry>
+ <entry><literal>color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>headerWeightFont</literal></entry>
+ <entry><literal>font-weight</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalSizeFont</literal></entry>
+ <entry><literal>font-size</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalFamilyFont</literal></entry>
+ <entry><literal>font-family</literal></entry>
+ </row>
+ <row>
+ <entry><literal>additionalBackgroundColor</literal></entry>
+ <entry><literal>bakcground-color</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="4">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.extdt-footercell</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for a footer cell.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>tableBorderWidth, tableBorderColor</literal></entry>
+ <entry><literal>border-right, border-bottom</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalTextColor</literal></entry>
+ <entry><literal>color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>headerWeightFont</literal></entry>
+ <entry><literal>font-weight</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalSizeFont</literal></entry>
+ <entry><literal>font-size</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalFamilyFont</literal></entry>
+ <entry><literal>font-family</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="3">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.extdt-subfooter</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for a column footer.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>tableBorderWidth</literal>, <literal>tableBorderColor</literal></entry>
+ <entry><literal>border-right</literal>, <literal>border-bottom</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalTextColor</literal></entry>
+ <entry><literal>color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalSizeFont</literal></entry>
+ <entry><literal>font-size</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalFamilyFont</literal></entry>
+ <entry><literal>font-family</literal></entry>
+ </row>
+
+ <row>
+ <entry morerows="3">
+ <variablelist>
+ <varlistentry>
+ <term><classname>.extdt-subfootercell</classname></term>
+ <listitem>
+ <para>
+ This class defines the styles for a column footer cell.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry><literal>tableBorderWidth</literal>, <literal>tableBorderColor</literal></entry>
+ <entry><literal>border-right</literal>, <literal>border-bottom</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalTextColor</literal></entry>
+ <entry><literal>color</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalSizeFont</literal></entry>
+ <entry><literal>font-size</literal></entry>
+ </row>
+ <row>
+ <entry><literal>generalFamilyFont</literal></entry>
+ <entry><literal>font-family</literal></entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-extdt</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for the table.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-extdt-caption</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for a "caption" facet element.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-extdt-header</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for a table header row.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-extdt-header-continue</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for all header lines after the first.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-extdt-subheader</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for a column sub-header.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-extdt-footer</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for a footer row.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-extdt-footer-continue</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for all footer lines after the first.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-extdt-subfooter</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for a column sub-footer.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-extdt-headercell</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for a header cell.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-extdt-subheadercell</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for a sub-header cell.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-extdt-cell</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for a table cell.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-extdt-row</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for a table row.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-extdt-firstrow</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for a table's first row.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-extdt-footercell</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for a footer cell.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-extdt-subfootercell</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for a sub-footer cell.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-extdt-group-cell</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for a grouping row cell.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
Added: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/skinning/tabl-richlist.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/skinning/tabl-richlist.xml (rev 0)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/skinning/tabl-richlist.xml 2011-01-17 22:49:07 UTC (rev 21048)
@@ -0,0 +1,53 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE table PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+
+<table id="tabl-richlist-Style_classes_and_corresponding_skin_parameters">
+ <title>Style classes (selectors) and corresponding skin parameters</title>
+ <tgroup cols="3">
+ <colspec colname="class"/>
+ <colspec colname="skin"/>
+ <colspec colname="css"/>
+ <spanspec spanname="noskin" namest="skin" nameend="css"/>
+ <thead>
+ <row>
+ <entry>Class (selector)</entry>
+ <entry>Skin Parameters</entry>
+ <entry>Mapped <acronym>CSS</acronym> properties</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-list</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for an HTML <sgmltag><ul></sgmltag> element.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <variablelist>
+ <varlistentry>
+ <term><classname>.rich-list-item</classname></term>
+ <listitem>
+ <para>
+ This class defines styles for an HTML <sgmltag><il></sgmltag> element.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </entry>
+ <entry spanname="noskin">No skin parameters.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</table>
13 years, 11 months
JBoss Rich Faces SVN: r21047 - trunk/ui/iteration/ui/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2011-01-17 13:52:34 -0500 (Mon, 17 Jan 2011)
New Revision: 21047
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractColumn.java
Log:
RF-10185
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractColumn.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractColumn.java 2011-01-17 12:58:47 UTC (rev 21046)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractColumn.java 2011-01-17 18:52:34 UTC (rev 21047)
@@ -71,6 +71,21 @@
@Attribute
public abstract Comparator<?> getComparator();
+ @Attribute
+ public abstract Boolean isFilterExpression();
+
+ @Attribute
+ public abstract Object getSortBy();
+
+ @Attribute
+ public abstract String getFooterClass();
+
+ @Attribute
+ public abstract String getHeaderClass();
+
+ @Attribute
+ public abstract String getWidth();
+
public FilterField getFilterField() {
FilterField field = null;
Filter<?> filter = getFilter();
13 years, 11 months
JBoss Rich Faces SVN: r21046 - in modules/tests/metamer/trunk: application/src/main/webapp/components/commandButton and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-01-17 07:58:47 -0500 (Mon, 17 Jan 2011)
New Revision: 21046
Modified:
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/CommandButtonBean.properties
modules/tests/metamer/trunk/application/src/main/webapp/components/commandButton/simple.xhtml
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/hCommandButton/TestHCommandButton.java
Log:
* fixed sample and tests for h:commandButton
Modified: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/CommandButtonBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/CommandButtonBean.properties 2011-01-17 12:31:59 UTC (rev 21045)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/CommandButtonBean.properties 2011-01-17 12:58:47 UTC (rev 21046)
@@ -5,9 +5,3 @@
attr.actionListener.first6CharsActionListener=first6CharsActionListener
attr.actionListener.doubleStringActionListener=doubleStringActionListener
attr.actionListener.toUpperCaseActionListener=toUpperCaseActionListener
-
-attr.styleClass.bold=bold
-attr.styleClass.strike=strike
-attr.styleClass.big=big
-attr.styleClass.wide=wide
-attr.styleClass.none=
\ No newline at end of file
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/commandButton/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/commandButton/simple.xhtml 2011-01-17 12:31:59 UTC (rev 21045)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/commandButton/simple.xhtml 2011-01-17 12:58:47 UTC (rev 21046)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+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.
@@ -33,8 +33,6 @@
<f:converter converterId="templatesListConverter" />
</f:viewParam>
</f:metadata>
-
- <h:outputStylesheet library="css" name="commandButton.css"/>
</ui:define>
<ui:define name="outOfTemplateBefore">
@@ -46,12 +44,20 @@
<h:inputText id="input" value="#{buttonBean.input}" />
<h:commandButton id="commandButton"
+ accesskey="#{buttonBean.attributes['accesskey'].value}"
action="#{buttonBean.attributes.action}"
actionListener="#{buttonBean.attributes.actionListener}"
+ alt="#{buttonBean.attributes['alt'].value}"
+ dir="#{buttonBean.attributes['dir'].value}"
disabled="#{buttonBean.attributes['disabled'].value}"
immediate="#{buttonBean.attributes['immediate'].value}"
+ label="#{buttonBean.attributes['label'].value}"
+ lang="#{buttonBean.attributes['lang'].value}"
+ onblur="#{buttonBean.attributes['onblur'].value}"
+ onchange="#{buttonBean.attributes['onchange'].value}"
onclick="#{buttonBean.attributes['onclick'].value}"
ondblclick="#{buttonBean.attributes['ondblclick'].value}"
+ onfocus="#{buttonBean.attributes['onfocus'].value}"
onkeydown="#{buttonBean.attributes['onkeydown'].value}"
onkeypress="#{buttonBean.attributes['onkeypress'].value}"
onkeyup="#{buttonBean.attributes['onkeyup'].value}"
@@ -60,10 +66,14 @@
onmouseout="#{buttonBean.attributes['onmouseout'].value}"
onmouseover="#{buttonBean.attributes['onmouseover'].value}"
onmouseup="#{buttonBean.attributes['onmouseup'].value}"
- render="#{buttonBean.attributes['render'].value}"
+ onselect="#{buttonBean.attributes['onselect'].value}"
+ readonly="#{buttonBean.attributes['readonly'].value}"
rendered="#{buttonBean.attributes['rendered'].value}"
style="#{buttonBean.attributes['style'].value}"
styleClass="#{buttonBean.attributes['styleClass'].value}"
+ tabindex="#{buttonBean.attributes['tabindex'].value}"
+ title="#{buttonBean.attributes['title'].value}"
+ type="#{buttonBean.attributes['type'].value}"
value="#{buttonBean.attributes['value'].value}"
execute="@form" />
</h:panelGrid>
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/hCommandButton/TestHCommandButton.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/hCommandButton/TestHCommandButton.java 2011-01-17 12:31:59 UTC (rev 21045)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/hCommandButton/TestHCommandButton.java 2011-01-17 12:58:47 UTC (rev 21046)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * 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.
*
@@ -19,13 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*******************************************************************************/
-
package org.richfaces.tests.metamer.ftest.hCommandButton;
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
import java.net.URL;
@@ -90,6 +87,11 @@
}
@Test
+ public void testAccesskey() {
+ testHtmlAttribute(button, "accesskey", "b");
+ }
+
+ @Test
public void testAction() {
JQueryLocator doubleStringAction = pjq("input[value=doubleStringAction]");
JQueryLocator first6CharsAction = pjq("input[value=first6CharsAction]");
@@ -102,7 +104,7 @@
waitGui.until(textEquals.locator(output1).text("RichFaces 4"));
String output = selenium.getText(output2);
assertEquals(output, "RichFaces 4RichFaces 4",
- "output2 when 'RichFaces 4' in input and doubleStringAction selected");
+ "output2 when 'RichFaces 4' in input and doubleStringAction selected");
selenium.click(first6CharsAction);
selenium.waitForPageToLoad(TIMEOUT);
@@ -134,7 +136,7 @@
waitGui.until(textEquals.locator(output1).text("RichFaces 4"));
String output = selenium.getText(output3);
assertEquals(output, "RichFaces 4RichFaces 4",
- "output2 when 'RichFaces 4' in input and doubleStringActionListener selected");
+ "output2 when 'RichFaces 4' in input and doubleStringActionListener selected");
selenium.click(first6CharsActionListener);
selenium.waitForPageToLoad(TIMEOUT);
@@ -151,10 +153,15 @@
waitGui.until(textEquals.locator(output1).text("RichFaces 4ě"));
output = selenium.getText(output3);
assertEquals(output, "RICHFACES 4Ě",
- "output2 when 'RichFaces 4ě' in input and toUpperCaseActionListener selected");
+ "output2 when 'RichFaces 4ě' in input and toUpperCaseActionListener selected");
}
@Test
+ public void testAlt() {
+ testHtmlAttribute(button, "alt", "metamer");
+ }
+
+ @Test
public void testDisabled() {
JQueryLocator disabledChecbox = pjq("input[type=radio][name$=disabledInput][value=true]");
AttributeLocator<?> disabledAttribute = button.getAttribute(new Attribute("disabled"));
@@ -166,14 +173,12 @@
assertEquals(isDisabled.toLowerCase(), "disabled", "The value of attribute disabled");
}
- // not implemented in Mojarra
- // @Test
+ @Test
public void testOnblur() {
testFireEvent(Event.BLUR, button);
}
- // not implemented in Mojarra
- // @Test
+ @Test
public void testOnchange() {
testFireEvent(Event.CHANGE, button);
}
@@ -188,8 +193,7 @@
testFireEvent(Event.DBLCLICK, button);
}
- // not implemented in Mojarra
- // @Test
+ @Test
public void testOnfocus() {
testFireEvent(Event.FOCUS, button);
}
@@ -235,37 +239,18 @@
}
@Test
- public void testStyleClass() {
-
- JQueryLocator wide = pjq("input[name$=styleClassInput][value=wide]");
- JQueryLocator big = pjq("input[name$=styleClassInput][value=big]");
- JQueryLocator none = pjq("input[name$=styleClassInput][value=]");
-
- final AttributeLocator<?> classAttribute = button.getAttribute(new Attribute("class"));
-
- selenium.click(wide);
- selenium.waitForPageToLoad(TIMEOUT);
- assertTrue(selenium.belongsClass(button, "wide"), "Button's class was not changed to 'wide'");
-
- selenium.click(big);
- selenium.waitForPageToLoad(TIMEOUT);
- assertTrue(selenium.belongsClass(button, "big"), "Button's class was not changed to 'big'");
-
- selenium.click(none);
- selenium.waitForPageToLoad(TIMEOUT);
- assertFalse(selenium.isAttributePresent(classAttribute), "Button's class was not removed.");
+ public void testStyle() {
+ testStyle(button, "style");
}
@Test
- public void testStyle() {
- JQueryLocator styleInput = pjq("input[id$=styleInput]");
- final AttributeLocator<?> attribute = button.getAttribute(new Attribute("style"));
- final String value = "font-size: 20px;";
+ public void testStyleClass() {
+ testStyleClass(button, "styleClass");
+ }
- selenium.type(styleInput, value);
- selenium.waitForPageToLoad(TIMEOUT);
-
- assertEquals(selenium.getAttribute(attribute), value, "Style of the button did not change");
+ @Test
+ public void testTitle() {
+ testTitle(button);
}
@Test
@@ -279,5 +264,4 @@
assertEquals(selenium.getAttribute(attribute), value, "Value of the button did not change");
}
-
}
13 years, 11 months