JBoss Rich Faces SVN: r21115 - in modules/tests/metamer/trunk: application/src/main/webapp/components/richTabPanel and 15 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-01-20 08:48:30 -0500 (Thu, 20 Jan 2011)
New Revision: 21115
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToolbarBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/simple.xhtml
modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/waiting/EventFiredCondition.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jActionListener/TestA4JActionListener.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestCommand.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectMany.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectOne.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestTextInput.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jLog/TestA4JLog.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/annotations/Inject.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/annotations/IssueTracking.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/AbstractCalendarTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestFacets.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richFunctions/TestClientFunctions.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSlider/TestRichSlider.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToggleControl/AbstractTestToggleControl.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToolbar/TestRichToolbar.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToolbarGroup/TestRichToolbarGroup.java
Log:
* tests fixed
* refactoring
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToolbarBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToolbarBean.java 2011-01-20 13:01:04 UTC (rev 21114)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToolbarBean.java 2011-01-20 13:48:30 UTC (rev 21115)
@@ -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.
*
@@ -25,6 +25,7 @@
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
+
import org.richfaces.component.UIToolbar;
import org.richfaces.tests.metamer.Attributes;
import org.slf4j.Logger;
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/simple.xhtml 2011-01-20 13:01:04 UTC (rev 21114)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/simple.xhtml 2011-01-20 13:48:30 UTC (rev 21115)
@@ -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.
@@ -40,7 +40,7 @@
<ui:define name="component">
- <rich:tabPanel id="tabPanel"
+ <rich:tabPanel id="tabPanel"
activeItem="#{richTabPanelBean.attributes['activeItem'].value}"
bypassUpdates="#{richTabPanelBean.attributes['bypassUpdates'].value}"
cycledSwitching="#{richTabPanelBean.attributes['cycledSwitching'].value}"
@@ -69,9 +69,13 @@
styleClass="#{richTabPanelBean.attributes['styleClass'].value}"
switchType="#{richTabPanelBean.attributes['switchType'].value}"
tabContentClass="#{richTabPanelBean.attributes['tabContentClass'].value}"
+ tabHeaderClass="#{richTabPanelBean.attributes['tabHeaderClass'].value}"
+ tabHeaderClassActive="#{richTabPanelBean.attributes['tabHeaderClassActive'].value}"
+ tabHeaderClassDisabled="#{richTabPanelBean.attributes['tabHeaderClassDisabled'].value}"
+ tabHeaderClassInactive="#{richTabPanelBean.attributes['tabHeaderClassInactive'].value}"
title="#{richTabPanelBean.attributes['title'].value}"
>
-
+
<rich:tab id="tab1" name="tab1" header="tab1 header">
content of tab 1
</rich:tab>
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/waiting/EventFiredCondition.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/waiting/EventFiredCondition.java 2011-01-20 13:01:04 UTC (rev 21114)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/waiting/EventFiredCondition.java 2011-01-20 13:48:30 UTC (rev 21115)
@@ -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.
*
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jActionListener/TestA4JActionListener.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jActionListener/TestA4JActionListener.java 2011-01-20 13:01:04 UTC (rev 21114)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jActionListener/TestA4JActionListener.java 2011-01-20 13:48:30 UTC (rev 21115)
@@ -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.
*
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestCommand.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestCommand.java 2011-01-20 13:01:04 UTC (rev 21114)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestCommand.java 2011-01-20 13:48:30 UTC (rev 21115)
@@ -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.
*
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectMany.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectMany.java 2011-01-20 13:01:04 UTC (rev 21114)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectMany.java 2011-01-20 13:48:30 UTC (rev 21115)
@@ -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.
*
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectOne.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectOne.java 2011-01-20 13:01:04 UTC (rev 21114)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestSelectOne.java 2011-01-20 13:48:30 UTC (rev 21115)
@@ -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.
*
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestTextInput.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestTextInput.java 2011-01-20 13:01:04 UTC (rev 21114)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jAjax/AbstractTestTextInput.java 2011-01-20 13:48:30 UTC (rev 21115)
@@ -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.
*
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jLog/TestA4JLog.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jLog/TestA4JLog.java 2011-01-20 13:01:04 UTC (rev 21114)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jLog/TestA4JLog.java 2011-01-20 13:48:30 UTC (rev 21115)
@@ -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.
*
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java 2011-01-20 13:01:04 UTC (rev 21114)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jOutputPanel/TestA4JOutputPanel.java 2011-01-20 13:48:30 UTC (rev 21115)
@@ -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.
*
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/annotations/Inject.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/annotations/Inject.java 2011-01-20 13:01:04 UTC (rev 21114)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/annotations/Inject.java 2011-01-20 13:48:30 UTC (rev 21115)
@@ -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.
*
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/annotations/IssueTracking.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/annotations/IssueTracking.java 2011-01-20 13:01:04 UTC (rev 21114)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/annotations/IssueTracking.java 2011-01-20 13:48:30 UTC (rev 21115)
@@ -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.
*
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/AbstractCalendarTest.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/AbstractCalendarTest.java 2011-01-20 13:01:04 UTC (rev 21114)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/AbstractCalendarTest.java 2011-01-20 13:48:30 UTC (rev 21115)
@@ -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.
*
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestFacets.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestFacets.java 2011-01-20 13:01:04 UTC (rev 21114)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestFacets.java 2011-01-20 13:48:30 UTC (rev 21115)
@@ -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.
*
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richFunctions/TestClientFunctions.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richFunctions/TestClientFunctions.java 2011-01-20 13:01:04 UTC (rev 21114)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richFunctions/TestClientFunctions.java 2011-01-20 13:48:30 UTC (rev 21115)
@@ -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.
*
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java 2011-01-20 13:01:04 UTC (rev 21114)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java 2011-01-20 13:48:30 UTC (rev 21115)
@@ -152,7 +152,7 @@
selenium.waitForPageToLoad();
String height = selenium.getStyle(jq("span.rf-is-lst-scrl"), CssProperty.HEIGHT);
- assertEquals(height, "300px", "Height of list did not change");
+ assertEquals(height, "300px", "Height of list did not change correctly.");
selenium.type(pjq("input[type=text][id$=listHeightInput]"), "");
selenium.waitForPageToLoad();
@@ -160,7 +160,7 @@
// it cannot handle null because of a bug in Mojarra and Myfaces and
// generates style="height: ; " instead of default value
height = selenium.getStyle(jq("span.rf-is-lst-scrl"), CssProperty.HEIGHT);
- assertEquals(height, "200px", "Height of list did not change");
+ assertEquals(height, "100px", "Height of list did not change correctly.");
}
@Test
@@ -415,7 +415,8 @@
selenium.click(options.format(10));
assertFalse(selenium.isDisplayed(popup), "Popup should not be displayed.");
- assertEquals(selenium.getText(label), "Hawaii", "Label should contain selected value.");
+ assertFalse(selenium.isDisplayed(label), "Label should not be displayed.");
+ assertEquals(selenium.getValue(input), "Hawaii", "Input should contain selected value.");
}
@Test
@@ -427,13 +428,13 @@
assertTrue(selenium.isDisplayed(popup), "Popup should be displayed.");
selenium.click(options.format(10));
- assertEquals(selenium.getText(label), "Click here to edit", "Label should contain default value.");
+ assertFalse(selenium.isDisplayed(label), "Label should not be displayed.");
assertFalse(selenium.isDisplayed(popup), "Popup should not be displayed.");
selenium.fireEvent(input, Event.BLUR);
+ assertFalse(selenium.isDisplayed(label), "Label should not be displayed.");
assertFalse(selenium.isDisplayed(popup), "Popup should not be displayed.");
assertEquals(selenium.getValue(input), "Hawaii", "Input should contain selected value.");
- waitGui.failWith("Label should contain selected value.").until(textEquals.locator(label).text("Hawaii"));
}
@Test
@@ -446,7 +447,8 @@
selenium.click(options.format(10));
assertFalse(selenium.isDisplayed(popup), "Popup should not be displayed.");
- assertEquals(selenium.getText(label), "Hawaii", "Label should contain selected value.");
+ assertFalse(selenium.isDisplayed(label), "Label should not be displayed.");
+ assertEquals(selenium.getValue(input), "Hawaii", "Input should contain selected value.");
}
@Test
@@ -460,12 +462,13 @@
assertTrue(selenium.isDisplayed(popup), "Popup should be displayed.");
selenium.click(options.format(10));
- assertEquals(selenium.getText(label), "Click here to edit", "Label should contain default value.");
+ assertFalse(selenium.isDisplayed(label), "Label should not be displayed.");
assertFalse(selenium.isDisplayed(popup), "Popup should not be displayed.");
- selenium.fireEvent(input, Event.BLUR);
+ guardNoRequest(selenium).fireEvent(input, Event.BLUR);
+ assertFalse(selenium.isDisplayed(label), "Label should not be displayed.");
assertFalse(selenium.isDisplayed(popup), "Popup should not be displayed.");
- assertEquals(selenium.getText(label), "Click here to edit", "Label should contain default value.");
+ assertEquals(selenium.getValue(input), "Click here to edit", "Input should contain default label.");
}
@Test
@@ -503,7 +506,7 @@
selenium.click(select);
selenium.click(options.format(10));
- assertEquals(selenium.getText(label), "Click here to edit", "Label should contain default value.");
+ assertFalse(selenium.isDisplayed(label), "Label should not be displayed.");
assertFalse(selenium.isDisplayed(popup), "Popup should not be displayed.");
selenium.mouseDown(okButton);
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSlider/TestRichSlider.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSlider/TestRichSlider.java 2011-01-20 13:01:04 UTC (rev 21114)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSlider/TestRichSlider.java 2011-01-20 13:48:30 UTC (rev 21115)
@@ -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.
*
@@ -25,6 +25,7 @@
import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardNoRequest;
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.locator.option.OptionLocatorFactory.optionLabel;
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
@@ -41,7 +42,6 @@
import javax.faces.event.PhaseId;
import org.jboss.test.selenium.css.CssProperty;
-
import org.jboss.test.selenium.encapsulated.JavaScript;
import org.jboss.test.selenium.geometry.Point;
import org.jboss.test.selenium.locator.Attribute;
@@ -231,7 +231,7 @@
}
@Test
- @Use(field = "delay", ints = {300, 500, 3700})
+ @Use(field = "delay", ints = {600, 1250, 3700})
public void testDelay() {
selenium.type(pjq("input[type=text][id$=delayInput]"), delay.toString());
selenium.waitForPageToLoad();
@@ -334,35 +334,35 @@
public void testInputPosition() {
JQueryLocator br = pjq("span[id$=slider] br");
- selenium.click(pjq("input[type=radio][name$=inputPositionInput][value=bottom]"));
+ selenium.select(pjq("select[id$=inputPositionInput]"), optionLabel("bottom"));
selenium.waitForPageToLoad();
int inputPosition = selenium.getElementPositionTop(input);
int trackPosition = selenium.getElementPositionTop(track);
assertTrue(trackPosition < inputPosition, "Track should be above input on the page.");
assertTrue(selenium.isElementPresent(br), "Track and input should not be on the same line.");
- selenium.click(pjq("input[type=radio][name$=inputPositionInput][value=top]"));
+ selenium.select(pjq("select[id$=inputPositionInput]"), optionLabel("top"));
selenium.waitForPageToLoad();
inputPosition = selenium.getElementPositionTop(input);
trackPosition = selenium.getElementPositionTop(track);
assertTrue(trackPosition > inputPosition, "Track should be below input on the page.");
assertTrue(selenium.isElementPresent(br), "Track and input should not be on the same line.");
- selenium.click(pjq("input[type=radio][name$=inputPositionInput][value=right]"));
+ selenium.select(pjq("select[id$=inputPositionInput]"), optionLabel("right"));
selenium.waitForPageToLoad();
inputPosition = selenium.getElementPositionLeft(input);
trackPosition = selenium.getElementPositionLeft(track);
assertTrue(trackPosition < inputPosition, "Track should be on the left of input on the page.");
assertFalse(selenium.isElementPresent(br), "Track and input should be on the same line.");
- selenium.click(pjq("input[type=radio][name$=inputPositionInput][value=left]"));
+ selenium.select(pjq("select[id$=inputPositionInput]"), optionLabel("left"));
selenium.waitForPageToLoad();
inputPosition = selenium.getElementPositionLeft(input);
trackPosition = selenium.getElementPositionLeft(track);
assertTrue(trackPosition > inputPosition, "Track should be on the right of input on the page.");
assertFalse(selenium.isElementPresent(br), "Track and input should be on the same line.");
- selenium.click(pjq("input[type=radio][name$=inputPositionInput][value=]"));
+ selenium.select(pjq("select[id$=inputPositionInput]"), optionLabel("null"));
selenium.waitForPageToLoad();
inputPosition = selenium.getElementPositionLeft(input);
trackPosition = selenium.getElementPositionLeft(track);
@@ -436,9 +436,7 @@
selenium.type(pjq("input[type=text][id$=maxlengthInput]"), "");
selenium.waitForPageToLoad();
- if (Integer.parseInt(selenium.getAttribute(attr)) == 0) {
- fail("Null attribute maxlength should not be evaluated as 0.");
- }
+ assertFalse(selenium.isAttributePresent(attr), "Attribute maxlength should not be present.");
}
@Test
@@ -467,7 +465,7 @@
String reqTime = selenium.getText(time);
guardXhr(selenium).mouseDownAt(track, new Point(30, 0));
waitGui.failWith("Page was not updated").waitForChange(reqTime, retrieveText.locator(time));
- assertEquals(selenium.getText(output), "-15", "Output was not updated.");
+ assertEquals(selenium.getText(output), "-16", "Output was not updated.");
String margin = selenium.getStyle(handle, CssProperty.MARGIN_LEFT).replace("px", "").trim();
double marginD = Double.parseDouble(margin);
assertTrue(marginD > 25 && marginD < 35, "Left margin of handle should be between 25 and 35.");
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java 2011-01-20 13:01:04 UTC (rev 21114)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java 2011-01-20 13:48:30 UTC (rev 21115)
@@ -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.
*
@@ -30,8 +30,8 @@
import static org.testng.Assert.assertTrue;
import java.net.URL;
-import org.jboss.test.selenium.css.CssProperty;
+import org.jboss.test.selenium.css.CssProperty;
import org.jboss.test.selenium.dom.Event;
import org.jboss.test.selenium.locator.Attribute;
import org.jboss.test.selenium.locator.AttributeLocator;
@@ -215,8 +215,6 @@
selenium.type(pjq("input[type=text][id$=listHeightInput]"), "");
selenium.waitForPageToLoad();
- // it cannot handle null because of a bug in Mojarra and Myfaces and
- // generates style="height: ; " instead of default value
height = selenium.getStyle(jq("span.rf-is-lst-scrl"), CssProperty.HEIGHT);
assertEquals(height, "200px", "Height of list did not change");
}
@@ -227,15 +225,15 @@
selenium.type(pjq("input[type=text][id$=listWidthInput]"), "300px");
selenium.waitForPageToLoad();
- String width = selenium.getStyle(jq("span.rf-is-lst-pos"), CssProperty.WIDTH);
+ selenium.mouseUp(button);
+ String width = selenium.getStyle(jq("div.rf-sel-lst-scrl"), CssProperty.WIDTH);
assertEquals(width, "300px", "Width of list did not change");
selenium.type(pjq("input[type=text][id$=listWidthInput]"), "");
selenium.waitForPageToLoad();
- // it cannot handle null because of a bug in Mojarra and Myfaces and
- // generates style="width: ; " instead of default value
- width = selenium.getStyle(jq("span.rf-is-lst-pos"), CssProperty.WIDTH);
+ selenium.mouseUp(button);
+ width = selenium.getStyle(jq("div.rf-sel-lst-scrl"), CssProperty.WIDTH);
assertEquals(width, "200px", "Width of list did not change");
}
@@ -457,11 +455,11 @@
selenium.click(pjq("input[type=radio][name$=showButtonInput][value=false]"));
selenium.waitForPageToLoad();
- selenium.click(select);
if (selenium.isElementPresent(button)) {
assertFalse(selenium.isVisible(button), "Button should not be visible.");
}
+ selenium.mouseDown(input);
assertTrue(selenium.isVisible(popup), "Popup should be displayed.");
for (int i = 0; i < 50; i++) {
@@ -474,7 +472,8 @@
}
selenium.click(options.format(10));
- guardXhr(selenium).fireEvent(input, Event.BLUR);
+ selenium.fireEvent(input, Event.BLUR);
+ guardXhr(selenium).fireEvent(input, Event.BLUR); // some Selenium issue
assertTrue(selenium.belongsClass(options.format(10), "rf-sel-sel"));
waitGui.failWith("Bean was not updated").until(textEquals.locator(output).text("Hawaii"));
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToggleControl/AbstractTestToggleControl.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToggleControl/AbstractTestToggleControl.java 2011-01-20 13:01:04 UTC (rev 21114)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToggleControl/AbstractTestToggleControl.java 2011-01-20 13:48:30 UTC (rev 21115)
@@ -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.
*
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToolbar/TestRichToolbar.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToolbar/TestRichToolbar.java 2011-01-20 13:01:04 UTC (rev 21114)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToolbar/TestRichToolbar.java 2011-01-20 13:48:30 UTC (rev 21115)
@@ -24,6 +24,7 @@
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.jboss.test.selenium.locator.option.OptionLocatorFactory.optionLabel;
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;
@@ -225,9 +226,13 @@
@Test
public void testWidth() {
- selenium.type(pjq("input[id$=widthInput]"), "");
+ AttributeLocator attr = toolbar.getAttribute(Attribute.WIDTH);
+ assertTrue(selenium.isAttributePresent(attr), "Attribute width should be present.");
+ assertEquals(selenium.getAttribute(attr), "100%", "Attribute width when it is not set.");
+
+ selenium.type(pjq("input[id$=widthInput]"), "500px");
selenium.waitForPageToLoad();
- testHtmlAttribute(toolbar, "width", "700px");
+ assertTrue(selenium.getAttribute(attr).contains("500px"), "Attribute width should contain \"500px\".");
}
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToolbarGroup/TestRichToolbarGroup.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToolbarGroup/TestRichToolbarGroup.java 2011-01-20 13:01:04 UTC (rev 21114)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToolbarGroup/TestRichToolbarGroup.java 2011-01-20 13:48:30 UTC (rev 21115)
@@ -113,7 +113,7 @@
assertFalse(selenium.isElementPresent(separator), "No item separator should be present on the page.");
- selenium.select(input, optionLabel("null"));
+ selenium.select(pjq("select[id$=itemSeparatorInput]"), optionLabel("null"));
selenium.waitForPageToLoad();
assertFalse(selenium.isElementPresent(separator), "No item separator should be present on the page.");
13 years, 11 months
JBoss Rich Faces SVN: r21114 - in trunk/ui/input/ui/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-01-20 08:01:04 -0500 (Thu, 20 Jan 2011)
New Revision: 21114
Modified:
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
trunk/ui/input/ui/src/main/templates/calendar.template.xml
Log:
RF-10094 Inline default values: input components I
- added default value to template
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2011-01-20 12:36:29 UTC (rev 21113)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2011-01-20 13:01:04 UTC (rev 21114)
@@ -613,4 +613,12 @@
}
return value;
}
+
+ protected AbstractCalendar.Mode getModeOrDefault(UIComponent component) {
+ AbstractCalendar.Mode value = ((AbstractCalendar) component).getMode();
+ if (value == null) {
+ value = AbstractCalendar.Mode.client;
+ }
+ return value;
+ }
}
\ No newline at end of file
Modified: trunk/ui/input/ui/src/main/templates/calendar.template.xml
===================================================================
--- trunk/ui/input/ui/src/main/templates/calendar.template.xml 2011-01-20 12:36:29 UTC (rev 21113)
+++ trunk/ui/input/ui/src/main/templates/calendar.template.xml 2011-01-20 13:01:04 UTC (rev 21114)
@@ -69,12 +69,15 @@
<script type="text/javascript">
<cdk:scriptObject name="options">
- <cdk:scriptOption attributes="enableManualInput disabled readonly resetTimeOnDateSelect showApplyButton popup showInput showHeader showFooter showWeeksBar datePattern horizontalOffset verticalOffset hidePopupOnScrol showWeekDaysBar styleClass mode defaultLabel" />
+ <cdk:scriptOption attributes="enableManualInput disabled readonly resetTimeOnDateSelect showApplyButton popup showInput showHeader showFooter showWeeksBar datePattern hidePopupOnScrol showWeekDaysBar styleClass defaultLabel" />
<cdk:scriptOption attributes="onchange ondateselect onbeforedateselect onbeforecurrentdateselect onhide onshow ondatemouseover ondatemouseout onclean ontimeselect onbeforetimeselect" wrapper="eventHandler" />
- <cdk:scriptOption name="todayControlMode" value="#{getTodayControlModeOrDefault(component)}" />
+ <cdk:scriptOption name="mode" value="#{getModeOrDefault(component)}" defaultValue="org.richfaces.component.AbstractCalendar.Mode.client"/>
+ <cdk:scriptOption name="todayControlMode" value="#{getTodayControlModeOrDefault(component)}" defaultValue='"select"'/>
<cdk:scriptOption name="jointPoint" value="#{getJointPointOrDefault(component)}" />
<cdk:scriptOption name="direction" value="#{getDirectionOrDefault(component)}" />
- <cdk:scriptOption name="boundaryDatesMode" value="#{getBoundaryDatesModeOrDefault(component)}" />
+ <cdk:scriptOption name="horizontalOffset" value="#{component.attributes['horizontalOffset']}" defaultValue="0"/>
+ <cdk:scriptOption name="verticalOffset" value="#{component.attributes['verticalOffset']}" defaultValue="0"/>
+ <cdk:scriptOption name="boundaryDatesMode" value="#{getBoundaryDatesModeOrDefault(component)}" defaultValue='"inactive"'/>
<cdk:scriptOption name="currentDate" value="#{getCurrentDate(facesContext, component)}" />
<cdk:scriptOption name="selectedDate" value="#{getSelectedDate(facesContext, component)}" />
<cdk:scriptOption name="dayCellClass" value="#{getDayCellClass(facesContext, component)}" />
13 years, 11 months
JBoss Rich Faces SVN: r21113 - trunk/ui/output/ui/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-01-20 07:36:29 -0500 (Thu, 20 Jan 2011)
New Revision: 21113
Modified:
trunk/ui/output/ui/src/main/templates/dropdownmenu.template.xml
trunk/ui/output/ui/src/main/templates/popupPanel.template.xml
Log:
RF-10097 Inline default values: output components I
- added default value to templates.
Modified: trunk/ui/output/ui/src/main/templates/dropdownmenu.template.xml
===================================================================
--- trunk/ui/output/ui/src/main/templates/dropdownmenu.template.xml 2011-01-20 12:12:32 UTC (rev 21112)
+++ trunk/ui/output/ui/src/main/templates/dropdownmenu.template.xml 2011-01-20 12:36:29 UTC (rev 21113)
@@ -52,7 +52,7 @@
<cdk:scriptObject name="options">
<cdk:scriptOption name="direction" value="#{getDirection(component).getValue()}" defaultValue="org.richfaces.component.Positioning.DEFAULT.getValue()"/>
<cdk:scriptOption name="jointPoint" value="#{getJointPoint(component).getValue()}" defaultValue="org.richfaces.component.Positioning.DEFAULT.getValue()"/>
- <cdk:scriptOption name="showEvent" value="#{getShowEvent(component)}" defaultValue='String.valueOf("click")'/>
+ <cdk:scriptOption name="showEvent" value="#{getShowEvent(component)}" defaultValue='"click"'/>
<cdk:scriptOption name="mode" value="#{getMode(component)}" defaultValue="org.richfaces.component.Mode.server"/>
<cdk:scriptOption attributes="hideDelay showEvent showDelay horizontalOffset verticalOffset" />
<cdk:scriptOption attributes="onshow onhide ongroupshow ongrouphide onitemclick" wrapper="eventHandler"/>
Modified: trunk/ui/output/ui/src/main/templates/popupPanel.template.xml
===================================================================
--- trunk/ui/output/ui/src/main/templates/popupPanel.template.xml 2011-01-20 12:12:32 UTC (rev 21112)
+++ trunk/ui/output/ui/src/main/templates/popupPanel.template.xml 2011-01-20 12:36:29 UTC (rev 21113)
@@ -73,8 +73,8 @@
</div>
<cdk:scriptObject name="options">
- <cdk:scriptOption name="left" value="#{getLeftOrDefault(component)}" defaultValue='String.valueOf("auto")'/>
- <cdk:scriptOption name="top" value="#{getTopOrDefault(component)}" defaultValue='String.valueOf("auto")'/>
+ <cdk:scriptOption name="left" value="#{getLeftOrDefault(component)}" defaultValue='"auto"'/>
+ <cdk:scriptOption name="top" value="#{getTopOrDefault(component)}" defaultValue='"auto"'/>
<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>
@@ -86,8 +86,5 @@
</c:if>
</script>
</div>
-
-
-
</cc:implementation>
</cdk:root>
\ No newline at end of file
13 years, 11 months
JBoss Rich Faces SVN: r21112 - trunk/ui/output/ui/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-01-20 07:12:32 -0500 (Thu, 20 Jan 2011)
New Revision: 21112
Modified:
trunk/ui/output/ui/src/main/templates/dropdownmenu.template.xml
Log:
RF-10097 Inline default values: output components I
- added default value to templates.
Modified: trunk/ui/output/ui/src/main/templates/dropdownmenu.template.xml
===================================================================
--- trunk/ui/output/ui/src/main/templates/dropdownmenu.template.xml 2011-01-20 11:52:09 UTC (rev 21111)
+++ trunk/ui/output/ui/src/main/templates/dropdownmenu.template.xml 2011-01-20 12:12:32 UTC (rev 21112)
@@ -50,10 +50,10 @@
<script type="text/javascript">
<cdk:scriptObject name="options">
- <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 name="direction" value="#{getDirection(component).getValue()}" defaultValue="org.richfaces.component.Positioning.DEFAULT.getValue()"/>
+ <cdk:scriptOption name="jointPoint" value="#{getJointPoint(component).getValue()}" defaultValue="org.richfaces.component.Positioning.DEFAULT.getValue()"/>
+ <cdk:scriptOption name="showEvent" value="#{getShowEvent(component)}" defaultValue='String.valueOf("click")'/>
+ <cdk:scriptOption name="mode" value="#{getMode(component)}" defaultValue="org.richfaces.component.Mode.server"/>
<cdk:scriptOption attributes="hideDelay showEvent showDelay horizontalOffset verticalOffset" />
<cdk:scriptOption attributes="onshow onhide ongroupshow ongrouphide onitemclick" wrapper="eventHandler"/>
</cdk:scriptObject>
13 years, 11 months
JBoss Rich Faces SVN: r21111 - modules/tests/metamer/trunk/application/src/main/webapp/templates.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-01-20 06:52:09 -0500 (Thu, 20 Jan 2011)
New Revision: 21111
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/templates/header.xhtml
Log:
added statusChecker to header to make testing of @status possible
Modified: modules/tests/metamer/trunk/application/src/main/webapp/templates/header.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/templates/header.xhtml 2011-01-20 11:51:40 UTC (rev 21110)
+++ modules/tests/metamer/trunk/application/src/main/webapp/templates/header.xhtml 2011-01-20 11:52:09 UTC (rev 21111)
@@ -72,10 +72,25 @@
<h:outputLabel value="Render Checker" />
<a4j:outputPanel id="renderChecker">
<h:outputText value="#{phasesBean.date}">
- <f:convertDateTime pattern="ss.SSS" />
+ <f:convertDateTime pattern="HH:MM:ss.SSS" />
</h:outputText>
</a4j:outputPanel>
+ <h:outputLabel value="Status Checker" />
+ <a4j:outputPanel id="statusCheckerPanel">
+ <a4j:status name="statusChecker" onstop="updateStatusChecker()" />
+ <h:outputText id="statusCheckerOutput" value="" />
+
+ <h:outputScript target="head" library="script" name="date-format.js" />
+ <h:outputScript target="head" library="script" name="clientTime-refresh.js" />
+ <script>
+ function updateStatusChecker() {
+ Metamer.ClientTime.refresh(#{rich:element('statusCheckerOutput')});
+ }
+ updateStatusChecker();
+ </script>
+ </a4j:outputPanel>
+
<ui:debug hotkey="L" />
</h:panelGrid>
13 years, 11 months
JBoss Rich Faces SVN: r21110 - modules/tests/metamer/trunk/application/src/main/webapp/resources/script.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-01-20 06:51:40 -0500 (Thu, 20 Jan 2011)
New Revision: 21110
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/resources/script/clientTime-refresh.js
Log:
clientTime-refresh.js changed to print human readable dates
Modified: modules/tests/metamer/trunk/application/src/main/webapp/resources/script/clientTime-refresh.js
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/resources/script/clientTime-refresh.js 2011-01-20 10:39:36 UTC (rev 21109)
+++ modules/tests/metamer/trunk/application/src/main/webapp/resources/script/clientTime-refresh.js 2011-01-20 11:51:40 UTC (rev 21110)
@@ -9,6 +9,6 @@
Metamer.ClientTime.refresh = function (element) {
var now = new Date();
jQuery(element)
- .text(now.format("dd.mm.yyyy HH:MM:ss.l", false))
+ .text(now.format("HH:MM:ss.l", false))
.attr("title", now.getTime());
}
\ No newline at end of file
13 years, 11 months
JBoss Rich Faces SVN: r21109 - trunk/ui/output/ui/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-01-20 05:39:36 -0500 (Thu, 20 Jan 2011)
New Revision: 21109
Modified:
trunk/ui/output/ui/src/main/templates/popupPanel.template.xml
Log:
RF-10097 Inline default values: output components I
- added default value to templates.
Modified: trunk/ui/output/ui/src/main/templates/popupPanel.template.xml
===================================================================
--- trunk/ui/output/ui/src/main/templates/popupPanel.template.xml 2011-01-20 10:39:07 UTC (rev 21108)
+++ trunk/ui/output/ui/src/main/templates/popupPanel.template.xml 2011-01-20 10:39:36 UTC (rev 21109)
@@ -73,8 +73,8 @@
</div>
<cdk:scriptObject name="options">
- <cdk:scriptOption name="left" value="#{getLeftOrDefault(component)}" />
- <cdk:scriptOption name="top" value="#{getTopOrDefault(component)}" />
+ <cdk:scriptOption name="left" value="#{getLeftOrDefault(component)}" defaultValue='String.valueOf("auto")'/>
+ <cdk:scriptOption name="top" value="#{getTopOrDefault(component)}" defaultValue='String.valueOf("auto")'/>
<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>
13 years, 11 months
JBoss Rich Faces SVN: r21108 - modules/tests/metamer/trunk/application/src/main/webapp/templates.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-01-20 05:39:07 -0500 (Thu, 20 Jan 2011)
New Revision: 21108
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/templates/header.xhtml
Log:
added renderChecker for easy checking of the @render attribute
Modified: modules/tests/metamer/trunk/application/src/main/webapp/templates/header.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/templates/header.xhtml 2011-01-20 10:12:40 UTC (rev 21107)
+++ modules/tests/metamer/trunk/application/src/main/webapp/templates/header.xhtml 2011-01-20 10:39:07 UTC (rev 21108)
@@ -54,7 +54,7 @@
<h:selectBooleanCheckbox id="a4jLogCheckbox" value="false" onchange="showOrHideLog()" />
- <h:outputText id="a4jStatusLabel" value="Status" />
+ <h:outputLabel id="a4jStatusLabel" value="Status" />
<a4j:outputPanel id="a4jStatusPanel" ajaxRendered="true">
<a4j:status id="a4jStatus" onstop="updateLog('#{phasesBean.phases}')">
<f:facet name="start">
@@ -68,8 +68,18 @@
<h:outputText id="showUiDebugLabel" value="Show ui:debug" />
<h:outputText id="showUiDebug" value="Ctrl+Shift+L" />
+
+ <h:outputLabel value="Render Checker" />
+ <a4j:outputPanel id="renderChecker">
+ <h:outputText value="#{phasesBean.date}">
+ <f:convertDateTime pattern="ss.SSS" />
+ </h:outputText>
+ </a4j:outputPanel>
+
<ui:debug hotkey="L" />
</h:panelGrid>
+
+
<h:form id="displayControlsForm">
<h:panelGrid columns="2">
13 years, 11 months
JBoss Rich Faces SVN: r21107 - trunk/ui/output/ui/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-01-20 05:12:40 -0500 (Thu, 20 Jan 2011)
New Revision: 21107
Modified:
trunk/ui/output/ui/src/main/templates/dropdownmenu.template.xml
trunk/ui/output/ui/src/main/templates/popupPanel.template.xml
Log:
REVERT changes from RF-10097 "Inline default values: output components I" due to failed tests
Modified: trunk/ui/output/ui/src/main/templates/dropdownmenu.template.xml
===================================================================
--- trunk/ui/output/ui/src/main/templates/dropdownmenu.template.xml 2011-01-20 09:41:18 UTC (rev 21106)
+++ trunk/ui/output/ui/src/main/templates/dropdownmenu.template.xml 2011-01-20 10:12:40 UTC (rev 21107)
@@ -50,10 +50,10 @@
<script type="text/javascript">
<cdk:scriptObject name="options">
- <cdk:scriptOption name="direction" value="#{getDirection(component).getValue()}" defaultValue="AA"/>
- <cdk:scriptOption name="jointPoint" value="#{getJointPoint(component).getValue()}" defaultValue="AA"/>
- <cdk:scriptOption name="showEvent" value="#{getShowEvent(component)}" defaultValue="click"/>
- <cdk:scriptOption name="mode" value="#{getMode(component)}" defaultValue="server"/>
+ <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" />
<cdk:scriptOption attributes="onshow onhide ongroupshow ongrouphide onitemclick" wrapper="eventHandler"/>
</cdk:scriptObject>
Modified: trunk/ui/output/ui/src/main/templates/popupPanel.template.xml
===================================================================
--- trunk/ui/output/ui/src/main/templates/popupPanel.template.xml 2011-01-20 09:41:18 UTC (rev 21106)
+++ trunk/ui/output/ui/src/main/templates/popupPanel.template.xml 2011-01-20 10:12:40 UTC (rev 21107)
@@ -73,11 +73,11 @@
</div>
<cdk:scriptObject name="options">
- <cdk:scriptOption name="left" value="#{getLeftOrDefault(component)}" defaultValue="auto"/>
- <cdk:scriptOption name="top" value="#{getTopOrDefault(component)}" defaultValue="auto"/>
- <cdk:scriptOption attributes="minHeight minWidth maxHeight maxWidth width height 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>
+ <cdk:scriptOption name="left" value="#{getLeftOrDefault(component)}" />
+ <cdk:scriptOption name="top" value="#{getTopOrDefault(component)}" />
+ <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>
<script type="text/javascript">
new RichFaces.ui.PopupPanel(#{toScriptArgs(clientId, options)});
@@ -87,5 +87,7 @@
</script>
</div>
+
+
</cc:implementation>
</cdk:root>
\ No newline at end of file
13 years, 11 months
JBoss Rich Faces SVN: r21106 - 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-20 04:41:18 -0500 (Thu, 20 Jan 2011)
New Revision: 21106
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPopupPanel.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java
trunk/ui/output/ui/src/main/templates/dropdownmenu.template.xml
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
- added default value to templates.
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-20 09:01:13 UTC (rev 21105)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPopupPanel.java 2011-01-20 09:41:18 UTC (rev 21106)
@@ -59,19 +59,19 @@
@Attribute(defaultValue = "-1")
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/renderkit/html/PopupPanelBaseRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java 2011-01-20 09:01:13 UTC (rev 21105)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java 2011-01-20 09:41:18 UTC (rev 21106)
@@ -37,6 +37,9 @@
private static final int SIZE = 10;
private static final String STATE_OPTION_SUFFIX = "StateOption_";
+ private static final String DEFAULT_LEFT = "auto";
+ private static final String DEFAULT_TOP = "auto";
+
//TODO nick - use enums
private static final Set<String> ALLOWED_ATTACHMENT_OPTIONS = new HashSet<String>();
static {
@@ -185,8 +188,6 @@
return result;
}
-
-
private Map<String, Object> prepareVisualOptions(Object value, AbstractPopupPanel panel) {
if (null == value) {
return new HashMap<String, Object>();
@@ -207,4 +208,20 @@
+ "] 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_LEFT;
+ }
+ return leftProperty;
+ }
+
+ protected String getTopOrDefault(UIComponent component) {
+ String topProperty = ((AbstractPopupPanel) component).getTop();
+ if (topProperty == null || topProperty.length() == 0) {
+ topProperty = DEFAULT_TOP;
+ }
+ return topProperty;
+ }
}
Modified: trunk/ui/output/ui/src/main/templates/dropdownmenu.template.xml
===================================================================
--- trunk/ui/output/ui/src/main/templates/dropdownmenu.template.xml 2011-01-20 09:01:13 UTC (rev 21105)
+++ trunk/ui/output/ui/src/main/templates/dropdownmenu.template.xml 2011-01-20 09:41:18 UTC (rev 21106)
@@ -50,10 +50,10 @@
<script type="text/javascript">
<cdk:scriptObject name="options">
- <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 name="direction" value="#{getDirection(component).getValue()}" defaultValue="AA"/>
+ <cdk:scriptOption name="jointPoint" value="#{getJointPoint(component).getValue()}" defaultValue="AA"/>
+ <cdk:scriptOption name="showEvent" value="#{getShowEvent(component)}" defaultValue="click"/>
+ <cdk:scriptOption name="mode" value="#{getMode(component)}" defaultValue="server"/>
<cdk:scriptOption attributes="hideDelay showEvent showDelay horizontalOffset verticalOffset" />
<cdk:scriptOption attributes="onshow onhide ongroupshow ongrouphide onitemclick" wrapper="eventHandler"/>
</cdk:scriptObject>
Modified: trunk/ui/output/ui/src/main/templates/popupPanel.template.xml
===================================================================
--- trunk/ui/output/ui/src/main/templates/popupPanel.template.xml 2011-01-20 09:01:13 UTC (rev 21105)
+++ trunk/ui/output/ui/src/main/templates/popupPanel.template.xml 2011-01-20 09:41:18 UTC (rev 21106)
@@ -73,9 +73,11 @@
</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)}" defaultValue="auto"/>
+ <cdk:scriptOption name="top" value="#{getTopOrDefault(component)}" defaultValue="auto"/>
+ <cdk:scriptOption attributes="minHeight minWidth maxHeight maxWidth width height 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)});
@@ -85,7 +87,5 @@
</script>
</div>
-
-
</cc:implementation>
</cdk:root>
\ No newline at end of file
Modified: trunk/ui/output/ui/src/main/templates/progressBar.template.xml
===================================================================
--- trunk/ui/output/ui/src/main/templates/progressBar.template.xml 2011-01-20 09:01:13 UTC (rev 21105)
+++ trunk/ui/output/ui/src/main/templates/progressBar.template.xml 2011-01-20 09:41:18 UTC (rev 21106)
@@ -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="#{getMinValueOrDefault(component)}" />
- <cdk:scriptOption name="maxValue" value="#{getMaxValueOrDefault(component)}" />
+ <cdk:scriptOption name="minValue" value="#{getMinValueOrDefault(component)}" defaultValue="0"/>
+ <cdk:scriptOption name="maxValue" value="#{getMaxValueOrDefault(component)}" defaultValue="100"/>
<cdk:scriptOption attributes="interval enabled value onfinish resource" />
</cdk:scriptObject>
13 years, 11 months