JBoss Rich Faces SVN: r11723 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-12-11 12:00:16 -0500 (Thu, 11 Dec 2008)
New Revision: 11723
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
RF-5237
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-11 16:49:08 UTC (rev 11722)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-11 17:00:16 UTC (rev 11723)
@@ -346,6 +346,13 @@
}
@Test
+ public void testRenderedAttribute(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ tester.testRendered();
+ }
+
+ @Test
public void testInternationalization(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -362,7 +369,7 @@
}
- // @Test
+ @Test
public void testLinitToListAttribute(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
@@ -371,7 +378,7 @@
tester.testLimitToList();
}
- //@Test
+ @Test
public void testReRenderAttribute(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
@@ -381,7 +388,7 @@
tester.testReRender();
}
- //@Test
+ @Test
public void testConverterAttribute(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
@@ -389,7 +396,7 @@
tester.testConverterAttribute();
}
- // @Test
+ @Test
public void testValidatorAndValidatorMessageAttributes(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
@@ -397,7 +404,7 @@
tester.testValidatorAndValidatorMessageAttributes();
}
- // @Test
+ @Test
public void testClientMode(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -431,7 +438,7 @@
}
- //@Test
+ @Test
public void testDataModelAttribute(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -450,7 +457,7 @@
}
- // @Test
+ @Test
public void testTimeSelection(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -498,7 +505,7 @@
}
- // @Test
+ @Test
public void testListenersInAjaxMode(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -517,7 +524,7 @@
}
- // @Test
+ @Test
public void testListenersInClientMode(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -538,7 +545,7 @@
}
- // @Test
+ @Test
public void testCalendarComponent(Template template) {
renderPage(template);
@@ -567,7 +574,7 @@
Assert.assertTrue(isVisible(calendarOpenedId), "Calendar window should be visible on the component!");
}
- // @Test
+ @Test
public void testSelectDateComponent(Template template) {
renderPage(template);
@@ -612,7 +619,7 @@
Assert.assertFalse(isVisible(calendarOpenedId), "Calendar window should NOT be visible on the component!");
}
- // @Test
+ @Test
public void testValueAndCurrentDateOfCalendarInCaseOfPopupTrue(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -659,7 +666,7 @@
Assert.assertEquals(currentDate, month_year, "Calendar shows wrong current date");
}
- //@Test
+ @Test
public void testValueAndCurrentDateOfCalendarWithPopupFalse(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -725,7 +732,7 @@
Assert.assertEquals(currentDate, month_year, "Calendar shows wrong current date");
}
- // @Test
+ @Test
public void testDatePatternNonPopupMode(Template template) {
renderPage(template, null);
initIds(getParentId());
@@ -755,7 +762,7 @@
}
}
- //@Test
+ @Test
public void testDatePatternPopupMode(Template template) {
renderPage(template, null);
initIds(getParentId());
@@ -791,7 +798,7 @@
}
}
- // @Test
+ @Test
public void testShowHeaderAttribute(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -814,7 +821,7 @@
AssertPresent(calendarHeaderId, "Header is not present");
}
- //@Test
+ @Test
public void testShowFooterAttribute(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -837,7 +844,7 @@
AssertPresent(calendarFooterId, "Footer is not present");
}
- // @Test
+ @Test
public void testShowWeekDaysBar(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -860,7 +867,7 @@
AssertPresent(weekDaysBarId, "Week days bar is not present");
}
- // @Test
+ @Test
public void testShowWeeksBar(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -884,7 +891,7 @@
AssertPresent(weeksBarId, "Weeks bar is not present");
}
- // @Test
+ @Test
public void testShowInput(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -898,7 +905,7 @@
AssertNotVisible(inputDateId, "Input is visible");
}
- // @Test
+ @Test
public void testShowApplyButton(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -915,7 +922,7 @@
Assert.assertFalse(isVisible(applyButtonXpath), "Apply button is visible");
}
- // @Test
+ @Test
public void testTodayControlMode(Template template) {
renderPage(TODAY_CONTROL_MODE_URL, template, null);
initIds(getParentId());
@@ -998,7 +1005,7 @@
Assert.assertFalse(isVisible(todayControlXpath), "Control 'Today' has to be hidden");
}
- //@Test
+ @Test
public void buttonRelatedAttributesTest(Template template) {
renderPage(BUTTON_RELATED_TEST_URL, template, null);
writeStatus("Check button-related attributes");
16 years, 1 month
JBoss Rich Faces SVN: r11722 - in trunk/test-applications/seleniumTest/richfaces/src: main/resources/org/ajax4jsf/message and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-12-11 11:49:08 -0500 (Thu, 11 Dec 2008)
New Revision: 11722
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/richfaces/
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/richfaces/renderkit/
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/richfaces/renderkit/calendar/
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/richfaces/renderkit/calendar/resource_ru.properties
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/message/resources_en_US.properties
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
Internationalization refactoring
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/message/resources_en_US.properties
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/message/resources_en_US.properties 2008-12-11 16:43:19 UTC (rev 11721)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/message/resources_en_US.properties 2008-12-11 16:49:08 UTC (rev 11722)
@@ -2,9 +2,4 @@
error=Error was occured.
RICH_LIST_SHUTTLE_COPY_ALL_LABEL=Copy All Items
RICH_SHUTTLES_TOP_LABEL=Move to top
-RICH_CALENDAR_APPLY_LABEL = Apply_en_US
-RICH_CALENDAR_TODAY_LABEL = Today_en_US
-RICH_CALENDAR_CLOSE_LABEL = Close_en_US
-RICH_CALENDAR_OK_LABEL = OK_en_US
-RICH_CALENDAR_CLEAN_LABEL = Clean_en_US
-RICH_CALENDAR_CANCEL_LABEL = Cancel_en_US
+
Added: trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/richfaces/renderkit/calendar/resource_ru.properties
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/richfaces/renderkit/calendar/resource_ru.properties (rev 0)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/richfaces/renderkit/calendar/resource_ru.properties 2008-12-11 16:49:08 UTC (rev 11722)
@@ -0,0 +1,6 @@
+RICH_CALENDAR_APPLY_LABEL = Apply_ru
+RICH_CALENDAR_TODAY_LABEL = Today_ru
+RICH_CALENDAR_CLOSE_LABEL = Close_ru
+RICH_CALENDAR_OK_LABEL = OK_ru
+RICH_CALENDAR_CLEAN_LABEL = Clean_ru
+RICH_CALENDAR_CANCEL_LABEL =Cancel_ru
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-11 16:43:19 UTC (rev 11721)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-11 16:49:08 UTC (rev 11722)
@@ -23,13 +23,16 @@
import java.text.ParseException;
import java.text.SimpleDateFormat;
+import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
+import java.util.List;
import java.util.Locale;
import org.ajax4jsf.bean.CalendarTestBean;
import org.ajax4jsf.template.Template;
import org.ajax4jsf.util.DateUtils;
+import org.apache.tools.ant.util.StringUtils;
import org.richfaces.AutoTester;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
@@ -56,6 +59,18 @@
static final String availableDayCellClass = "rich-calendar-cell-size rich-calendar-cell rich-calendar-btn";
static final String disabledDayCellClass = "rich-calendar-cell-size rich-calendar-cell rich-calendar-boundary-dates";
+
+ static final List<String> WEEK_DAYS_RU = new ArrayList<String>();
+ static {
+ WEEK_DAYS_RU.add("��");
+ WEEK_DAYS_RU.add("��");
+ WEEK_DAYS_RU.add("��");
+ WEEK_DAYS_RU.add("��");
+ WEEK_DAYS_RU.add("��");
+ WEEK_DAYS_RU.add("��");
+ WEEK_DAYS_RU.add("��");
+
+ }
String calendarId;
@@ -314,18 +329,36 @@
}
+ // Checks months label with ru locale
+ private void testWeekDays() {
+ String weekDaysLabelsId = calendarId + "WeekDay";
+ int l = selenium.getXpathCount("//tr[@id='"+weekDaysLabelsId+"']/td").intValue();
+ List<String> weekDays = new ArrayList<String>();
+ for (int i = 1; i <= l; i++) {
+ weekDays.add(selenium.getText("//tr[@id='"+weekDaysLabelsId+"']/td["+i+"]"));
+ }
+
+ for (String weekday : WEEK_DAYS_RU) {
+ if (!weekDays.contains(weekday)) {
+ Assert.fail("Internationalization failed. Weekdays should contain ["+weekday+"] in case of RU locale. But was: " + weekDays.toArray());
+ }
+ }
+ }
+
@Test
public void testInternationalization(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
setPopup(true);
- setup();
+ String changeLocaleButtonId = getParentId() + CONTROLS_FORM_ID + "testLocale";
+ clickCommandAndWait(changeLocaleButtonId);
showPopup();
showTimeSelectionWindow();
- testInternatialization("_en_US");
+ testInternatialization("_ru");
+ testWeekDays();
}
16 years, 1 month
JBoss Rich Faces SVN: r11721 - trunk/framework/api/src/main/java/org/ajax4jsf/javascript.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-12-11 11:43:19 -0500 (Thu, 11 Dec 2008)
New Revision: 11721
Modified:
trunk/framework/api/src/main/java/org/ajax4jsf/javascript/JSEncoder.java
Log:
https://jira.jboss.org/jira/browse/RF-5273
Modified: trunk/framework/api/src/main/java/org/ajax4jsf/javascript/JSEncoder.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/javascript/JSEncoder.java 2008-12-11 16:11:32 UTC (rev 11720)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/javascript/JSEncoder.java 2008-12-11 16:43:19 UTC (rev 11721)
@@ -74,6 +74,9 @@
(c == 0x5c) || // [\]
(c == 0x03) || // [esc]
(c == ']') || // ] - to avoid conflicts in CDATA
+ (c == '<') || // - escape HTML markup characters
+ (c == '>') || // - HTML
+ (c == '&') || // - HTML
(c < 0x20) || // See <http://www.w3.org/TR/REC-xml#charsets>
((c > 0xd7ff) && (c < 0xe000)) || (c > 0xfffd)|| (c > 0xff)) {
return (false);
16 years, 1 month
JBoss Rich Faces SVN: r11720 - trunk/ui/tree/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-12-11 11:11:32 -0500 (Thu, 11 Dec 2008)
New Revision: 11720
Modified:
trunk/ui/tree/src/main/config/component/tree.xml
Log:
https://jira.jboss.org/jira/browse/RF-4541
Modified: trunk/ui/tree/src/main/config/component/tree.xml
===================================================================
--- trunk/ui/tree/src/main/config/component/tree.xml 2008-12-11 15:41:11 UTC (rev 11719)
+++ trunk/ui/tree/src/main/config/component/tree.xml 2008-12-11 16:11:32 UTC (rev 11720)
@@ -192,14 +192,9 @@
</property>
<property hidden="true">
- <name>ajaxKeys</name>
- </property>
-
- <property hidden="true">
<name>rowKey</name>
</property>
-
<property>
<name>dragValue</name>
<classname>java.lang.Object</classname>
16 years, 1 month
JBoss Rich Faces SVN: r11719 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-12-11 10:41:11 -0500 (Thu, 11 Dec 2008)
New Revision: 11719
Modified:
trunk/docs/userguide/en/src/main/docbook/included/editor.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/editor.xml
Log:
https://jira.jboss.org/jira/browse/RF-5042
added some info to the guide
Modified: trunk/docs/userguide/en/src/main/docbook/included/editor.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/editor.desc.xml 2008-12-11 14:57:47 UTC (rev 11718)
+++ trunk/docs/userguide/en/src/main/docbook/included/editor.desc.xml 2008-12-11 15:41:11 UTC (rev 11719)
@@ -30,11 +30,10 @@
<itemizedlist>
<listitem><para>Seam text support</para></listitem>
- <listitem><para>Properties customization via configuration files</para></listitem>
+ <listitem><para>Manageable global configurations</para></listitem>
<listitem><para>Possibility to use custom plug-ins</para></listitem>
+ <listitem><para>Support of all TinyMCE's parameters through <f:param></para></listitem>
-
-
</itemizedlist>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/editor.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/editor.xml 2008-12-11 14:57:47 UTC (rev 11718)
+++ trunk/docs/userguide/en/src/main/docbook/included/editor.xml 2008-12-11 15:41:11 UTC (rev 11719)
@@ -72,7 +72,9 @@
<para>The easiest way to place the <emphasis role="bold"> <property><rich:editor></property></emphasis>on a page is as follows:</para>
-
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[
<rich:editor value="#{bean.editorValue}" />
]]></programlisting>
@@ -83,9 +85,9 @@
<orderedlist>
- <listitem><para>Using attributes;</para></listitem>
- <listitem><para>Using using <f:param> JSF tag;</para></listitem>
- <listitem><para>Using configuration files.</para></listitem>
+ <listitem><para>Using attributes</para></listitem>
+ <listitem><para>Using using <f:param> JSF tag</para></listitem>
+ <listitem><para>Using configuration files that allow you to set up multiple configurations for all editors in your application and change them in the runtime</para></listitem>
</orderedlist>
@@ -96,16 +98,34 @@
match the corresponding properties of TinyMCE editor.</para>
<para>For example, a theme for the editor can be defined using the <property>"theme"</property> attribute like this: </para>
-
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[
<rich:editor value="#{bean.editorValue}" theme="advanced"/>
]]></programlisting>
<para>Setting a different skin for the editor can be done using the <property>"skin"</property> attribute.</para>
- <para>Another useful property that is implemented at attribute level is <property>"viewmode"</property>.
- The attribute switches between "visual" and "source" modes, toggling between modes is performed setting the attribute to "visual" and "source" respectively.</para>
-
- <para>
+ <para>Another useful property that is implemented at attribute level is <property>"viewMode"</property>.
+ The attribute switches between "visual" and "source" modes, toggling between modes is performed setting the attribute to "visual" and "source" respectively.
+ Implementation of <emphasis role="bold"> <property><rich:editor></property></emphasis> also implies that you can change the modes dynamically
+ setting the value of the <property>"viewMode"</property> attribute using EL-expression.
+ </para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+
+ <programlisting role="XML"><![CDATA[...
+ <rich:editor value="#{editor.submit}" theme="advanced" viewMode="#{editor.viewMode}" >
+ ...
+ <h:selectOneRadio value="#{editor.viewMode}" onchange="submit();">
+ <f:selectItem itemValue="visual" itemLabel="visual" />
+ <f:selectItem itemValue="source" itemLabel="source" />
+ </h:selectOneRadio>
+ ...
+ ...]]></programlisting>
+ <para>
Apart from the attributes that define the editor's properties there are some attributes that help handle events(custom event handlers).
</para>
<para>
@@ -118,7 +138,10 @@
the <property>"value"</property> attribute assigns some value to the option.</para>
<para>For example, this code adds some buttons to the editor and positions the toolbar. </para>
-
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[...
<rich:editor value="#{bean.editorValue}" theme="advanced" plugins="save,paste" >
<f:param name="theme_advanced_buttons1" value="bold,italic,underline, cut,copy,paste,pasteword"/>
@@ -152,6 +175,9 @@
<itemizedlist>
<listitem><para>Create a configuration file (.properties) in the classpath folder and add some properties to it. Use standard syntax for the .properties files: <code>parameter=value</code>. Here is an example of configuration file:</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[
theme="advanced"
plugins="save,paste"
@@ -166,28 +192,33 @@
<property>"configuration"</property>attribute which takes the name of the configuration file as a value (with out .properties extension). </para>
<para>For example, if you named the configuration file "editorconfig", you would address it as follows:
</para>
-
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[...
<rich:editor value="#{bean.editorValue}" configuration="editorconfig"/>
...]]></programlisting>
</listitem>
<listitem><para>
- Alternately, you can use a EL-binding to define a configuration file. This way you can dynamically change the sets of configuration properties. </para>
+ Alternately, you can use a EL-expression to define a configuration file. This way you can dynamically change the sets of configuration properties. </para>
<para> For example, you have two configuration files "configurationAdvanced" and "configurationSimple" and you want them to be
applied under some condition. </para>
<para>To do this you need to bind <property>"configuration"</property>attribute to the appropriate bean property like this . </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[...
-<rich:editor value="#{bean.editorValue}" configuration="#{editor.property}" />
+<rich:editor value="#{bean.editorValue}" configuration="#{editor.configuration}" />
...]]></programlisting>
<para>Your Java file should look like this.</para>
<programlisting role="JAVA"><![CDATA[...
String configuration;
- if(some condition){//define some condition
+ if(some condition){//defines some condition
configuration = "configurationAdvanced"; //the name on the file with advanced properties
}
else{
@@ -217,6 +248,9 @@
<itemizedlist>
<listitem><para>Create a .properties file and put the name of the plug-in and a path to it into the file.
The file can contain multiple plug-in declarations. Your .properties file should be like this. </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[...
pluginName=/mytinymceplugins/plugin1Name/editor_plugin.js
...]]></programlisting>
@@ -226,6 +260,9 @@
<para>Use the <property>"customPlugins"</property> attribute to specify the .properties file with a plug-in name and a path to it.</para>
<para>Example:</para>
<para>If your .properties file is named "myPlugins", then your will have this code on the page.</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[...
<rich:editor theme="advanced" customPlugins="myPlugins" plugins="pluginName">
...]]></programlisting>
@@ -251,7 +288,9 @@
to Seam text (you can read more Seam text <ulink url="http://docs.jboss.org/seam/1.1.5.GA/reference/en/html/text.html">here</ulink>.), it also interprets Seam text
passed to the <emphasis role="bold"> <property><rich:editor></property></emphasis> and renders it to HTML.
The converter can be enable with the <property>"seamTest"</property> attribute.</para>
- <para>Example:</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<para>This HTML code generated by editor</para>
<programlisting role="XML"><![CDATA[...
@@ -1209,6 +1248,10 @@
<section>
<title>Relevant Resources Links</title>
+
+ <para>The <emphasis role="bold"> <property><rich:editor></property></emphasis> is based on TinyMCE editor and supports almost all its features and properties some of which are not described here since you can find more detailed documentation on them on the official <ulink url="http://wiki.moxiecode.com/index.php/TinyMCE:Index">web site.</ulink></para>
+
+
<para><ulink
url="http://livedemo.exadel.com/richfaces-demo/richfaces/fileUpload.jsf?c=editor"
>Here</ulink> you can see an example of <emphasis
16 years, 1 month
JBoss Rich Faces SVN: r11718 - in trunk/samples/richfaces-demo/src/main: webapp/richfaces/support and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-12-11 09:57:47 -0500 (Thu, 11 Dec 2008)
New Revision: 11718
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/SelectsBean.java
trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/dropDowns.xhtml
Log:
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/SelectsBean.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/SelectsBean.java 2008-12-11 14:32:53 UTC (rev 11717)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/SelectsBean.java 2008-12-11 14:57:47 UTC (rev 11718)
@@ -6,6 +6,10 @@
import javax.faces.event.ValueChangeEvent;
import javax.faces.model.SelectItem;
+/**
+ * @author Ilya Shaikovsky
+ *
+ */
public class SelectsBean {
private String currentType="";
private String currentItem="";
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/dropDowns.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/dropDowns.xhtml 2008-12-11 14:32:53 UTC (rev 11717)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/dropDowns.xhtml 2008-12-11 14:57:47 UTC (rev 11718)
@@ -30,6 +30,11 @@
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath" value="/richfaces/support/examples/dynamicSelects.xhtml"/>
</ui:include>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/WEB-INF/src/org/richfaces/demo/ajaxsupport/SelectsBean.java"/>
+ <ui:param name="openlabel" value="View SelectsBean.java Source" />
+ <ui:param name="sourcetype" value="java" />
+ </ui:include>
</div>
16 years, 1 month
JBoss Rich Faces SVN: r11717 - in trunk/samples/richfaces-demo/src/main: webapp/WEB-INF and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-12-11 09:32:53 -0500 (Thu, 11 Dec 2008)
New Revision: 11717
Added:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/SelectsBean.java
trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/dropDowns.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/examples/dynamicSelects.xhtml
Modified:
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/support.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-5147
Added: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/SelectsBean.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/SelectsBean.java (rev 0)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/SelectsBean.java 2008-12-11 14:32:53 UTC (rev 11717)
@@ -0,0 +1,69 @@
+package org.richfaces.demo.ajaxsupport;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.event.ValueChangeEvent;
+import javax.faces.model.SelectItem;
+
+public class SelectsBean {
+ private String currentType="";
+ private String currentItem="";
+ public List<SelectItem> firstList = new ArrayList<SelectItem>();
+ public List<SelectItem> secondList = new ArrayList<SelectItem>();
+ private static final String [] FRUITS = {"Banana", "Cranberry", "Blueberry", "Orange"};
+ private static final String [] VEGETABLES = {"Potatoes", "Broccoli", "Garlic", "Carrot"};
+
+ public SelectsBean() {
+ SelectItem item = new SelectItem("fruits", "Fruits");
+ firstList.add(item);
+ item = new SelectItem("vegetables", "Vegetables");
+ firstList.add(item);
+ for (int i = 0; i < FRUITS.length; i++) {
+ item = new SelectItem(FRUITS[i]);
+ }
+ }
+
+ public List<SelectItem> getFirstList() {
+ return firstList;
+ }
+ public List<SelectItem> getSecondList() {
+ return secondList;
+ }
+ public static String[] getFRUITS() {
+ return FRUITS;
+ }
+ public static String[] getVEGETABLES() {
+ return VEGETABLES;
+ }
+ public void valueChanged(ValueChangeEvent event){
+ secondList.clear();
+ String[] currentItems;
+ if (((String)event.getNewValue()).equals("fruits")) {
+ currentItems = FRUITS;
+ }else{
+ currentItems = VEGETABLES;
+ }
+ for (int i = 0; i < currentItems.length; i++) {
+ SelectItem item = new SelectItem(currentItems[i]);
+ secondList.add(item);
+ }
+
+ }
+
+ public String getCurrentType() {
+ return currentType;
+ }
+
+ public void setCurrentType(String currentType) {
+ this.currentType = currentType;
+ }
+
+ public String getCurrentItem() {
+ return currentItem;
+ }
+
+ public void setCurrentItem(String currentItem) {
+ this.currentItem = currentItem;
+ }
+}
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-12-11 11:50:45 UTC (rev 11716)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-12-11 14:32:53 UTC (rev 11717)
@@ -418,6 +418,11 @@
<managed-bean-class>org.richfaces.demo.queue.MojarraBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>selectsBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.ajaxsupport.SelectsBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
<navigation-rule>
<from-view-id>/richfaces/include/examples/wstep1.xhtml</from-view-id>
<navigation-case>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/dropDowns.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/dropDowns.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/dropDowns.xhtml 2008-12-11 14:32:53 UTC (rev 11717)
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+ <ui:composition template="/templates/component-sample.xhtml">
+ <ui:define name="sample">
+
+ <p>
+ One of the most frequently asked question from the community is about the
+ problems while trying to create so called dependent selects.
+ </p>
+ <p>
+ So there you could explore simple sample of this case and check the source
+ code used.
+ </p>
+ <p>
+ After you select the produce type - the second select list will be populated
+ and contains the items of this type. And if you change the type it will
+ be updated again wih proper values.
+ </p>
+
+ <fieldset class="demo_fieldset">
+ <legend class="demo_legend">Dynamic selects Demo</legend>
+ <div class="sample-container" >
+
+ <ui:include src="/richfaces/support/examples/dynamicSelects.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/richfaces/support/examples/dynamicSelects.xhtml"/>
+ </ui:include>
+
+
+ </div>
+ </fieldset>
+ </ui:define>
+
+ </ui:composition>
+</html>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/examples/dynamicSelects.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/examples/dynamicSelects.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/examples/dynamicSelects.xhtml 2008-12-11 14:32:53 UTC (rev 11717)
@@ -0,0 +1,24 @@
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+ <h:form>
+ <h:panelGrid columns="2">
+ <h:outputText value="Choose the produce type:"/>
+ <rich:inplaceSelect value="#{selectsBean.currentType}" valueChangeListener="#{selectsBean.valueChanged}" defaultLabel="Click here to select">
+ <f:selectItems value="#{selectsBean.firstList}"/>
+ <a4j:support event="onchange" reRender="items, label" ajaxSingle="true"/>
+ </rich:inplaceSelect>
+ <a4j:outputPanel id="label">
+ <h:outputText value="Choose concrete product:" rendered="#{!empty selectsBean.secondList}"/>
+ </a4j:outputPanel>
+ <a4j:outputPanel id="items">
+ <rich:inplaceSelect value="#{selectsBean.currentItem}" rendered="#{!empty selectsBean.secondList}" defaultLabel="Click here to select">
+ <f:selectItems value="#{selectsBean.secondList}"/>
+ </rich:inplaceSelect>
+ </a4j:outputPanel>
+ </h:panelGrid>
+ </h:form>
+</ui:composition>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/support.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/support.xhtml 2008-12-11 11:50:45 UTC (rev 11716)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/support.xhtml 2008-12-11 14:32:53 UTC (rev 11717)
@@ -7,7 +7,20 @@
<ui:composition template="/templates/main.xhtml">
<ui:define name="title">RichFaces - Open Source Rich JSF Components - Ajax Support</ui:define>
<ui:define name="body">
- <ui:include src="/templates/include/tab-panel.xhtml" />
+ <rich:tabPanel switchType="server" styleClass="top_tab" contentClass="content_tab" headerClass="header_tabs_class" inactiveTabClass="inactive_tab" activeTabClass="active_tab"
+ selectedTab="#{componentNavigator.currentComponent.activeTab}" valueChangeListener="#{componentNavigator.tabPanelSwitched}">
+ <rich:tab label="Usage" name="usage">
+ <ui:include src="/richfaces/support/usage.xhtml"/>
+ </rich:tab>
+ <rich:tab label="Dynamic Forms Sample" name="selects">
+ <ui:include src="/richfaces/support/dropDowns.xhtml"/>
+ </rich:tab>
+ <rich:tab name="info" label="Tag Information">
+ <rich:insert
+ src="/WEB-INF/#{componentNavigator.currentComponent.tagInfoLocation}"
+ errorContent="/templates/include/tagInfoNotes.xhtml" />
+ </rich:tab>
+ </rich:tabPanel>
</ui:define>
</ui:composition>
</html>
16 years, 1 month
JBoss Rich Faces SVN: r11716 - in trunk/test-applications/seleniumTest/richfaces/src: test/java/org/richfaces/testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-12-11 06:50:45 -0500 (Thu, 11 Dec 2008)
New Revision: 11716
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/messagesBase.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/testMessagesWithForAttribute.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/testMoreThanOneMessage.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/MessagesTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5128
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/messagesBase.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/messagesBase.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/testMessagesWithForAttribute.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/testMessagesWithForAttribute.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/testMoreThanOneMessage.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/MessagesTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/MessagesTest.java 2008-12-11 08:40:55 UTC (rev 11715)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/MessagesTest.java 2008-12-11 11:50:45 UTC (rev 11716)
@@ -24,16 +24,16 @@
public void testComponentOutputAllMessagesByAjax(Template template) {
init(template, TEST_MORE_THAN_ONE_MESSAGE);
- Assert.assertFalse(selenium.isElementPresent(mainForm + ":fatalMarker"));
- Assert.assertFalse(selenium.isElementPresent(mainForm + ":errorMarker"));
+ AssertNotPresent(mainForm + ":fatalMarker");
+ AssertNotPresent(mainForm + ":errorMarker");
selenium.type(inputText, "fatal");
selenium.type(inputText + "2", "");
selenium.type(inputText + "3", "");
clickAjaxCommandAndWait(mainForm + ":submitWithoutReRender");
- Assert.assertTrue(selenium.isElementPresent(mainForm + ":fatalMarker"));
- Assert.assertTrue(selenium.isElementPresent(mainForm + ":errorMarker"));
+ AssertPresent(mainForm + ":fatalMarker");
+ AssertPresent(mainForm + ":errorMarker");
Assert.assertEquals("messageSummary", selenium.getText("xpath=id('" + message + "')/dt[1]/span[2]"));
Assert.assertEquals("Required message 1", selenium.getText("xpath=id('" + message + "')/dt[2]/span[2]"));
Assert.assertEquals("Required message 2", selenium.getText("xpath=id('" + message + "')/dt[3]/span[2]"));
@@ -43,7 +43,32 @@
selenium.type(inputText + "3", "passed");
clickAjaxCommandAndWait(mainForm + ":submitWithoutReRender");
- Assert.assertFalse(selenium.isElementPresent(mainForm + ":fatalMarker"));
- Assert.assertFalse(selenium.isElementPresent(mainForm + ":errorMarker"));
+ AssertNotPresent(mainForm + ":fatalMarker");
+ AssertNotPresent(mainForm + ":errorMarker");
}
+
+ @Test
+ public void testMessagesForAttribute(Template template) {
+ init(template, TEST_MESSAGES_WITH_FOR_ATTRIBUTE);
+
+ AssertNotPresent(mainForm + ":fatalMarker");
+ AssertNotPresent(mainForm + ":errorMarker");
+
+ selenium.type(inputText, "fatal");
+ selenium.type(inputText + "2", "");
+ selenium.type(inputText + "3", "");
+
+ clickAjaxCommandAndWait(mainForm + ":submitWithoutReRender");
+
+ //should present error message only for 2-nd input
+ AssertNotPresent(mainForm + ":fatalMarker");
+ AssertPresent(mainForm + ":errorMarker");
+ Assert.assertEquals("Required message 1", selenium.getText("xpath=id('" + message + "')/dt[1]/span[2]"));
+
+ selenium.type(inputText + "2", "passed");
+
+ clickAjaxCommandAndWait(mainForm + ":submitWithoutReRender");
+ AssertNotPresent(mainForm + ":fatalMarker");
+ AssertNotPresent(mainForm + ":errorMarker");
+ }
}
16 years, 1 month
JBoss Rich Faces SVN: r11715 - in trunk/test-applications/realworld/web/src/main: webapp/WEB-INF/tags/templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2008-12-11 03:40:55 -0500 (Thu, 11 Dec 2008)
New Revision: 11715
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeActionManager.java
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/albumModalPanel.xhtml
Log:
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeActionManager.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeActionManager.java 2008-12-10 20:17:35 UTC (rev 11714)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeActionManager.java 2008-12-11 08:40:55 UTC (rev 11715)
@@ -62,7 +62,7 @@
@In(create=true)
FileManager fileManager;
- @In(create=true) @Out
+ @In(create=true) @Out(required=false)
private Image selectedImage;
@In(create=true) @Out
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/albumModalPanel.xhtml
===================================================================
(Binary files differ)
16 years, 1 month
JBoss Rich Faces SVN: r11714 - in trunk/test-applications/seleniumTest/richfaces/src: main/resources/org/ajax4jsf/message and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-12-10 15:17:35 -0500 (Wed, 10 Dec 2008)
New Revision: 11714
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/message/resources_en_US.properties
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
RF-5234
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java 2008-12-10 19:27:44 UTC (rev 11713)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java 2008-12-10 20:17:35 UTC (rev 11714)
@@ -141,7 +141,7 @@
public void setTimeZone(TimeZone timeZone) {
this.timeZone = timeZone;
}
-
+
public static Calendar getCalendar() {
return Calendar.getInstance(CalendarTestBean.TIME_ZONE, CalendarTestBean.LOCALE);
}
@@ -208,13 +208,20 @@
mode = UICalendar.CLIENT_MODE;
return null;
}
+
+ public String testLocale () {
+ locale = new Locale("ru");
+ return null;
+ }
+
public void reset() {
mode = UICalendar.AJAX_MODE;
status = "";
selectedDate = new Date();
isPopup = false;
currentDate = new Date();
+ locale = Locale.US;
}
public String resetAction() {
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/message/resources_en_US.properties
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/message/resources_en_US.properties 2008-12-10 19:27:44 UTC (rev 11713)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/message/resources_en_US.properties 2008-12-10 20:17:35 UTC (rev 11714)
@@ -1,4 +1,10 @@
test=It is sample message from resourceBundle
error=Error was occured.
RICH_LIST_SHUTTLE_COPY_ALL_LABEL=Copy All Items
-RICH_SHUTTLES_TOP_LABEL=Move to top
\ No newline at end of file
+RICH_SHUTTLES_TOP_LABEL=Move to top
+RICH_CALENDAR_APPLY_LABEL = Apply_en_US
+RICH_CALENDAR_TODAY_LABEL = Today_en_US
+RICH_CALENDAR_CLOSE_LABEL = Close_en_US
+RICH_CALENDAR_OK_LABEL = OK_en_US
+RICH_CALENDAR_CLEAN_LABEL = Clean_en_US
+RICH_CALENDAR_CANCEL_LABEL = Cancel_en_US
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-10 19:27:44 UTC (rev 11713)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-10 20:17:35 UTC (rev 11714)
@@ -126,6 +126,14 @@
String todayControlModeId;
String todayControlXpath;
+
+ String applyButtonXpath;
+
+ String cleanButtonXPath;
+
+ String closeHeaderXpath;
+
+
void initIds(String parentId) {
calendarId = parentId + FORM_ID + "calendar";
@@ -151,6 +159,7 @@
timeZoneId = parentId + CONTROLS_FORM_ID + "timeZone";
localeId = parentId + CONTROLS_FORM_ID + "locale";
currentDateHeaderXpath = "//td[@id='"+calendarHeaderId+"']/table/tbody/tr/td[3]/div";
+ closeHeaderXpath = "//td[@id='"+calendarHeaderId+"']/table/tbody/tr/td[last()]/div";
popupButtonId = calendarId + "PopupButton";
inputDateId = calendarId + "InputDate";
showApplyButtonId = parentId + FORM_ID + "showApplyButton";
@@ -163,6 +172,8 @@
weekDaysBarId = calendarId + "WeekDay";
todayControlModeId = parentId + FORM_ID + "todayControlMode";
todayControlXpath = "//td[@id='" + calendarFooterId + "']/table/tbody/tr/td[5]";
+ applyButtonXpath = "//td[@id='" + calendarFooterId + "']/table/tbody/tr/td[6]";
+ cleanButtonXPath = "//td[@id='"+calendarFooterId+"']/table/tbody/tr/td[2]";
}
String getStatus() {
@@ -268,7 +279,57 @@
}
}
+ void testInternatialization(String prefix) {
+ String label = selenium.getText(todayControlXpath);
+ String expectedLabel = ("Today" + prefix);
+ if (!expectedLabel.equals(label)) {
+ Assert.fail("Internatialization was not applied. Expected label for 'Today' button: ["+expectedLabel+"]. But was ["+label+"]");
+ }
+
+ label = selenium.getText(cleanButtonXPath);
+ expectedLabel = ("Clean" + prefix);
+ if (!expectedLabel.equals(label)) {
+ Assert.fail("Internatialization was not applied. Expected label for 'Clean' button: ["+expectedLabel+"]. But was ["+label+"]");
+ }
+
+ label = selenium.getText(timeSelectionOkButtonId);
+ expectedLabel = ("OK" + prefix);
+ if (!expectedLabel.equals(label)) {
+ Assert.fail("Internatialization was not applied. Expected label for 'OK' button: ["+expectedLabel+"]. But was ["+label+"]");
+ }
+
+ label = selenium.getText(timeSelectionCancelButtonId);
+ expectedLabel = ("Cancel" + prefix);
+ if (!expectedLabel.equals(label)) {
+ Assert.fail("Internatialization was not applied. Expected label for 'Cancel' button: ["+expectedLabel+"]. But was ["+label+"]");
+ }
+
+ label = selenium.getText(closeHeaderXpath);
+ expectedLabel = ("Close" + prefix);
+ if (!expectedLabel.equals(label)) {
+ Assert.fail("Internatialization was not applied. Expected label for 'Close' button: ["+expectedLabel+"]. But was ["+label+"]");
+ }
+
+
+
+ }
+
@Test
+ public void testInternationalization(Template template) {
+ renderPage(template, RESET_METHOD);
+ initIds(getParentId());
+
+ setPopup(true);
+ setup();
+
+ showPopup();
+ showTimeSelectionWindow();
+
+ testInternatialization("_en_US");
+
+ }
+
+ // @Test
public void testLinitToListAttribute(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
@@ -277,7 +338,7 @@
tester.testLimitToList();
}
- @Test
+ //@Test
public void testReRenderAttribute(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
@@ -287,7 +348,7 @@
tester.testReRender();
}
- @Test
+ //@Test
public void testConverterAttribute(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
@@ -295,7 +356,7 @@
tester.testConverterAttribute();
}
- @Test
+ // @Test
public void testValidatorAndValidatorMessageAttributes(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
@@ -303,7 +364,7 @@
tester.testValidatorAndValidatorMessageAttributes();
}
- @Test
+ // @Test
public void testClientMode(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -337,7 +398,7 @@
}
- @Test
+ //@Test
public void testDataModelAttribute(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -356,7 +417,7 @@
}
- @Test
+ // @Test
public void testTimeSelection(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -404,7 +465,7 @@
}
- @Test
+ // @Test
public void testListenersInAjaxMode(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -423,7 +484,7 @@
}
- @Test
+ // @Test
public void testListenersInClientMode(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -444,7 +505,7 @@
}
- @Test
+ // @Test
public void testCalendarComponent(Template template) {
renderPage(template);
@@ -473,7 +534,7 @@
Assert.assertTrue(isVisible(calendarOpenedId), "Calendar window should be visible on the component!");
}
- @Test
+ // @Test
public void testSelectDateComponent(Template template) {
renderPage(template);
@@ -518,7 +579,7 @@
Assert.assertFalse(isVisible(calendarOpenedId), "Calendar window should NOT be visible on the component!");
}
- @Test
+ // @Test
public void testValueAndCurrentDateOfCalendarInCaseOfPopupTrue(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -565,7 +626,7 @@
Assert.assertEquals(currentDate, month_year, "Calendar shows wrong current date");
}
- @Test
+ //@Test
public void testValueAndCurrentDateOfCalendarWithPopupFalse(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -631,7 +692,7 @@
Assert.assertEquals(currentDate, month_year, "Calendar shows wrong current date");
}
- @Test
+ // @Test
public void testDatePatternNonPopupMode(Template template) {
renderPage(template, null);
initIds(getParentId());
@@ -661,7 +722,7 @@
}
}
- @Test
+ //@Test
public void testDatePatternPopupMode(Template template) {
renderPage(template, null);
initIds(getParentId());
@@ -697,7 +758,7 @@
}
}
- @Test
+ // @Test
public void testShowHeaderAttribute(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -720,7 +781,7 @@
AssertPresent(calendarHeaderId, "Header is not present");
}
- @Test
+ //@Test
public void testShowFooterAttribute(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -743,7 +804,7 @@
AssertPresent(calendarFooterId, "Footer is not present");
}
- @Test
+ // @Test
public void testShowWeekDaysBar(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -766,7 +827,7 @@
AssertPresent(weekDaysBarId, "Week days bar is not present");
}
- @Test
+ // @Test
public void testShowWeeksBar(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -790,7 +851,7 @@
AssertPresent(weeksBarId, "Weeks bar is not present");
}
- @Test
+ // @Test
public void testShowInput(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -804,7 +865,7 @@
AssertNotVisible(inputDateId, "Input is visible");
}
- @Test
+ // @Test
public void testShowApplyButton(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -821,7 +882,7 @@
Assert.assertFalse(isVisible(applyButtonXpath), "Apply button is visible");
}
- @Test
+ // @Test
public void testTodayControlMode(Template template) {
renderPage(TODAY_CONTROL_MODE_URL, template, null);
initIds(getParentId());
@@ -904,7 +965,7 @@
Assert.assertFalse(isVisible(todayControlXpath), "Control 'Today' has to be hidden");
}
- @Test
+ //@Test
public void buttonRelatedAttributesTest(Template template) {
renderPage(BUTTON_RELATED_TEST_URL, template, null);
writeStatus("Check button-related attributes");
16 years, 1 month