JBoss Rich Faces SVN: r8292 - in trunk/test-applications/seleniumTest/src: test/java/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-04-29 08:23:11 -0400 (Tue, 29 Apr 2008)
New Revision: 8292
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TogglePanelTest.java
Log:
Toggle Panel Test refactoring
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml 2008-04-29 12:22:58 UTC (rev 8291)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml 2008-04-29 12:23:11 UTC (rev 8292)
@@ -15,7 +15,8 @@
margin: 2px;
}
</ui:define>
- <ui:define name="component">
+ <ui:define name="component">
+ <h:form id="_form">
<h:panelGroup layout="block" styleClass="component_div" >
<rich:togglePanel id="panel_ajax" switchType="ajax" initialState="one"
stateOrder="one,two">
@@ -92,15 +93,12 @@
</h:panelGroup>
<br/>
- <!--a4j:outputPanel ajaxRendered="true" id="outputPanel" >
+ <a4j:outputPanel ajaxRendered="true" id="outputPanel" >
<h:inputText value="#{panelBean.value}" id="_value"></h:inputText>
<h:outputText value="#{panelBean.value2}" id="_value2"></h:outputText>
- </a4j:outputPanel-->
- <a4j:log popup="false" />
+ </a4j:outputPanel>
<br/>
+ </h:form>
</ui:define>
- <ui:define name="description">
- <ui:include src="togglePanelDescription.xhtml" />
- </ui:define>
</ui:composition>
</html>
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TogglePanelTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TogglePanelTest.java 2008-04-29 12:22:58 UTC (rev 8291)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TogglePanelTest.java 2008-04-29 12:23:11 UTC (rev 8292)
@@ -1,191 +1,193 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces;
-
-import org.ajax4jsf.TemplateBean;
-import org.ajax4jsf.test.base.RichSeleniumTest;
-import org.ajax4jsf.test.base.SeleniumTestBase;
-import org.ajax4jsf.test.base.Templates;
-import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Parameters;
-import org.testng.annotations.Test;
-
-import com.thoughtworks.selenium.SeleniumException;
-
-public class TogglePanelTest extends SeleniumTestBase implements
- RichSeleniumTest {
- private static final String PAGE = "/faces/pages/togglePanel/togglePanelTest.xhtml";
-
- public TogglePanelTest() {
- super("http", "localhost", "8080");
- }
-
- /**
- * This method are invoking before selenium tests started
- */
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
- }
-
- /**
- * This method are invoking after selenium tests completed
- */
- @AfterTest
- public void stopSelenium() {
- super.stopSelenium();
- }
-
- @Test
- public void testTogglePanelComponent() throws Exception {
- _testTogglePanelComponent(Templates.SIMPLE);
- _testTogglePanelComponent(Templates.DATATABLE);
- }
-
- private void _testTogglePanelComponent(Templates template) {
- template.loadTemplate(this);
-
- String parentId = getParentId();
- renderPage(PAGE + "?" + TemplateBean.PARAM_NAME + "=" + template);
-
- String inputId = parentId + "_value";
- String outputId = parentId + "_value2";
-
- String controlNext = parentId + "ajax_next";
- String controlOne = parentId + "ajax_one";
- String controlTwo = parentId + "ajax_two";
-
- String oneFacet = parentId + "ajax_state_one";
- String twoFacet = parentId + "ajax_state_two";
-
- clickById(controlNext);
- waitForAjaxCompletion(5000);
- pause(60000, "");
- AssertValueEquals(inputId, "ajax_next");
- AssertTextEquals(outputId, "1");
- Assert.assertTrue(isVisibleById(twoFacet));
- try {
- getTextById(oneFacet);
- Assert
- .fail("Both of 'one' and 'two' states were rendered for ajax toggle panel.");
- } catch (SeleniumException se) {
-
- }
-
- clickById(controlOne);
- waitForAjaxCompletion(5000);
- AssertValueEquals(inputId, "ajax_one");
- AssertTextEquals(outputId, "2");
- Assert.assertTrue(isVisibleById(oneFacet));
- try {
- getTextById(twoFacet);
- Assert
- .fail("Both of 'one' and 'two' states were rendered for ajax toggle panel.");
- } catch (SeleniumException se) {
-
- }
-
- clickById(controlTwo);
- waitForAjaxCompletion(5000);
- AssertValueEquals(inputId, "ajax_two");
- AssertTextEquals(outputId, "1");
- Assert.assertTrue(isVisibleById(twoFacet));
- try {
- getTextById(oneFacet);
- Assert
- .fail("Both of 'one' and 'two' states were rendered for ajax toggle panel.");
- } catch (SeleniumException se) {
-
- }
-
- controlNext = parentId + "server_next";
- controlOne = parentId + "server_one";
- controlTwo = parentId + "server_two";
- oneFacet = parentId + "server_state_one";
- twoFacet = parentId + "server_state_two";
-
- clickById(controlNext);
- waitForPageToLoad();
- AssertValueEquals(inputId, "server_next");
- AssertTextEquals(outputId, "2");
- Assert.assertTrue(isVisibleById(twoFacet));
- try {
- getTextById(oneFacet);
- Assert
- .fail("Both of 'one' and 'two' states were rendered for server toggle panel.");
- } catch (SeleniumException se) {
-
- }
-
- clickById(controlOne);
- waitForPageToLoad();
- AssertValueEquals(inputId, "server_one");
- AssertTextEquals(outputId, "3");
- Assert.assertTrue(isVisibleById(oneFacet));
- try {
- getTextById(twoFacet);
- Assert
- .fail("Both of 'one' and 'two' states were rendered for server toggle panel.");
- } catch (SeleniumException se) {
-
- }
-
- clickById(controlTwo);
- waitForPageToLoad();
- AssertValueEquals(inputId, "server_two");
- AssertTextEquals(outputId, "4");
- Assert.assertTrue(isVisibleById(twoFacet));
- try {
- getTextById(oneFacet);
- Assert
- .fail("Both of 'one' and 'two' states were rendered for server toggle panel.");
- } catch (SeleniumException se) {
-
- }
-
- controlNext = parentId + "client_next";
- controlOne = parentId + "client_one";
- controlTwo = parentId + "client_two";
- oneFacet = parentId + "client_state_one";
- twoFacet = parentId + "client_state_two";
-
- clickById(controlNext);
- Assert.assertTrue(isVisibleById(twoFacet));
- Assert.assertFalse(isVisibleById(oneFacet));
-
- clickById(controlOne);
- Assert.assertTrue(isVisibleById(oneFacet));
- Assert.assertFalse(isVisibleById(twoFacet));
-
- clickById(controlTwo);
- Assert.assertTrue(isVisibleById(twoFacet));
- Assert.assertFalse(isVisibleById(oneFacet));
- }
-
- public String getTestUrl() {
- return null;
- }
-
-}
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces;
+
+import org.ajax4jsf.test.base.RichSeleniumTest;
+import org.ajax4jsf.test.base.SeleniumTestBase;
+import org.ajax4jsf.test.base.Templates;
+import org.testng.Assert;
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+import com.thoughtworks.selenium.SeleniumException;
+
+public class TogglePanelTest extends SeleniumTestBase implements
+ RichSeleniumTest {
+
+ public TogglePanelTest() {
+ super("http", "localhost", "8080");
+ }
+
+ /**
+ * This method are invoking before selenium tests started
+ */
+ @BeforeTest
+ @Parameters( { "browser" })
+ public void startSelenium(String browser) {
+ super.startSelenium(browser);
+ }
+
+ /**
+ * This method are invoking after selenium tests completed
+ */
+ @AfterTest
+ public void stopSelenium() {
+ super.stopSelenium();
+ }
+
+ @Test
+ public void testTogglePanelComponent() throws Exception {
+ _testTogglePanelComponent(Templates.SIMPLE);
+ _testTogglePanelComponent(Templates.DATATABLE);
+ }
+
+ private void _testTogglePanelComponent(Templates template) {
+ renderPage(getTestUrl(), template);
+ String parentId = getParentId() + "_form:";
+
+ String inputId = parentId + "_value";
+ String outputId = parentId + "_value2";
+
+ String controlNext = parentId + "ajax_next";
+ String controlOne = parentId + "ajax_one";
+ String controlTwo = parentId + "ajax_two";
+
+ String oneFacet = parentId + "ajax_state_one";
+ String twoFacet = parentId + "ajax_state_two";
+
+ writeStatus("Click on ajax controlNext");
+ clickById(controlNext);
+ waitForAjaxCompletion();
+ //pause(6000, "panel_ajax");
+ AssertValueEquals(inputId, "ajax_next");
+ AssertTextEquals(outputId, "1");
+ Assert.assertTrue(isVisibleById(twoFacet));
+ try {
+ getTextById(oneFacet);
+ Assert
+ .fail("Both of 'one' and 'two' states were rendered for ajax toggle panel.");
+ } catch (SeleniumException se) {
+
+ }
+
+ writeStatus("Click on ajax controlOne");
+ clickById(controlOne);
+ waitForAjaxCompletion(5000);
+ AssertValueEquals(inputId, "ajax_one");
+ AssertTextEquals(outputId, "2");
+ Assert.assertTrue(isVisibleById(oneFacet));
+ try {
+ getTextById(twoFacet);
+ Assert
+ .fail("Both of 'one' and 'two' states were rendered for ajax toggle panel.");
+ } catch (SeleniumException se) {
+
+ }
+
+ writeStatus("Click on ajax controlTwo");
+ clickById(controlTwo);
+ waitForAjaxCompletion(5000);
+ AssertValueEquals(inputId, "ajax_two");
+ AssertTextEquals(outputId, "1");
+ Assert.assertTrue(isVisibleById(twoFacet));
+ try {
+ getTextById(oneFacet);
+ Assert
+ .fail("Both of 'one' and 'two' states were rendered for ajax toggle panel.");
+ } catch (SeleniumException se) {
+
+ }
+
+ controlNext = parentId + "server_next";
+ controlOne = parentId + "server_one";
+ controlTwo = parentId + "server_two";
+ oneFacet = parentId + "server_state_one";
+ twoFacet = parentId + "server_state_two";
+
+ writeStatus("Click on controlNext");
+ clickCommandAndWait(controlNext);
+ AssertValueEquals(inputId, "server_next");
+ AssertTextEquals(outputId, "2");
+ Assert.assertTrue(isVisibleById(twoFacet));
+ try {
+ getTextById(oneFacet);
+ Assert
+ .fail("Both of 'one' and 'two' states were rendered for server toggle panel.");
+ } catch (SeleniumException se) {
+
+ }
+
+ writeStatus("Click on server controlOne");
+ clickCommandAndWait(controlOne);
+ AssertValueEquals(inputId, "server_one");
+ AssertTextEquals(outputId, "3");
+ Assert.assertTrue(isVisibleById(oneFacet));
+ try {
+ getTextById(twoFacet);
+ Assert
+ .fail("Both of 'one' and 'two' states were rendered for server toggle panel.");
+ } catch (SeleniumException se) {
+
+ }
+
+ writeStatus("Click on server controlTwo");
+ clickCommandAndWait(controlTwo);
+ AssertValueEquals(inputId, "server_two");
+ AssertTextEquals(outputId, "4");
+ Assert.assertTrue(isVisibleById(twoFacet));
+ try {
+ getTextById(oneFacet);
+ Assert
+ .fail("Both of 'one' and 'two' states were rendered for server toggle panel.");
+ } catch (SeleniumException se) {
+
+ }
+
+ controlNext = parentId + "client_next";
+ controlOne = parentId + "client_one";
+ controlTwo = parentId + "client_two";
+ oneFacet = parentId + "client_state_one";
+ twoFacet = parentId + "client_state_two";
+
+ writeStatus("Click on client controlNext");
+ clickById(controlNext);
+ Assert.assertTrue(isVisibleById(twoFacet));
+ Assert.assertFalse(isVisibleById(oneFacet));
+
+ writeStatus("Click on client controlOne");
+ clickById(controlOne);
+ Assert.assertTrue(isVisibleById(oneFacet));
+ Assert.assertFalse(isVisibleById(twoFacet));
+
+ writeStatus("Click on client controlTwo");
+ clickById(controlTwo);
+ Assert.assertTrue(isVisibleById(twoFacet));
+ Assert.assertFalse(isVisibleById(oneFacet));
+ }
+
+ public String getTestUrl() {
+ return "/faces/pages/togglePanel/togglePanelTest.xhtml";
+ }
+
+}
17 years, 6 months
JBoss Rich Faces SVN: r8291 - in trunk/test-applications/jsp/src/main: webapp/Calendar and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2008-04-29 08:22:58 -0400 (Tue, 29 Apr 2008)
New Revision: 8291
Modified:
trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java
trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp
trunk/test-applications/jsp/src/main/webapp/Calendar/CalendarProperty.jsp
Log:
http://jira.jboss.com/jira/browse/RF-3105
Modified: trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java 2008-04-29 12:13:32 UTC (rev 8290)
+++ trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java 2008-04-29 12:22:58 UTC (rev 8291)
@@ -95,8 +95,25 @@
private boolean showHeader;
private boolean showFooter;
private boolean resetTimeOnDateSelect;
+ private String defaultTime;
/**
+ * @return the defaultTime
+ */
+ public String getDefaultTime() {
+ return defaultTime;
+ }
+
+
+ /**
+ * @param defaultTime the defaultTime to set
+ */
+ public void setDefaultTime(String defaultTime) {
+ this.defaultTime = defaultTime;
+ }
+
+
+ /**
* @return the showHeader
*/
public boolean isShowHeader() {
@@ -145,6 +162,7 @@
public CalendarBean() {
+ defaultTime = "7:30";
resetTimeOnDateSelect = false;
showFooter = true;
showHeader = true;
Modified: trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp 2008-04-29 12:13:32 UTC (rev 8290)
+++ trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp 2008-04-29 12:22:58 UTC (rev 8291)
@@ -14,7 +14,9 @@
<h:outputText value="Ajax mode"
rendered="#{calendarBean.renderedAjax}" />
- <rich:calendar id="calendarClientID" resetTimeOnDateSelect="#{calendarBean.resetTimeOnDateSelect}"
+ <rich:calendar id="calendarClientID"
+ defaultTime="#{calendarBean.defaultTime}"
+ resetTimeOnDateSelect="#{calendarBean.resetTimeOnDateSelect}"
showFooter="#{calendarBean.showFooter}"
showHeader="#{calendarBean.showHeader}"
horizontalOffset="#{calendarBean.horizontalOffset}"
Modified: trunk/test-applications/jsp/src/main/webapp/Calendar/CalendarProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Calendar/CalendarProperty.jsp 2008-04-29 12:13:32 UTC (rev 8290)
+++ trunk/test-applications/jsp/src/main/webapp/Calendar/CalendarProperty.jsp 2008-04-29 12:22:58 UTC (rev 8291)
@@ -122,6 +122,9 @@
<f:selectItem itemLabel="top-left" itemValue="top-left" />
<f:selectItem itemLabel="auto" itemValue="auto" />
</h:selectOneRadio>
+
+ <h:outputText value="defaultTime"></h:outputText>
+ <h:inputText value="#{calendarBean.defaultTime}" onchange="submit();"></h:inputText>
<h:outputText value="Time Zone:" />
<h:selectOneRadio valueChangeListener="#{calendarBean.timeZone}" onchange="submit();">
@@ -154,13 +157,13 @@
</h:selectBooleanCheckbox>
<h:outputText value="resetTimeOnDateSelect"></h:outputText>
- <h:selectBooleanCheckbox value="#{calendarBean.resetTimeOnDateSelect}"></h:selectBooleanCheckbox>
+ <h:selectBooleanCheckbox value="#{calendarBean.resetTimeOnDateSelect}" onchange="sumit();"></h:selectBooleanCheckbox>
<h:outputText value="showFooter"></h:outputText>
- <h:selectBooleanCheckbox value="#{calendarBean.showFooter}"></h:selectBooleanCheckbox>
+ <h:selectBooleanCheckbox value="#{calendarBean.showFooter}" onchange="sumit();"></h:selectBooleanCheckbox>
<h:outputText value="showHeader"></h:outputText>
- <h:selectBooleanCheckbox value="#{calendarBean.showHeader}"></h:selectBooleanCheckbox>
+ <h:selectBooleanCheckbox value="#{calendarBean.showHeader}" onchange="sumit();"></h:selectBooleanCheckbox>
<h:outputText value="Disabled:" />
<h:selectBooleanCheckbox value="#{calendarBean.disabled}" onclick="submit()" />
17 years, 6 months
JBoss Rich Faces SVN: r8290 - trunk/ui/virtualEarth/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-04-29 08:13:32 -0400 (Tue, 29 Apr 2008)
New Revision: 8290
Modified:
trunk/ui/virtualEarth/src/main/config/component/virtualEarth.xml
Log:
http://jira.jboss.com/jira/browse/RF-2220
Adding default values
Modified: trunk/ui/virtualEarth/src/main/config/component/virtualEarth.xml
===================================================================
--- trunk/ui/virtualEarth/src/main/config/component/virtualEarth.xml 2008-04-29 12:12:18 UTC (rev 8289)
+++ trunk/ui/virtualEarth/src/main/config/component/virtualEarth.xml 2008-04-29 12:13:32 UTC (rev 8290)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://labs.jboss.com/jbossrichfaces/component-config.dtd
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://labs.jboss.com/jbossrichfaces/component-config.dtd
">
<components>
@@ -44,7 +44,7 @@
<description>
The JavaScript variable that is used to access the Virtual Earth API. If you have
more than one Virtual Earth components on the same page, use individual
- key for each of them. The default variable name is "map" (without quotes)
+ key for each of them. Default value name is "map".
</description>
<defaultvalue>"map"</defaultvalue>
</property>
@@ -52,7 +52,7 @@
<name>lat</name>
<classname>java.lang.String</classname>
<description>
- Initial latitude coordinate in degrees, as a number between -90 and +90
+ Initial latitude coordinate in degrees, as a number between -90 and +90. Default value is "37.9721046".
</description>
<defaultvalue>"37.9721046"</defaultvalue>
</property>
@@ -60,7 +60,7 @@
<name>lng</name>
<classname>java.lang.String</classname>
<description>
- Initial longitude coordinate in degrees, as a number between -180 and +180
+ Initial longitude coordinate in degrees, as a number between -180 and +180. Default value is "-122.04248428346".
</description>
<defaultvalue>"-122.0424842834"</defaultvalue>
</property>
@@ -68,7 +68,7 @@
<name>zoom</name>
<classname>java.lang.String</classname>
<description>
- Initial zoom level as a number between 1 and 18. The default value is 17
+ Initial zoom level as a number between 1 and 18. Default value is "17".
</description>
<defaultvalue>"17"</defaultvalue>
</property>
@@ -76,7 +76,7 @@
<name>mapStyle</name>
<classname>java.lang.String</classname>
<description>
- Navigation control size. The possible values are Road,Aerial,Hybrid,Birdseye. The default value is Road
+ Navigation control size. Possible values are "Road", "Aerial", "Hybrid", "Birdseye". Default value is Road
</description>
<defaultvalue>"Road"</defaultvalue>
</property>
@@ -84,7 +84,7 @@
<name>dashboardSize</name>
<classname>java.lang.String</classname>
<description>
- Initial map type. The possible values are Normal,Small,Tiny. The default value is Normal
+ Initial map type. The possible values are Normal,Small,Tiny. Default value is "Normal".
</description>
<defaultvalue>"Normal"</defaultvalue>
</property>
@@ -92,7 +92,7 @@
<name>version</name>
<classname>java.lang.String</classname>
<description>
- Virtual earth version, default - "6"
+ Virtual earth version, Default value is "6".
</description>
<defaultvalue>"6"</defaultvalue>
</property>
17 years, 6 months
JBoss Rich Faces SVN: r8289 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxAttributes.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-04-29 08:12:18 -0400 (Tue, 29 Apr 2008)
New Revision: 8289
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxAttributes/usage.xhtml
Log:
ajaxSingle description corrected
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxAttributes/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxAttributes/usage.xhtml 2008-04-29 12:11:23 UTC (rev 8288)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxAttributes/usage.xhtml 2008-04-29 12:12:18 UTC (rev 8289)
@@ -140,16 +140,16 @@
JSF form is submitted with the XMLHTTPRequest object. The form data contains the values
from the form input element and auxiliary information such as state saving data</p>
<p>
- When <b>ajaxSingle</b> attribute is equal true, it orders to include only a value of the
- current component (along with f:param or a4j:action param values if any) to the request
- map. In case of a4j:support, it will be a value of the parent component.
+ <b>ajaxSingle </b>- boolean attribute which provides possibility to limit JSF
+ tree processing(decoding, conversion/validation, value applying)
+ to the component which send the request only.
</p>
- <p> Note, that ajaxSingle="true" reduces the upcoming traffic, but does not
- prevent decoding other input components on the server side. Some JSF components,
- such as h:selectOneMenu do recognize the missing data in the request map value as
- a null value and try to pass the validation process with a failed result. Thus,
- use a4j:region to limit a part of the component tree that will be processed
- on the server side when it is required.
+
+ <p>
+ In other words when <b>ajaxSingle</b> attribute is equal true, it orders to
+ process only a value of the
+ current component (along with <i>f:param</i> or <i>a4j:actionparam</i> values if any).
+ In case of a4j:support, it will be a value of the parent component.
</p>
<p><b>immediate</b> attribute has the same purpose as any other non-JSF component.
The default ActionListener should be executed immediately (i.e. during the Apply Request
17 years, 6 months
JBoss Rich Faces SVN: r8288 - trunk/ui/tooltip/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-04-29 08:11:23 -0400 (Tue, 29 Apr 2008)
New Revision: 8288
Modified:
trunk/ui/tooltip/src/main/config/component/toolTip.xml
Log:
http://jira.jboss.com/jira/browse/RF-2220
Adding default values
Modified: trunk/ui/tooltip/src/main/config/component/toolTip.xml
===================================================================
--- trunk/ui/tooltip/src/main/config/component/toolTip.xml 2008-04-29 12:11:12 UTC (rev 8287)
+++ trunk/ui/tooltip/src/main/config/component/toolTip.xml 2008-04-29 12:11:23 UTC (rev 8288)
@@ -39,25 +39,25 @@
<property>
<name>layout</name>
<classname>java.lang.String</classname>
- <description>Allowed values: "inline" or "block". Block/inline mode flag. Tooltip will contain div/span elements accordingly.</description>
+ <description>Block/inline mode flag. Possible value are: "inline" or "block". Default value is "inline". Tooltip will contain div/span elements respectively.</description>
<defaultvalue><![CDATA["inline"]]></defaultvalue>
</property>
<property>
<name>showDelay</name>
<classname>int</classname>
- <description>Delay in milliseconds before tooltip will be displayed.</description>
+ <description>Delay in milliseconds before tooltip will be displayed. Default value is "0".</description>
<defaultvalue><![CDATA[0]]></defaultvalue>
</property>
<property>
<name>hideDelay</name>
<classname>int</classname>
- <description>Delay in milliseconds before tooltip will be hidden.</description>
+ <description>Delay in milliseconds before tooltip will be hidden. Default value is "0".</description>
<defaultvalue><![CDATA[0]]></defaultvalue>
</property>
<property>
<name>zorder</name>
<classname>int</classname>
- <description>The same as CSS z-index for toolTip.</description>
+ <description>The same as CSS z-index for toolTip. Default value is "99".</description>
<defaultvalue><![CDATA[99]]></defaultvalue>
</property>
<property>
@@ -103,31 +103,33 @@
<property>
<name>disabled</name>
<classname>boolean</classname>
- <description>If false the components is rendered on the client but Js for calling disabled.</description>
+ <description>If false the components is rendered on the client but JavaScript for calling disabled. Default value is "false".</description>
<defaultvalue>false</defaultvalue>
</property>
<property>
<name>direction</name>
<classname>java.lang.String</classname>
- <description>Defines direction of the popup list to appear (top-right, top-left bottom-right, bottom-left, auto(default))</description>
+ <description>Defines direction of the popup list to appear.
+ Possible values are "top-right", "top-left", "bottom-right", "bottom-left", "auto".
+ Default value is "bottom-right".</description>
<defaultvalue><![CDATA["bottom-right"]]></defaultvalue>
</property>
<property>
<name>followMouse</name>
<classname>boolean</classname>
- <description>If 'true' tooltip should follow the mouse while it moves over the parent element</description>
+ <description>If 'true' tooltip should follow the mouse while it moves over the parent element. Default value is "false".</description>
<defaultvalue>false</defaultvalue>
</property>
<property>
<name>horizontalOffset</name>
<classname>int</classname>
- <description>Sets the horizontal offset between popup list and mouse pointer</description>
+ <description>Sets the horizontal offset between pop-up list and mouse pointer. Default value is "10".</description>
<defaultvalue>10</defaultvalue>
</property>
<property>
<name>verticalOffset</name>
<classname>int</classname>
- <description>Sets the vertical offset between popup list and mouse pointer</description>
+ <description>Sets the vertical offset between pop-up list and mouse pointer. Default value is "10".</description>
<defaultvalue>10</defaultvalue>
</property>
<property>
@@ -179,8 +181,8 @@
<property exist="true" existintag="true">
<name>showEvent</name>
<classname>java.lang.String</classname>
- <description>Event that triggers the tooltip appearance (default = onmouseover)</description>
- <defaultvalue><![CDATA["mouseover"]]></defaultvalue>
+ <description>Event that triggers the tooltip. Default value is "onmouseover".</description>
+ <defaultvalue><![CDATA["onmouseover"]]></defaultvalue>
</property>
<property>
<name>hideEvent</name>
@@ -193,7 +195,7 @@
<classname>boolean</classname>
<description>
If the value of the "attached" attribute is true, a component is attached to the parent component;
- if false, component does not listen to activating browser events, but could be activated externally
+ if false, component does not listen to activating browser events, but could be activated externally. Default value is "true".
</description>
<defaultvalue>true</defaultvalue>
</property>
@@ -201,7 +203,7 @@
<property>
<name>event</name>
<classname>java.lang.String</classname>
- <description>DEPRECATED. Use showEvent instead.</description>
+ <description>DEPRECATED. Use showEvent instead. Default value is "mouseover".</description>
<defaultvalue><![CDATA["mouseover"]]></defaultvalue>
</property>
</component>
17 years, 6 months
JBoss Rich Faces SVN: r8287 - trunk/ui/tabPanel/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-04-29 08:11:12 -0400 (Tue, 29 Apr 2008)
New Revision: 8287
Modified:
trunk/ui/tabPanel/src/main/config/component/tabPanel.xml
Log:
http://jira.jboss.com/jira/browse/RF-2220
Adding default values
Modified: trunk/ui/tabPanel/src/main/config/component/tabPanel.xml
===================================================================
--- trunk/ui/tabPanel/src/main/config/component/tabPanel.xml 2008-04-29 12:11:01 UTC (rev 8286)
+++ trunk/ui/tabPanel/src/main/config/component/tabPanel.xml 2008-04-29 12:11:12 UTC (rev 8287)
@@ -223,7 +223,7 @@
<property>
<name>switchType</name>
<classname>java.lang.String</classname>
- <description>Tab switch algorithm: "client", "server", "ajax", "page"</description>
+ <description>Tab switch algorithm. Possible values are "client", "server", "ajax", "page".</description>
</property>
<property hidden="true">
<name>active</name>
@@ -241,7 +241,7 @@
<name>ontabenter</name>
<classname>java.lang.String</classname>
<description>
- Event must occurs on the tab which has been entered
+ Event must occur on the tab which has been entered
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
17 years, 6 months
JBoss Rich Faces SVN: r8286 - trunk/ui/modal-panel/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-04-29 08:11:01 -0400 (Tue, 29 Apr 2008)
New Revision: 8286
Modified:
trunk/ui/modal-panel/src/main/config/component/modalPanel.xml
Log:
http://jira.jboss.com/jira/browse/RF-2220
Adding default values
Modified: trunk/ui/modal-panel/src/main/config/component/modalPanel.xml
===================================================================
--- trunk/ui/modal-panel/src/main/config/component/modalPanel.xml 2008-04-29 12:03:04 UTC (rev 8285)
+++ trunk/ui/modal-panel/src/main/config/component/modalPanel.xml 2008-04-29 12:11:01 UTC (rev 8286)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://labs.jboss.com/jbossrichfaces/component-config.dtd
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://labs.jboss.com/jbossrichfaces/component-config.dtd
">
<components>
@@ -49,55 +49,55 @@
<property>
<name>width</name>
<classname>int</classname>
- <description> Attribute defines width of component </description>
+ <description> Attribute defines width of component. Default value is "-1". </description>
<defaultvalue>-1</defaultvalue>
</property>
<property>
<name>height</name>
<classname>int</classname>
- <description>Attribute defines height of component </description>
+ <description>Attribute defines height of component. Default value is "-1". </description>
<defaultvalue>-1</defaultvalue>
</property>
<property>
<name>minWidth</name>
<classname>int</classname>
- <description> Attribute defines min width of component </description>
+ <description> Attribute defines min width of component. Default value is "-1". </description>
<defaultvalue>-1</defaultvalue>
</property>
<property>
<name>minHeight</name>
<classname>int</classname>
- <description> Attribute defines min height of component </description>
+ <description> Attribute defines min height of component. Default value is "-1". </description>
<defaultvalue>-1</defaultvalue>
</property>
<property>
<name>left</name>
<classname>java.lang.String</classname>
- <description> Attribute defines X position of component left-top corner </description>
+ <description> Attribute defines X position of component left-top corner. Default value is "auto". </description>
<defaultvalue>"auto"</defaultvalue>
</property>
<property>
<name>top</name>
<classname>java.lang.String</classname>
- <description> Attribute defines Y position of component left-top corner </description>
+ <description> Attribute defines Y position of component left-top corner. Default value is "auto". </description>
<defaultvalue>"auto"</defaultvalue>
</property>
<property>
<name>resizeable</name>
<classname>boolean</classname>
- <description> if "true" there is possibility to change component size </description>
+ <description> if "true" there is possibility to change component size. Default value is "true".</description>
<defaultvalue>true</defaultvalue>
</property>
<property>
<name>moveable</name>
<classname>boolean</classname>
- <description> if "true" there is possibility to move component </description>
+ <description> if "true" there is possibility to move component. Default value is "true". </description>
<defaultvalue>true</defaultvalue>
</property>
<property>
<name>zindex</name>
<classname>int</classname>
- <description> Attribute is similar to the standard HTML attribute and can specify window
+ <description> Attribute is similar to the standard HTML attribute and can specify window. Default value is "100".
placement relative to the content </description>
<defaultvalue>100</defaultvalue>
</property>
@@ -164,7 +164,7 @@
<property>
<name>keepVisualState</name>
<classname>boolean</classname>
- <description> If "true" modalPanel should save state after submittion </description>
+ <description> If "true" modalPanel should save state after submission. Default value is "false". </description>
<defaultvalue>false</defaultvalue>
</property>
@@ -185,7 +185,7 @@
<property>
<name>autosized</name>
<classname>boolean</classname>
- <description> If 'true' modalPanel should be autosizeable </description>
+ <description> If "true" modalPanel should be autosizeable. Default value is "false". </description>
<defaultvalue>false</defaultvalue>
</property>
<property hidden="true" >
17 years, 6 months
JBoss Rich Faces SVN: r8285 - in trunk/ui/menu-components/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-04-29 08:03:04 -0400 (Tue, 29 Apr 2008)
New Revision: 8285
Modified:
trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererDelegate.java
trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
Log:
http://jira.jboss.com/jira/browse/RF-3289
http://jira.jboss.com/jira/browse/RF-3288
Modified: trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererDelegate.java
===================================================================
--- trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererDelegate.java 2008-04-29 12:02:23 UTC (rev 8284)
+++ trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererDelegate.java 2008-04-29 12:03:04 UTC (rev 8285)
@@ -108,9 +108,9 @@
variables.setVariable("menuGroupClass", "dr-menu-item dr-menu-item-enabled rich-menu-group " +
itemClass + " " + styleClass);
variables.setVariable("menuItemMouseMove", menuItem.getAttributes().get("onmousemove"));
- variables.setVariable("menuGroupItemIconClass", "rich-menu-item-icon-enabled");
- variables.setVariable("menuGroupItemLabelClass", "rich-menu-item-label " + labelClass);
- variables.setVariable("menuGroupItemFolderClass", "rich-menu-item-folder");
+ variables.setVariable("menuGroupItemIconClass", "rich-menu-item-icon-enabled rich-menu-group-icon ");
+ variables.setVariable("menuGroupItemLabelClass", "rich-menu-item-label rich-menu-group-label " + labelClass);
+ variables.setVariable("menuGroupItemFolderClass", "rich-menu-item-folder rich-menu-group-folder ");
variables.setVariable("onmouseoutInlineStyles", processInlineStyles(context, menuItem, false));
variables.setVariable("onmouseoverInlineStyles", processInlineStyles(context, menuItem, true));
Modified: trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
===================================================================
--- trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2008-04-29 12:02:23 UTC (rev 8284)
+++ trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2008-04-29 12:03:04 UTC (rev 8285)
@@ -1368,21 +1368,29 @@
Element.removeClassName(this.id,"dr-menu-item-enabled");
Element.addClassName(this.id,"dr-menu-item-hover");
Element.addClassName(this.id,"rich-menu-group-hover");
+ Element.addClassName(this.id,"rich-menu-item-hover");
if (this.options.selectClass) {
Element.addClassName(this.id, this.options.selectClass);
- }
+ }
Element.addClassName(this.id+":icon","rich-menu-item-icon-selected");
- Element.addClassName(this.id+":anchor","rich-menu-item-label");
- } else if (!this.mouseOver) {
- Element.removeClassName(this.id,"dr-menu-item-hover");
- Element.removeClassName(this.id,"rich-menu-group-hover");
- Element.addClassName(this.id,"dr-menu-item-enabled");
- if (this.options.selectClass) {
- Element.removeClassName(this.id, this.options.selectClass);
+ Element.addClassName(this.id+":anchor","rich-menu-item-label-selected");
+ Element.addClassName(this.id+":icon","rich-menu-group-icon-selected");
+ Element.addClassName(this.id+":anchor","rich-menu-group-label-selected");
+ } else {
+ if (!this.mouseOver) {
+ Element.removeClassName(this.id,"dr-menu-item-hover");
+ Element.removeClassName(this.id,"rich-menu-group-hover");
+ Element.removeClassName(this.id,"rich-menu-item-hover");
+ Element.addClassName(this.id,"dr-menu-item-enabled");
+ if (this.options.selectClass) {
+ Element.removeClassName(this.id, this.options.selectClass);
+ }
+ Element.removeClassName(this.id+":icon","rich-menu-item-icon-selected");
+ Element.removeClassName(this.id+":anchor","rich-menu-item-label-selected");
+ Element.removeClassName(this.id+":icon","rich-menu-group-icon-selected");
+ Element.removeClassName(this.id+":anchor","rich-menu-group-label-selected");
}
- Element.removeClassName(this.id+":icon","rich-menu-item-icon-selected");
- Element.removeClassName(this.id+":anchor","rich-menu-item-label");
}
}
17 years, 6 months
JBoss Rich Faces SVN: r8284 - in trunk/test-applications/jsp/src/main: webapp/Calendar and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2008-04-29 08:02:23 -0400 (Tue, 29 Apr 2008)
New Revision: 8284
Modified:
trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java
trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp
trunk/test-applications/jsp/src/main/webapp/Calendar/CalendarProperty.jsp
Log:
http://jira.jboss.com/jira/browse/RF-3107
Modified: trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java 2008-04-29 12:00:30 UTC (rev 8283)
+++ trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java 2008-04-29 12:02:23 UTC (rev 8284)
@@ -34,6 +34,10 @@
import org.richfaces.event.CurrentDateChangeEvent;
+/**
+ * @author AYanul
+ *
+ */
public class CalendarBean {
private static final String [] WEEK_DAY_SHORT = new String[] { "<i>Sun</i>",
@@ -88,8 +92,62 @@
private String todayControlMode; // scroll, select, hidden;
private boolean limitToList;
private String inputSize;
+ private boolean showHeader;
+ private boolean showFooter;
+ private boolean resetTimeOnDateSelect;
+ /**
+ * @return the showHeader
+ */
+ public boolean isShowHeader() {
+ return showHeader;
+ }
+
+
+ /**
+ * @param showHeader the showHeader to set
+ */
+ public void setShowHeader(boolean showHeader) {
+ this.showHeader = showHeader;
+ }
+
+
+ /**
+ * @return the showFooter
+ */
+ public boolean isShowFooter() {
+ return showFooter;
+ }
+
+
+ /**
+ * @param showFooter the showFooter to set
+ */
+ public void setShowFooter(boolean showFooter) {
+ this.showFooter = showFooter;
+ }
+
+
+ /**
+ * @return the resetTimeOnDateSelect
+ */
+ public boolean isResetTimeOnDateSelect() {
+ return resetTimeOnDateSelect;
+ }
+
+
+ /**
+ * @param resetTimeOnDateSelect the resetTimeOnDateSelect to set
+ */
+ public void setResetTimeOnDateSelect(boolean resetTimeOnDateSelect) {
+ this.resetTimeOnDateSelect = resetTimeOnDateSelect;
+ }
+
+
public CalendarBean() {
+ resetTimeOnDateSelect = false;
+ showFooter = true;
+ showHeader = true;
limitToList = false;
horizontalOffset = "0";
verticalOffset = "0";
Modified: trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp 2008-04-29 12:00:30 UTC (rev 8283)
+++ trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp 2008-04-29 12:02:23 UTC (rev 8284)
@@ -14,7 +14,9 @@
<h:outputText value="Ajax mode"
rendered="#{calendarBean.renderedAjax}" />
- <rich:calendar id="calendarClientID"
+ <rich:calendar id="calendarClientID" resetTimeOnDateSelect="#{calendarBean.resetTimeOnDateSelect}"
+ showFooter="#{calendarBean.showFooter}"
+ showHeader="#{calendarBean.showHeader}"
horizontalOffset="#{calendarBean.horizontalOffset}"
verticalOffset="#{calendarBean.verticalOffset}"
ignoreDupResponses="#{calendarBean.ignoreDupResponses}"
Modified: trunk/test-applications/jsp/src/main/webapp/Calendar/CalendarProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Calendar/CalendarProperty.jsp 2008-04-29 12:00:30 UTC (rev 8283)
+++ trunk/test-applications/jsp/src/main/webapp/Calendar/CalendarProperty.jsp 2008-04-29 12:02:23 UTC (rev 8284)
@@ -152,7 +152,16 @@
<h:outputText value="ShowInput:"></h:outputText>
<h:selectBooleanCheckbox value="#{calendarBean.showInput}" onclick="submit()">
</h:selectBooleanCheckbox>
+
+ <h:outputText value="resetTimeOnDateSelect"></h:outputText>
+ <h:selectBooleanCheckbox value="#{calendarBean.resetTimeOnDateSelect}"></h:selectBooleanCheckbox>
+ <h:outputText value="showFooter"></h:outputText>
+ <h:selectBooleanCheckbox value="#{calendarBean.showFooter}"></h:selectBooleanCheckbox>
+
+ <h:outputText value="showHeader"></h:outputText>
+ <h:selectBooleanCheckbox value="#{calendarBean.showHeader}"></h:selectBooleanCheckbox>
+
<h:outputText value="Disabled:" />
<h:selectBooleanCheckbox value="#{calendarBean.disabled}" onclick="submit()" />
17 years, 6 months
JBoss Rich Faces SVN: r8283 - in trunk/test-applications/seleniumTest/src: test/java/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-04-29 08:00:30 -0400 (Tue, 29 Apr 2008)
New Revision: 8283
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/pages/tabPanel/tabPanelTest.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TabPanelTest.java
Log:
Tab panel test refactoring
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/tabPanel/tabPanelTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/tabPanel/tabPanelTest.xhtml 2008-04-29 11:52:10 UTC (rev 8282)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/tabPanel/tabPanelTest.xhtml 2008-04-29 12:00:30 UTC (rev 8283)
@@ -6,11 +6,12 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
-<ui:composition template="../../layout/template.xhtml">
+<ui:composition template="#{templateBean.template}">
<ui:define name="style">
.link {margin: 0px 5px}
</ui:define>
<ui:define name="component">
+ <h:form id="_form">
<rich:tabPanel id="panel1" switchType="ajax" >
<rich:tab label="tab1"
id="tab1"
@@ -46,9 +47,7 @@
<h:inputText value="#{panelBean.value}" id="_value"></h:inputText>
<h:outputText value="#{panelBean.value2}" id="_value2"></h:outputText>
<br/>
+ </h:form>
</ui:define>
- <ui:define name="description">
- <ui:include src="tabPanelDescription.xhtml" />
- </ui:define>
</ui:composition>
</html>
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TabPanelTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TabPanelTest.java 2008-04-29 11:52:10 UTC (rev 8282)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TabPanelTest.java 2008-04-29 12:00:30 UTC (rev 8283)
@@ -1,128 +1,131 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces;
-
-import org.ajax4jsf.test.base.RichSeleniumTest;
-import org.ajax4jsf.test.base.SeleniumTestBase;
-import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Parameters;
-import org.testng.annotations.Test;
-
-import com.thoughtworks.selenium.SeleniumException;
-
-public class TabPanelTest extends SeleniumTestBase implements RichSeleniumTest {
-
- public TabPanelTest() {
- super("http", "localhost", "8080");
- }
-
- public TabPanelTest(String protocol, String host, String port) {
- super(protocol, host, port);
- // TODO Auto-generated constructor stub
- }
-
- /**
- * This method are invoking before selenium tests started
- */
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
- }
-
- /**
- * This method are invoking after selenium tests completed
- */
- @AfterTest
- public void stopSelenium() {
- super.stopSelenium();
- }
-
- @Test
- public void testTabPanelComponent() throws Exception {
- renderPage("/faces/pages/tabPanel/tabPanelTest.xhtml");
-
-// _testRichTabPanelComponent(COMPONENT_PREFIX_SIMPLE);
-// _testRichTabPanelComponent(COMPONENT_PREFIX_INSIDE_TABLE);
- }
-
- private void _testRichTabPanelComponent(String parentId) {
- String linkId = parentId + "tab2_lbl";
- String tabId1 = parentId + "tab1";
- String tabId2 = parentId + "tab2";
- String tabId4 = parentId + "tab4";
- String inputId = parentId + "_value";
- String outputId = parentId + "_value2";
-
- clickById(linkId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "tab2");
- AssertTextEquals(outputId, "2");
- Assert.assertTrue(isVisibleById(tabId2));
- Assert.assertFalse(isVisibleById(tabId4));
- try {
- getTextById(tabId1);
- Assert.fail("Both of 'tab1' and 'tab2' tabs were rendered for tab panel.");
- } catch (SeleniumException se) {
-
- }
-
-
- linkId = parentId + "tab1_lbl";
- clickById(linkId);
- waitForPageToLoad();
- AssertValueEquals(inputId, "tab1");
- AssertTextEquals(outputId, "1");
- Assert.assertTrue(isVisibleById(tabId1));
- Assert.assertFalse(isVisibleById(tabId4));
- try {
- getTextById(tabId2);
- Assert.fail("Both of 'tab1' and 'tab2' tabs were rendered for tab panel.");
- } catch (SeleniumException se) {
-
- }
-
- linkId = parentId + "tab3_lbl";
- clickById(linkId);
- AssertValueEquals(inputId, "tab1");
- Assert.assertTrue(isVisibleById(tabId1));
-
- linkId = parentId + "tab4_lbl";
- clickById(linkId);
- Assert.assertTrue(isVisibleById(tabId4));
- Assert.assertFalse(isVisibleById(tabId1));
- try {
- getTextById(tabId2);
- Assert.fail("Both of 'tab1' and 'tab2' tabs were rendered for tab panel.");
- } catch (SeleniumException se) {
-
- }
- }
-
- public String getTestUrl() {
- return null;
- }
-
-
-}
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces;
+
+import org.ajax4jsf.test.base.RichSeleniumTest;
+import org.ajax4jsf.test.base.SeleniumTestBase;
+import org.ajax4jsf.test.base.Templates;
+import org.testng.Assert;
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+import com.thoughtworks.selenium.SeleniumException;
+
+public class TabPanelTest extends SeleniumTestBase implements RichSeleniumTest {
+
+ public TabPanelTest() {
+ super("http", "localhost", "8080");
+ }
+
+ public TabPanelTest(String protocol, String host, String port) {
+ super(protocol, host, port);
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * This method are invoking before selenium tests started
+ */
+ @BeforeTest
+ @Parameters( { "browser" })
+ public void startSelenium(String browser) {
+ super.startSelenium(browser);
+ }
+
+ /**
+ * This method are invoking after selenium tests completed
+ */
+ @AfterTest
+ public void stopSelenium() {
+ super.stopSelenium();
+ }
+
+ @Test
+ public void testTabPanelComponent() throws Exception {
+ _testRichTabPanelComponent(Templates.SIMPLE);
+ _testRichTabPanelComponent(Templates.DATATABLE);
+ }
+
+ private void _testRichTabPanelComponent(Templates template) {
+ renderPage(getTestUrl(), template);
+ String parentId = getParentId() + "_form:";
+ String linkId = parentId + "tab2_lbl";
+ String tabId1 = parentId + "tab1";
+ String tabId2 = parentId + "tab2";
+ String tabId4 = parentId + "tab4";
+ String inputId = parentId + "_value";
+ String outputId = parentId + "_value2";
+
+ writeStatus("Click on tab1");
+ clickById(linkId);
+ waitForAjaxCompletion();
+ AssertValueEquals(inputId, "tab2");
+ AssertTextEquals(outputId, "2");
+ Assert.assertTrue(isVisibleById(tabId2));
+ Assert.assertFalse(isVisibleById(tabId4));
+ try {
+ getTextById(tabId1);
+ Assert.fail("Both of 'tab1' and 'tab2' tabs were rendered for tab panel.");
+ } catch (SeleniumException se) {
+
+ }
+
+ writeStatus("Click on tab2");
+ linkId = parentId + "tab1_lbl";
+ clickCommandAndWait(linkId);
+ AssertValueEquals(inputId, "tab1");
+ AssertTextEquals(outputId, "1");
+ Assert.assertTrue(isVisibleById(tabId1));
+ Assert.assertFalse(isVisibleById(tabId4));
+ try {
+ getTextById(tabId2);
+ Assert.fail("Both of 'tab1' and 'tab2' tabs were rendered for tab panel.");
+ } catch (SeleniumException se) {
+
+ }
+
+ writeStatus("Click on tab3");
+ linkId = parentId + "tab3_lbl";
+ clickById(linkId);
+ AssertValueEquals(inputId, "tab1");
+ Assert.assertTrue(isVisibleById(tabId1));
+
+ writeStatus("Click on tab4");
+ linkId = parentId + "tab4_lbl";
+ clickById(linkId);
+ Assert.assertTrue(isVisibleById(tabId4));
+ Assert.assertFalse(isVisibleById(tabId1));
+ try {
+ getTextById(tabId2);
+ Assert.fail("Both of 'tab1' and 'tab2' tabs were rendered for tab panel.");
+ } catch (SeleniumException se) {
+
+ }
+ }
+
+ public String getTestUrl() {
+ return "/faces/pages/tabPanel/tabPanelTest.xhtml";
+ }
+
+
+}
17 years, 6 months