JBoss Rich Faces SVN: r12663 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2009-02-13 12:05:16 -0500 (Fri, 13 Feb 2009)
New Revision: 12663
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataFilterSliderTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5985
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataFilterSliderTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataFilterSliderTest.java 2009-02-13 16:34:57 UTC (rev 12662)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataFilterSliderTest.java 2009-02-13 17:05:16 UTC (rev 12663)
@@ -147,6 +147,31 @@
}
@Test
+ public void testStartEndRangeAttributes(Template template) {
+ renderPage(template, RESET_METHOD);
+
+ String parentId = getParentId() + FORM_ID;
+ String tableId = parentId + TABLE;
+ String inputId = parentId + DATA_FLT_SLIDER_INPUT;
+ String submittedValueId = parentId + "submittedValue";
+
+ writeStatus("Check 'startRange' and 'endRange' attributes.");
+
+ writeStatus("disposition: startRange [0] endRange[40]");
+ writeStatus("Any value is out of this range will be adjusted by component: < 0 -> 0 and > 40 -> 40. Check it!");
+
+ selenium.type(inputId, "45");
+ waitForAjaxCompletion();
+ AssertTextEquals(submittedValueId, "40");
+ assertRowsCount(PLANETS_ALL, tableId);
+
+ selenium.type(inputId, "-5");
+ waitForAjaxCompletion();
+ AssertTextEquals(submittedValueId, "0");
+ assertRowsCount(PLANETS_SMALLER_0, tableId);
+ }
+
+ @Test
public void testRenderedAttribute(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
15 years, 11 months
JBoss Rich Faces SVN: r12662 - trunk/test-applications/realworld.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-02-13 11:34:57 -0500 (Fri, 13 Feb 2009)
New Revision: 12662
Added:
trunk/test-applications/realworld/realworld.EAP
trunk/test-applications/realworld/realworld.ldb
Log:
Added: trunk/test-applications/realworld/realworld.EAP
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/realworld.EAP
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/test-applications/realworld/realworld.ldb
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/realworld.ldb
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
15 years, 11 months
JBoss Rich Faces SVN: r12661 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/dataFilterSlider and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2009-02-13 11:24:31 -0500 (Fri, 13 Feb 2009)
New Revision: 12661
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataFilterSliderBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataFilterSlider/dataFilterSliderAutoTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataFilterSlider/dataFilterSliderTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataFilterSliderTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5978
https://jira.jboss.org/jira/browse/RF-5987
https://jira.jboss.org/jira/browse/RF-5988
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataFilterSliderBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataFilterSliderBean.java 2009-02-13 15:49:36 UTC (rev 12660)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataFilterSliderBean.java 2009-02-13 16:24:31 UTC (rev 12661)
@@ -23,7 +23,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.richfaces.component.UIDataFltrSlider;
import org.richfaces.event.DataFilterSliderEvent;
public class DataFilterSliderBean {
@@ -47,12 +46,18 @@
}
}
- private UIDataFltrSlider slider;
-
private List<Planet> planets;
private String eventSnapshot = "";
+ private Integer startRange = 0;
+
+ private Integer endRange = 40;
+
+ private Integer increment = 1;
+
+ private Integer handleValue = 20;
+
public DataFilterSliderBean() {
planets = new ArrayList<Planet>();
planets.add(new Planet("Sun", 27.94));
@@ -72,14 +77,6 @@
return planets;
}
- public UIDataFltrSlider getSlider() {
- return slider;
- }
-
- public void setSlider(UIDataFltrSlider slider) {
- this.slider = slider;
- }
-
public void doSlide(DataFilterSliderEvent event) {
Integer oldSliderVal = event.getOldSliderVal();
Integer newSliderVal = event.getNewSliderVal();
@@ -90,17 +87,83 @@
return eventSnapshot;
}
- public Integer getSubmittedValue() {
- Integer retVal = null;
- if (slider != null) {
- retVal = (Integer) slider.getHandleValue();
- }
+ /**
+ * Gets value of handleValue field.
+ * @return value of handleValue field
+ */
+ public Integer getHandleValue() {
+ return handleValue;
+ }
- return retVal;
+ /**
+ * Set a new value for handleValue field.
+ * @param handleValue a new value for handleValue field
+ */
+ public void setHandleValue(Integer handleValue) {
+ this.handleValue = handleValue;
}
+ /**
+ * Gets value of startRange field.
+ * @return value of startRange field
+ */
+ public Integer getStartRange() {
+ return startRange;
+ }
+
+ /**
+ * Set a new value for startRange field.
+ * @param startRange a new value for startRange field
+ */
+ public void setStartRange(Integer startRange) {
+ this.startRange = startRange;
+ }
+
+ /**
+ * Gets value of endRange field.
+ * @return value of endRange field
+ */
+ public Integer getEndRange() {
+ return endRange;
+ }
+
+ /**
+ * Set a new value for endRange field.
+ * @param endRange a new value for endRange field
+ */
+ public void setEndRange(Integer endRange) {
+ this.endRange = endRange;
+ }
+
+ /**
+ * Gets value of increment field.
+ * @return value of increment field
+ */
+ public Integer getIncrement() {
+ return increment;
+ }
+
+ /**
+ * Set a new value for increment field.
+ * @param increment a new value for increment field
+ */
+ public void setIncrement(Integer increment) {
+ this.increment = increment;
+ }
+
+ public String action() {
+ return null;
+ }
+
+ public void initIncrementTest() {
+ reset();
+ increment = 5;
+ }
+
public String reset() {
eventSnapshot = "";
+ handleValue = 20;
+ increment = 1;
return null;
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataFilterSlider/dataFilterSliderAutoTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataFilterSlider/dataFilterSliderTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataFilterSliderTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataFilterSliderTest.java 2009-02-13 15:49:36 UTC (rev 12660)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataFilterSliderTest.java 2009-02-13 16:24:31 UTC (rev 12661)
@@ -23,6 +23,7 @@
import org.ajax4jsf.template.Template;
import org.richfaces.AutoTester;
import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
import org.testng.annotations.Test;
public class DataFilterSliderTest extends SeleniumTestBase {
@@ -43,16 +44,21 @@
private static final int PLANETS_SMALLER_1 = 6;
+ private static final int PLANETS_SMALLER_0 = 0;
+
private static final String RESET_METHOD = "#{dataFilterSliderBean.reset}";
+ private static final String INIT_INCREMENT_TEST = "#{dataFilterSliderBean.initIncrementTest}";
+
private static final String FORM_ID = "autoTestForm:";
@Test
public void testDataFilterSliderComponent(Template template) {
- renderPage(template);
+ renderPage(template, RESET_METHOD);
String parentId = getParentId() + FORM_ID;
String tableId = parentId + TABLE;
+ String submittedValueId = parentId + "submittedValue";
writeStatus("Check component core functionality");
@@ -63,20 +69,23 @@
writeStatus("Set 1g! Only 6 planets have to meet this condition");
clickSlider(1);
assertRowsCount(PLANETS_SMALLER_1, tableId);
-
+ AssertTextEquals(submittedValueId, "1");
+ checkDataFilterSliderEventFired(20, 1);
+
writeStatus("Set 2g! Only 9 planets have to meet this condition");
clickSlider(2);
assertRowsCount(PLANETS_SMALLER_2, tableId);
+ checkDataFilterSliderEventFired(1, 2);
writeStatus("Set 5g! Only 10 planets have to meet this condition");
clickSlider(5);
assertRowsCount(PLANETS_SMALLER_3, tableId);
-
+ checkDataFilterSliderEventFired(2, 5);
}
@Test
public void testDataFilterSliderComponentManualInput(Template template) {
- renderPage(template);
+ renderPage(template, RESET_METHOD);
String parentId = getParentId() + FORM_ID;
String tableId = parentId + TABLE;
@@ -105,6 +114,39 @@
}
@Test
+ public void testIncrementAttribute(Template template) {
+ renderPage(template, INIT_INCREMENT_TEST);
+
+ String parentId = getParentId() + FORM_ID;
+ String tableId = parentId + TABLE;
+ String inputId = parentId + DATA_FLT_SLIDER_INPUT;
+ String submittedValueId = parentId + "submittedValue";
+
+ writeStatus("Check increment attribute");
+
+ writeStatus("Increment set to 5 therefore only multiple of 5 accepted.");
+ writeStatus("Any other will be adjusted by component to the nearest value (7 to 5, 13 to 15 and so on) Check it!");
+
+ selenium.type(inputId, "7");
+ waitForAjaxCompletion();
+ AssertTextEquals(submittedValueId, "5");
+ assertRowsCount(PLANETS_SMALLER_3, tableId);
+
+ selenium.type(inputId, "13");
+ waitForAjaxCompletion();
+ AssertTextEquals(submittedValueId, "15");
+ assertRowsCount(PLANETS_SMALLER_3, tableId);
+
+ clickSlider(2);
+ AssertTextEquals(submittedValueId, "0");
+ assertRowsCount(PLANETS_SMALLER_0, tableId);
+
+ clickSlider(18);
+ AssertTextEquals(submittedValueId, "20");
+ assertRowsCount(PLANETS_SMALLER_3, tableId);
+ }
+
+ @Test
public void testRenderedAttribute(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
@@ -180,13 +222,19 @@
String trackId = getParentId() + FORM_ID + DATA_FLT_SLIDER_TRACK;
int w = selenium.getElementWidth(trackId).intValue();
double step = w / 40.;
- int pos = (int) (position * step + 1 + (isFF() ? step : 0));
+ int pos = (int) ((position + 1) * step);
selenium.mouseDownAt(trackId, pos + ",0");
selenium.mouseUpAt(trackId, pos + ",0");
waitForAjaxCompletion();
delay(500);
}
+ private void checkDataFilterSliderEventFired(int oldValue, int newValue) {
+ String eventSnapshotExpected = "DataFilterSliderEvent[" + oldValue + "," + newValue + "]";
+ String eventSnapshotActual = selenium.getText(getParentId() + FORM_ID + "eventSnapshot");
+ Assert.assertTrue((null != eventSnapshotActual) && eventSnapshotActual.equals(eventSnapshotExpected), eventSnapshotExpected + " is expected!");
+ }
+
@Override
public void sendAjax() {
clickSlider(3);
15 years, 11 months
JBoss Rich Faces SVN: r12660 - trunk/ui/pickList/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-02-13 10:49:36 -0500 (Fri, 13 Feb 2009)
New Revision: 12660
Modified:
trunk/ui/pickList/src/main/config/component/picklist.xml
Log:
https://jira.jboss.org/jira/browse/RF-6059 Attributes for pickList are checked, descriptions are corrected.
there are no topTitle, bottomTitle, firstTitle and lastTitle attributes for pickList in the table of attributes
Modified: trunk/ui/pickList/src/main/config/component/picklist.xml
===================================================================
--- trunk/ui/pickList/src/main/config/component/picklist.xml 2009-02-13 15:39:12 UTC (rev 12659)
+++ trunk/ui/pickList/src/main/config/component/picklist.xml 2009-02-13 15:49:36 UTC (rev 12660)
@@ -45,53 +45,53 @@
<property>
<name>copyAllControlLabel</name>
<classname>java.lang.String</classname>
- <description>Defines a label for a copyAll control</description>
+ <description>Defines a label for a "Copy all" control</description>
<defaultvalue>""</defaultvalue>
</property>
<property>
<name>copyControlLabel</name>
<classname>java.lang.String</classname>
- <description>Defines a label for a copy control</description>
+ <description>Defines a label for a "Copy" control</description>
<defaultvalue>""</defaultvalue>
</property>
<property>
<name>removeControlLabel</name>
<classname>java.lang.String</classname>
- <description>Defines a label for a remove control</description>
+ <description>Defines a label for a "Remove" control</description>
<defaultvalue>""</defaultvalue>
</property>
<property>
<name>removeAllControlLabel</name>
<classname>java.lang.String</classname>
- <description>Defines a label for a removeAll control</description>
+ <description>Defines a label for a "Remove all" control</description>
<defaultvalue>""</defaultvalue>
</property>
<property>
<name>copyAllTitle </name>
<classname>java.lang.String</classname>
- <description>HTML: alt for Copy All button</description>
+ <description>HTML: alt for a "Copy all" button</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>copyTitle </name>
<classname>java.lang.String</classname>
- <description>HTML: alt for copy button</description>
+ <description>HTML: alt for a "Copy" button</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>removeTitle </name>
<classname>java.lang.String</classname>
- <description>HTML: alt for remove button</description>
+ <description>HTML: alt for a "Remove" button</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>removeAllTitle </name>
<classname>java.lang.String</classname>
- <description>HTML: alt for remove all button</description>
+ <description>HTML: alt for a "Remove" all button</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
15 years, 11 months
JBoss Rich Faces SVN: r12659 - in trunk/docs/userguide/en/src/main: resources/images and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2009-02-13 10:39:12 -0500 (Fri, 13 Feb 2009)
New Revision: 12659
Added:
trunk/docs/userguide/en/src/main/resources/images/treeModel.png
Modified:
trunk/docs/userguide/en/src/main/docbook/included/tree.xml
trunk/docs/userguide/en/src/main/resources/images/treeXML.png
Log:
https://jira.jboss.org/jira/browse/RF-5083 - The component section was updated according to info from Forum
Modified: trunk/docs/userguide/en/src/main/docbook/included/tree.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2009-02-13 15:28:05 UTC (rev 12658)
+++ trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2009-02-13 15:39:12 UTC (rev 12659)
@@ -115,7 +115,7 @@
(<ulink url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone...">
org.richfaces.model.TreeNodeImpl
</ulink>).
- </para>
+ </para>
<para>
The <emphasis><property>"value"</property></emphasis> attribute
of the <emphasis role="bold"><property><rich:tree></property></emphasis> component
@@ -128,7 +128,51 @@
Data property of the current model <code>TreeNode</code> is exposed using
<emphasis><property>"var"</property></emphasis> attribute,
so if <code>var="itemData"</code> you can refer to that data using <code>#{itemData}</code> syntax.
- </para>
+ </para>
+ <para>
+ In the following example the <emphasis role="bold"><property><rich:tree></property></emphasis> is
+ built from a simple <code>org.richfaces.model.TreeNode</code> model:
+ </para>
+ <programlisting role="JAVA"><![CDATA[...
+private TreeNodeImpl<String> stationRoot = new TreeNodeImpl<String>();
+private TreeNodeImpl<String> stationNodes = new TreeNodeImpl<String>();
+private String[] kickRadioFeed = { "Hall & Oates - Kiss On My List",
+ "David Bowie - Let's Dance", "Lyn Collins - Think (About It)",
+ "Kim Carnes - Bette Davis Eyes",
+ "KC & the Sunshine Band - Give It Up" };
+ ...
+stationRoot.setData("KickRadio");
+stationNodes.addChild(0, stationRoot);
+for (int i = 0; i < kickRadioFeed.length; i++){
+ TreeNodeImpl<String> child = new TreeNodeImpl<String>();
+ child.setData(kickRadioFeed[i]);
+ stationRoot.addChild(i, child);
+}
+...]]></programlisting>
+<para>
+As it is mentioned before you need to pass <code>#{stations.stationNodes}</code> property to the
+<emphasis><property>"value"</property></emphasis> attribute
+and define the <emphasis><property>"var"</property></emphasis> attribute in order to refer to the data:
+</para>
+<programlisting role="XML"><![CDATA[...
+<rich:tree value="#{stations.stationNodes}" var="station">
+ <rich:treeNode>
+ <h:outputText value="#{station}" />
+ </rich:treeNode>
+</rich:tree>
+...]]></programlisting>
+<para>
+ This is a result:
+</para>
+<figure>
+ <title>A simple <emphasis role="bold"><property><rich:tree></property></emphasis> from a <code>org.richfaces.model.TreeNode</code></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/treeModel.png"/>
+ </imageobject>
+ </mediaobject>
+</figure>
+
<para>There is a <code>"XmlTreeDataBuilder"</code> class
(<ulink url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone...">
org.richfaces.component.xml.XmlTreeDataBuilder
Added: trunk/docs/userguide/en/src/main/resources/images/treeModel.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/treeModel.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/docs/userguide/en/src/main/resources/images/treeXML.png
===================================================================
(Binary files differ)
15 years, 11 months
JBoss Rich Faces SVN: r12658 - trunk/ui/listShuttle/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-02-13 10:28:05 -0500 (Fri, 13 Feb 2009)
New Revision: 12658
Modified:
trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
Log:
https://jira.jboss.org/jira/browse/RF-6059 Attributes for listShuttle are added, incorrect symbols in xml is fixed, descriptions are corrected.
Modified: trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
===================================================================
--- trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2009-02-13 15:01:27 UTC (rev 12657)
+++ trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2009-02-13 15:28:05 UTC (rev 12658)
@@ -226,13 +226,13 @@
<property>
<name>topTitle </name>
<classname>java.lang.String</classname>
- <description>HTML: alt for first button</description>
+ <description>HTML: alt for the first button</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>bottomTitle </name>
<classname>java.lang.String</classname>
- <description>HTML: alt for last button</description>
+ <description>HTML: alt for the last button</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
@@ -240,53 +240,53 @@
<name>copyAllControlLabel</name>
<classname>java.lang.String</classname>
<description>
- Defines a label for a copyAll control
+ Defines a label for a "Copy all" control
</description>
</property>
<property>
<name>copyControlLabel</name>
<classname>java.lang.String</classname>
<description>
- Defines a label for a copy control
+ Defines a label for a "Copy" control
</description>
</property>
<property>
<name>removeControlLabel</name>
<classname>java.lang.String</classname>
<description>
- Defines a label for a remove control
+ Defines a label for a "Remove" control
</description>
</property>
<property>
<name>removeAllControlLabel</name>
<classname>java.lang.String</classname>
<description>
- Defines a label for a removeAll control
+ Defines a label for a "Remove all" control
</description>
</property>
<property>
<name>copyAllTitle </name>
<classname>java.lang.String</classname>
- <description>HTML: alt for Copy All button</description>
+ <description>HTML: alt for "Copy all" button</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>copyTitle </name>
<classname>java.lang.String</classname>
- <description>HTML: alt for copy button</description>
+ <description>HTML: alt for a "Copy" button</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>removeTitle </name>
<classname>java.lang.String</classname>
- <description>HTML: alt for remove button</description>
+ <description>HTML: alt for a "Remove" button</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>removeAllTitle </name>
<classname>java.lang.String</classname>
- <description>HTML: alt for remove all button</description>
+ <description>HTML: alt for "Remove all" button</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
@@ -510,7 +510,7 @@
<property>
<name>controlsVerticalAlign</name>
<classname>java.lang.String</classname>
- <description>Customizes�vertically�a�position�of�move/copy�and order controls�relatively�to�lists. Default value is "middle"</description>
+ <description>Customizes vertically a position of move/copy and order controls relatively to lists. Default value is "middle"</description>
<defaultvalue><![CDATA["middle"]]></defaultvalue>
</property>
<property>
@@ -528,49 +528,49 @@
<property>
<name>topControlClass</name>
<classname>java.lang.String</classname>
- <description>CSS class for top control</description>
+ <description>CSS class for a "Top" control</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>bottomControlClass</name>
<classname>java.lang.String</classname>
- <description>CSS class for bottom control</description>
+ <description>CSS class for a "Bottom" control</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>upControlClass</name>
<classname>java.lang.String</classname>
- <description>CSS class for up control</description>
+ <description>CSS class for an "Up" control</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>downControlClass</name>
<classname>java.lang.String</classname>
- <description>CSS class for down control</description>
+ <description>CSS class for a "Down" control</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>copyAllControlClass</name>
<classname>java.lang.String</classname>
- <description>CSS class�for�copy all�control</description>
+ <description>CSS class for a "Copy all" control</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>removeAllControlClass</name>
<classname>java.lang.String</classname>
- <description>CSS�class�for�remove all control</description>
+ <description>CSS class for "Remove all" control</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>copyControlClass</name>
<classname>java.lang.String</classname>
- <description>CSS class for copy control</description>
+ <description>CSS class for "Copy" control</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>removeControlClass</name>
<classname>java.lang.String</classname>
- <description>CSS class for remove control</description>
+ <description>CSS class for a "Remove" control</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
15 years, 11 months
JBoss Rich Faces SVN: r12657 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/comboBox and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-02-13 10:01:27 -0500 (Fri, 13 Feb 2009)
New Revision: 12657
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ComboBoxTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/comboBox/comboBoxTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java
Log:
RF-6067
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ComboBoxTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ComboBoxTestBean.java 2009-02-13 14:18:07 UTC (rev 12656)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ComboBoxTestBean.java 2009-02-13 15:01:27 UTC (rev 12657)
@@ -27,12 +27,13 @@
import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
import javax.faces.event.ValueChangeEvent;
import javax.faces.model.SelectItem;
import javax.faces.validator.Validator;
import javax.faces.validator.ValidatorException;
-public class ComboBoxTestBean implements Validator{
+public class ComboBoxTestBean implements Validator, Converter{
private String value;
private String trace;
@@ -102,4 +103,14 @@
throw new ValidatorException(new FacesMessage("Value mustn't be equal 44."));
}
}
+
+ public Object getAsObject(FacesContext context, UIComponent component,
+ String value) {
+ return value != null ? value.substring(2): null;
+ }
+
+ public String getAsString(FacesContext context, UIComponent component,
+ Object value) {
+ return value != null ? "c:" + value.toString(): null;
+ }
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/comboBox/comboBoxTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java 2009-02-13 14:18:07 UTC (rev 12656)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ComboBoxTest.java 2009-02-13 15:01:27 UTC (rev 12657)
@@ -197,6 +197,16 @@
autoTester.testRequiredAndRequiredMessageAttributes();
}
+ /**
+ * Check "converter" attribute
+ */
+ @Test
+ public void testConverter(Template template) {
+ init(template);
+ selenium.click(comboboxButton);
+ Assert.assertEquals(selenium.getText("xpath=id('" + list + "')/span[3]"), "c:33");
+ }
+
@Override
public void setValueEmpty() {
selenium.type(getParentId() + "autoTestForm:componentIdcomboboxValue", "");
15 years, 11 months
JBoss Rich Faces SVN: r12656 - trunk/framework/impl/src/main/javascript/prototype.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2009-02-13 09:18:07 -0500 (Fri, 13 Feb 2009)
New Revision: 12656
Modified:
trunk/framework/impl/src/main/javascript/prototype/prototype-1.6.0.3.js
Log:
https://jira.jboss.org/jira/browse/RF-5225
Modified: trunk/framework/impl/src/main/javascript/prototype/prototype-1.6.0.3.js
===================================================================
--- trunk/framework/impl/src/main/javascript/prototype/prototype-1.6.0.3.js 2009-02-13 14:17:51 UTC (rev 12655)
+++ trunk/framework/impl/src/main/javascript/prototype/prototype-1.6.0.3.js 2009-02-13 14:18:07 UTC (rev 12656)
@@ -3908,8 +3908,8 @@
if (Prototype.Browser.IE) {
Object.extend(methods, {
- stopPropagation: function() { this.cancelBubble = true },
- preventDefault: function() { this.returnValue = false },
+ stopPropagation: function() { this.cancelBubble = true; if (this._stopPropagation) { this._stopPropagation() } }, //RF: changed by Nick
+ preventDefault: function() { this.returnValue = false; if (this._preventDefault) { this._preventDefault() } }, //RF: changed by Nick
inspect: function() { return "[object Event]" }
});
@@ -3925,6 +3925,10 @@
pageX: pointer.x,
pageY: pointer.y
});
+
+ event._stopPropagation = event.stopPropagation; //RF: added by Nick
+ event._preventDefault = event.preventDefault; //RF: added by Nick
+
return Object.extend(event, methods);
};
15 years, 11 months
JBoss Rich Faces SVN: r12655 - in trunk/ui: contextMenu/src/main/resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2009-02-13 09:17:51 -0500 (Fri, 13 Feb 2009)
New Revision: 12655
Modified:
trunk/ui/componentControl/src/main/resources/org/richfaces/renderkit/html/script/controlUtils.js
trunk/ui/contextMenu/src/main/resources/org/richfaces/renderkit/html/scripts/context-menu.js
Log:
https://jira.jboss.org/jira/browse/RF-5225
Modified: trunk/ui/componentControl/src/main/resources/org/richfaces/renderkit/html/script/controlUtils.js
===================================================================
--- trunk/ui/componentControl/src/main/resources/org/richfaces/renderkit/html/script/controlUtils.js 2009-02-13 13:42:30 UTC (rev 12654)
+++ trunk/ui/componentControl/src/main/resources/org/richfaces/renderkit/html/script/controlUtils.js 2009-02-13 14:17:51 UTC (rev 12655)
@@ -40,6 +40,14 @@
};
Richfaces.componentControl.performOperation = function( cevent, forAttr, operation, params, disableDefault) {
+
+ // stop event before event isn't extended by prototype
+ if (disableDefault) {
+ var event = jQuery.event.fix(cevent);
+ event.stopPropagation();
+ event.preventDefault();
+ }
+
Richfaces.componentControl.eachComponent(forAttr, function(component) {
var paramsValue = params;
if (typeof params == "function") {
@@ -48,9 +56,6 @@
component[operation](cevent, paramsValue);
});
- if (disableDefault) {
- Event.stop(cevent);
- }
};
Modified: trunk/ui/contextMenu/src/main/resources/org/richfaces/renderkit/html/scripts/context-menu.js
===================================================================
--- trunk/ui/contextMenu/src/main/resources/org/richfaces/renderkit/html/scripts/context-menu.js 2009-02-13 13:42:30 UTC (rev 12654)
+++ trunk/ui/contextMenu/src/main/resources/org/richfaces/renderkit/html/scripts/context-menu.js 2009-02-13 14:17:51 UTC (rev 12655)
@@ -17,15 +17,42 @@
},
destroy: function() {
+ this.enableDefaultContextMenu();
this.element.component = null;
this.element = null;
this.menuContent = null;
},
+ disableDefaultContextMenu: function (element, id, event, attachedToPerent)
+ {
+ if (event=="oncontextmenu") {
+ this.attachedToElementId = id;
+ this.attachedToParent = attachedToPerent;
+ this.eventName = "contextmenu";
+
+ Event.observe(element, this.eventName, Event.stop);
+ }
+ },
+
+ enableDefaultContextMenu: function ()
+ {
+ if (this.eventName=="contextmenu" && this.attachedToElementId) {
+ var element = $(this.attachedToElementId);
+ if (!element && this.attachedToParent) {
+ element = this.element;
+ if (element) {
+ element = element.parentNode;
+ }
+ }
+ Event.stopObserving(element, this.eventName, Event.stop);
+ }
+ },
+
// attach contextMenu to element specified by id
attachToElementById : function(id, event, context) {
var element = $(id);
+ this.disableDefaultContextMenu(element, id, event, false);
this.attachToElement(element, event, context);
},
@@ -39,7 +66,7 @@
element = element.parentNode;
}
}
-
+ disableDefaultContextMenu(element, id, event, true);
this.attachToElement(element, event, context);
},
15 years, 11 months
JBoss Rich Faces SVN: r12654 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/layout and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2009-02-13 08:42:30 -0500 (Fri, 13 Feb 2009)
New Revision: 12654
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/autotest/bean/AutoTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestControls.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestNavigationPage.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/layout.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxCommandLink/testListenerAndNavigation.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java
Log:
RF-6049, RF-6048, RF-6044, RF-6045
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/autotest/bean/AutoTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/autotest/bean/AutoTestBean.java 2009-02-13 13:33:28 UTC (rev 12653)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/autotest/bean/AutoTestBean.java 2009-02-13 13:42:30 UTC (rev 12654)
@@ -107,6 +107,8 @@
private String processInput;
private boolean processSet = false;
+
+ private boolean processExternalValidationSet = false;
private boolean required;
@@ -510,7 +512,7 @@
}
public String getProcess() {
- return (processSet) ? "_auto_process_input" : "_auto_input";
+ return (processSet) ? "_auto_process_input" : (processExternalValidationSet) ? "_auto_input" : null;
}
/**
@@ -529,4 +531,14 @@
this.required = required;
}
+ public boolean isProcessExternalValidationSet() {
+ return processExternalValidationSet;
+ }
+
+ public void setProcessExternalValidationSet(boolean processExternalValidationSet) {
+ this.processExternalValidationSet = processExternalValidationSet;
+ }
+
+
+
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestControls.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestControls.xhtml 2009-02-13 13:33:28 UTC (rev 12653)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestControls.xhtml 2009-02-13 13:42:30 UTC (rev 12654)
@@ -67,6 +67,12 @@
</td>
</tr>
<tr>
+ <td>Process ext valid. fail:</td>
+ <td>
+ <h:selectBooleanCheckbox id="_auto_processExtValid" value="#{autoTestBean.processExternalValidationSet}"></h:selectBooleanCheckbox>
+ </td>
+ </tr>
+ <tr>
<td>Required:</td>
<td>
<h:selectBooleanCheckbox id="_auto_required" value="#{autoTestBean.required}"></h:selectBooleanCheckbox>
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestNavigationPage.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestNavigationPage.xhtml 2009-02-13 13:33:28 UTC (rev 12653)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestNavigationPage.xhtml 2009-02-13 13:42:30 UTC (rev 12654)
@@ -7,8 +7,10 @@
<ui:composition template="#{templateBean.autoTestTemplate}">
<ui:define name="component">
<p id="_auto_test_navigation">Navigation successfully</p>
+ </ui:define>
+ <ui:define name="footer">
<script>
- window.done=true;
+ window.done = true;
</script>
</ui:define>
</ui:composition>
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/layout.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxCommandLink/testListenerAndNavigation.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxCommandLink/testListenerAndNavigation.xhtml 2009-02-13 13:33:28 UTC (rev 12653)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxCommandLink/testListenerAndNavigation.xhtml 2009-02-13 13:42:30 UTC (rev 12654)
@@ -13,6 +13,8 @@
actionListener="#{autoTestBean.actionListener}"
immediate="#{autoTestBean.immediate}"
ajaxSingle="#{autoTestBean.ajaxSingle}"
+ process="#{autoTestBean.process}"
+ reRender="#{autoTestBean.reRender}"
value="Link"
>
<f:actionListener type="org.ajax4jsf.autotest.bean.AutoTestListener" />
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2009-02-13 13:33:28 UTC (rev 12653)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2009-02-13 13:42:30 UTC (rev 12654)
@@ -73,15 +73,6 @@
this.base = base;
}
- public void navigate() {
- base.navigate();
- base.waiteForCondition("document.getElementById('_auto_test_navigation') != null", 10000);
-
- if (!"Navigation successfully".equals(base.getTextById("_auto_test_navigation"))) {
- Assert.fail("Navigation has not been occurred");
- }
- }
-
public void renderPage(Template template, String resetMethodName) {
base.renderAutoTestPage(template, resetMethodName);
}
@@ -138,9 +129,10 @@
reset();
clickLoad();
- navigate();
+ base.sendAjax();
checkAction(true);
+ checkNavigation(true);
}
public void testExtrenalValidationFailure() {
@@ -170,6 +162,7 @@
public void testAjaxSingleWithProcesExternalValidation(boolean checkListener) {
reset();
setupControl(TestSetupEntry.ajaxSingle, Boolean.TRUE);
+ setupControl(TestSetupEntry.processExternalValidation, Boolean.TRUE);
clickLoad();
setExtrenalValidationFailed();
@@ -610,6 +603,12 @@
}
}
+ public void checkNavigation(boolean passed) {
+ if (!"Navigation successfully".equals(base.getTextById("_auto_test_navigation"))) {
+ Assert.fail("Navigation has not been occurred");
+ }
+ }
+
public void checkProcessInputChangeListener(boolean passed) {
String status = getStatus();
if (passed && status != null && status.indexOf(AutoTestBean.PROCESS_INPUT_CHANGE_LISTENER) == -1) {
@@ -727,6 +726,8 @@
public static final TestSetupEntry converter = new TestSetupEntry("converter", Boolean.class, Boolean.FALSE);
public static final TestSetupEntry process = new TestSetupEntry("process", Boolean.class, Boolean.FALSE);
+
+ public static final TestSetupEntry processExternalValidation = new TestSetupEntry("processExtValid", Boolean.class, Boolean.FALSE);
public static final TestSetupEntry required = new TestSetupEntry("required", Boolean.class, Boolean.FALSE);
@@ -742,6 +743,7 @@
list.add(oncomplete);
list.add(converter);
list.add(process);
+ list.add(processExternalValidation);
list.add(required);
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2009-02-13 13:33:28 UTC (rev 12653)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2009-02-13 13:42:30 UTC (rev 12654)
@@ -1467,7 +1467,7 @@
}
public String getHTMLById(String id) {
- return runScript(getElementById(id) + ".innerHTML");
+ return runScript("document.getElementById('"+id+"')" + ".innerHTML");
}
public String getStyleAttributeString (String id, String attr) {
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java 2009-02-13 13:33:28 UTC (rev 12653)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java 2009-02-13 13:42:30 UTC (rev 12654)
@@ -79,6 +79,32 @@
}
@Test
+ public void testWithExternalValidation(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(TEST_NAVIGATION_URL, template, null);
+
+ tester.testExtrenalValidationFailure();
+ }
+
+
+ @Test
+ public void testAjaxSingleWithProcessExternalValidation(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(TEST_NAVIGATION_URL, template, null);
+
+ tester.testAjaxSingleWithProcesExternalValidation(true);
+ }
+
+ @Test
+ public void testAjaxSingle(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(TEST_NAVIGATION_URL, template, null);
+
+ tester.testAjaxSingle();
+ }
+
+
+ @Test
public void testOutput(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, null);
@@ -100,18 +126,9 @@
AutoTester tester = getAutoTester(this);
tester.renderPage(TEST_NAVIGATION_URL, template, null);
- // Set ajaxSingle mode
- tester.reset();
- tester.setupControl(AutoTester.TestSetupEntry.ajaxSingle, true);
- tester.clickLoad();
-
- tester.setExtrenalValidationFailed();
- tester.navigate();
-
- tester.checkAction(true);
- tester.checkActionListener(true);
- tester.checkNestedActionListener(true);
- tester.checkUpdateModel(false);
+ tester.testAjaxSingle();
+ tester.checkNavigation(true);
+ tester.checkAction(true);
}
@Test
@@ -119,17 +136,9 @@
AutoTester tester = getAutoTester(this);
tester.renderPage(TEST_NAVIGATION_URL, template, null);
- // Set immediate mode
- tester.reset();
- tester.setupControl(AutoTester.TestSetupEntry.immediate, true);
- tester.clickLoad();
-
- tester.navigate();
-
+ tester.testImmediate();
tester.checkAction(true);
- tester.checkActionListener(true);
- tester.checkNestedActionListener(true);
- tester.checkUpdateModel(false);
+ tester.checkNavigation(true);
}
@Test
@@ -298,12 +307,5 @@
public void sendAjax() {
clickAjaxCommandAndWait(getAutoTester(this).getClientId(AutoTester.COMPONENT_ID));
}
-
- @Override
- public void navigate() {
- clickById(getAutoTester(this).getClientId(AutoTester.COMPONENT_ID));
- }
-
-
-
+
}
15 years, 11 months