JBoss Rich Faces SVN: r11553 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-12-04 11:12:22 -0500 (Thu, 04 Dec 2008)
New Revision: 11553
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5155
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-04 15:50:54 UTC (rev 11552)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-04 16:12:22 UTC (rev 11553)
@@ -92,6 +92,10 @@
String currentDateHeaderXpath;
+ String popupButtonId;
+
+ String inputDateId;
+
void initIds(String parentId) {
calendarId = parentId + FORM_ID + "calendar";
calendarHeaderId = calendarId + "Header";
@@ -116,6 +120,8 @@
timeZoneId = parentId + CONTROLS_FORM_ID + "timeZone";
localeId = parentId + CONTROLS_FORM_ID + "locale";
currentDateHeaderXpath = "//td[@id='"+calendarHeaderId+"']/table/tbody/tr/td[3]/div";
+ popupButtonId = calendarId + "PopupButton";
+ inputDateId = calendarId + "InputDate";
}
String getStatus() {
@@ -370,14 +376,53 @@
Assert.assertFalse(isVisibleById(calendarOpenedId), "Calendar window should NOT be visible on the component!");
}
-// @Test
-// public void testValueAndCurrentDateOfCalendarInCaseOfPopupTrue(Template template) {
-// renderPage(template);
-// //1. value != null + curr_date != null
-// //2. value != null + curr_date == null
-// //3. value == null + curr_date == null
-// }
+ @Test
+ public void testValueAndCurrentDateOfCalendarInCaseOfPopupTrue(Template template) {
+ renderPage(template);
+ initIds(getParentId());
+ String expectedSelectedDate = "03/03/2007 11:00";
+ String expectedCurrentDate = "04/04/2008 13:00";
+ setPopup(true);
+ writeStatus("Check that in popup mode currentDate attribute is ignored in all cases");
+
+ //1. value != null + curr_date != null
+ setValueById(selectedDateId, expectedSelectedDate);
+ setValueById(currentDateId, expectedCurrentDate);
+ setup();
+
+ showPopup();
+ writeStatus("Check calendar popup is shown up");
+ Assert.assertTrue(isVisible(calendarId), "Calendar popup is not visible");
+
+ writeStatus("Check selected date");
+ AssertValueEquals(inputDateId, expectedSelectedDate, "Calendar shows wrong date");
+
+ writeStatus("Check current month and year. Remind! Current date has to be ignored. Value date is used instead");
+ String currentDate = selenium.getText(currentDateHeaderXpath);
+ Assert.assertEquals(currentDate, "March, 2007", "Calendar shows wrong current date");
+
+ //2. value == null + curr_date != null
+ setValueById(selectedDateId, "");
+ setValueById(currentDateId, expectedCurrentDate);
+ setup();
+
+ showPopup();
+ writeStatus("Check selected date is empty");
+ AssertValueEquals(inputDateId, "", "Calendar value must be empty");
+
+ writeStatus("Check current month and year. Remind! Current date has to be ignored as before. Value date is empty, present date is used");
+ currentDate = selenium.getText(currentDateHeaderXpath);
+
+ Locale locale = new Locale(selenium.getText(localeId));
+ Date presentTime = Calendar.getInstance(locale).getTime();
+ String month = DateUtils.month(presentTime, locale);
+ int year = DateUtils.year(presentTime);
+ String month_year = month + ", " + year;
+
+ Assert.assertEquals(currentDate, month_year, "Calendar shows wrong current date");
+ }
+
@Test
public void testValueAndCurrentDateOfCalendarWithPopupFalse(Template template) {
renderPage(template, null);
@@ -390,7 +435,7 @@
writeStatus("Check whether the component is present and up to the mark if value and currentDate are defined");
setValueById(selectedDateId, expectedSelectedDate);
setValueById(currentDateId, expectedCurrentDate);
- clickCommandAndWait(setupActionId);
+ setup();
writeStatus("Check calendar panel has been rendered");
Assert.assertTrue(isVisible(calendarId), "Calendar panel is not visible");
@@ -410,7 +455,7 @@
setValueById(selectedDateId, expectedSelectedDate);
setValueById(currentDateId, "");
- clickCommandAndWait(setupActionId);
+ setup();
writeStatus("Check selected date");
date = selenium.getText(dateSelectionXpath);
@@ -426,7 +471,7 @@
writeStatus("Check whether the component is present and up to the mark if value and currentDate are not defined");
setValueById(selectedDateId, "");
setValueById(currentDateId, "");
- clickCommandAndWait(setupActionId);
+ setup();
writeStatus("Selected date is null. Selected value panel is not visible");
Assert.assertFalse(isVisible(dateSelectionXpath), "Footer with selected date has to be invisible");
@@ -448,6 +493,15 @@
runScript("$('" + isPopupId + "').checked=" + isPopup);
}
+ private void setup() {
+ clickCommandAndWait(setupActionId);
+ }
+
+ private void showPopup() {
+ writeStatus("Show popup");
+ clickById(popupButtonId);
+ }
+
public String getTestUrl() {
return "pages/calendar/calendarTest.xhtml";
}
16 years, 1 month
JBoss Rich Faces SVN: r11552 - trunk/test-applications/seleniumTest.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-12-04 10:50:54 -0500 (Thu, 04 Dec 2008)
New Revision: 11552
Modified:
trunk/test-applications/seleniumTest/pom.xml
Log:
RF-5197
only for test
Modified: trunk/test-applications/seleniumTest/pom.xml
===================================================================
--- trunk/test-applications/seleniumTest/pom.xml 2008-12-04 15:48:40 UTC (rev 11551)
+++ trunk/test-applications/seleniumTest/pom.xml 2008-12-04 15:50:54 UTC (rev 11552)
@@ -15,7 +15,7 @@
<version>3.3.0-SNAPSHOT</version>
<url>http://maven.apache.org</url>
<properties>
- <http.port>8085</http.port>
+ <http.port>8080</http.port>
</properties>
<repositories>
<repository>
16 years, 1 month
JBoss Rich Faces SVN: r11551 - in trunk/ui/editor/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-12-04 10:48:40 -0500 (Thu, 04 Dec 2008)
New Revision: 11551
Modified:
trunk/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java
trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js
Log:
https://jira.jboss.org/jira/browse/RF-5195
Modified: trunk/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java
===================================================================
--- trunk/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java 2008-12-04 15:43:48 UTC (rev 11550)
+++ trunk/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java 2008-12-04 15:48:40 UTC (rev 11551)
@@ -326,23 +326,23 @@
+ ";\n", null);
}
if (component.getOninit() != null && component.getOninit().length() > 0) {
- writer.writeText("tinyMceParams.oninit = function () {\n"
+ writer.writeText("tinyMceParams.oninit = function (event) {\n"
+ component.getOninit() + "\n" + "};\n", null);
}
if (component.getOnsave() != null && component.getOnsave().length() > 0) {
writer.writeText(
- "tinyMceParams.save_callback = function (element_id, html, body) {\n"
+ "tinyMceParams.save_callback = function (event, element_id, html, body) {\n"
+ component.getOnsave() + "\n" + "};\n", null);
}
if (component.getOnchange() != null
&& component.getOnchange().length() > 0) {
writer.writeText(
- "tinyMceParams.onchange_callback = function (inst) {\n"
+ "tinyMceParams.onchange_callback = function (event, inst) {\n"
+ component.getOnchange() + "\n" + "};\n", null);
}
if (component.getOnsetup() != null
&& component.getOnsetup().length() > 0) {
- writer.writeText("tinyMceParams.setup = function (ed) {\n"
+ writer.writeText("tinyMceParams.setup = function (event, ed) {\n"
+ component.getOnsetup() + "\n" + "};\n", null);
}
Modified: trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js
===================================================================
--- trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js 2008-12-04 15:43:48 UTC (rev 11550)
+++ trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js 2008-12-04 15:48:40 UTC (rev 11551)
@@ -23,13 +23,21 @@
this.synchronizeConfiguration();
this.tinyMCE_editor = null;
- this.onInitInstanceCallbackFunction = this.tinyparams.onInitInstanceCallback;
-
+ this.onInitInstanceCallbackFunction = this.tinyparams.init_instance_callback;
+ this.onChangeCallbackFunction = this.tinyparams.onchange_callback;
+ this.onInitCallbackFunction = this.tinyparams.oninit;
+ this.onSaveCallbackFunction = this.tinyparams.save_callback;
+ this.onSetupCallbackFunction = this.tinyparams.setup;
+
this.tinyparams.mode = 'exact';
this.tinyparams.elements = this.editorTextAreaId;
this.tinyparams.editor_selector = null;
this.tinyparams.editor_deselector = null;
this.tinyparams.init_instance_callback = this.onInitInstanceCallback.bind(this);
+ this.tinyparams.onchange_callback = this.onChangeCallback.bind(this);
+ this.tinyparams.oninit = this.onInitCallback.bind(this);
+ this.tinyparams.save_callback = this.onSaveCallback.bind(this);
+ this.tinyparams.setup = this.onSetupCallback.bind(this);
tinyMCE.init(this.tinyparams);
@@ -56,6 +64,26 @@
if (this.onInitInstanceCallbackFunction) this.onInitInstanceCallbackFunction.call(this, inst);
},
+ onChangeCallback: function(inst) {
+ this.invokeEvent(this.onChangeCallbackFunction, $A(arguments));
+ },
+
+ onInitCallback: function() {
+ this.invokeEvent(this.onInitCallbackFunction, $A(arguments));
+ },
+
+ onSaveCallback: function(element_id, html, body) {
+ if(this.onSaveCallbackFunction){
+ return this.invokeEvent(this.onSaveCallbackFunction, $A(arguments));
+ }else{
+ return html;
+ }
+ },
+
+ onSetupCallback: function(ed) {
+ this.invokeEvent(this.onSetupCallbackFunction, $A(arguments));
+ },
+
synchronizeConfiguration: function(){
if(this.params.useSeamText){
this.tinyparams.plugins = Richfaces.Editor.SeamTextConfiguration.plugins;
@@ -69,9 +97,30 @@
//this.tinyparams.theme_advanced_buttons3 = Richfaces.Editor.SeamTextConfiguration.theme_advanced_buttons3;
//this.tinyparams.theme_advanced_buttons4 = Richfaces.Editor.SeamTextConfiguration.theme_advanced_buttons4;
}
+ },
+
+ invokeEvent: function(callback, args){
+ if (!callback) return;
+ var eventObj;
+ var result;
+
+ if( document.createEventObject ) {
+ eventObj = document.createEventObject();
+ } else if( document.createEvent ) {
+ eventObj = document.createEvent('Events');
+ eventObj.initEvent( callback + 'Event', true, false );
+ }
+
+ eventObj.rich = {component:this, tinyMceInstance: this.tinyMCE_editor};
+ args.unshift(eventObj);
+
+ try {
+ result = callback.apply(this, args);
+ } catch (e) {
+ LOG.warn("Exception: " + e.Message + "\n[on " + callback + " ]");
+ }
+ return result;
}
-
-
});
Richfaces.Editor.SeamTextConfiguration = {
16 years, 1 month
JBoss Rich Faces SVN: r11550 - in trunk/test-applications/jsp/src/main: java/rich and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-12-04 10:43:48 -0500 (Thu, 04 Dec 2008)
New Revision: 11550
Added:
trunk/test-applications/jsp/src/main/java/tTree/
trunk/test-applications/jsp/src/main/java/tTree/PVisability.java
trunk/test-applications/jsp/src/main/java/tTree/TTree.java
trunk/test-applications/jsp/src/main/java/tTree/TTreeNA.java
trunk/test-applications/jsp/src/main/java/tTree/TTreeRNA.java
trunk/test-applications/jsp/src/main/java/tTree/data/
trunk/test-applications/jsp/src/main/java/tTree/data/Dir.java
trunk/test-applications/jsp/src/main/java/tTree/data/Package.java
trunk/test-applications/jsp/src/main/java/tTree/data/Project.java
trunk/test-applications/jsp/src/main/java/tTree/pom_sample.xml
trunk/test-applications/jsp/src/main/java/tTree/test.xml
trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-tTree.xml
trunk/test-applications/jsp/src/main/webapp/tTree/
trunk/test-applications/jsp/src/main/webapp/tTree/tTree.jsp
trunk/test-applications/jsp/src/main/webapp/tTree/tTreeProperty.jsp
trunk/test-applications/jsp/src/main/webapp/tTree/tTreeStraightforward.jsp
Modified:
trunk/test-applications/jsp/src/main/java/rich/RichBean.java
trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml
Log:
Modified: trunk/test-applications/jsp/src/main/java/rich/RichBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/rich/RichBean.java 2008-12-04 15:36:47 UTC (rev 11549)
+++ trunk/test-applications/jsp/src/main/java/rich/RichBean.java 2008-12-04 15:43:48 UTC (rev 11550)
@@ -74,6 +74,7 @@
map.add("DataGrid", add("/DataGrid/DataGrid", new boolean [] {false, true, false}));
map.add("ExtendedDataTable", add("/ExtendedDataTable/ExtendedDataTable", new boolean [] {false, true, false}));
map.add("Editor", add("/Editor/Editor", new boolean [] {true, true, false}));
+ map.add("tTree", add("/tTree/tTree", new boolean [] {true, true, true}));
map.add("Queue", add("/Queue/Queue", new boolean [] {false, true, true}));
Iterator<String> iterator = map.getSet().iterator();
while(iterator.hasNext()){
Added: trunk/test-applications/jsp/src/main/java/tTree/PVisability.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/tTree/PVisability.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/tTree/PVisability.java 2008-12-04 15:43:48 UTC (rev 11550)
@@ -0,0 +1,38 @@
+package tTree;
+
+public class PVisability {
+ private boolean tTreeSubviewID;
+ private boolean tTreePropertySubviewID;
+ private boolean tTreeStraightforwardSubviewID;
+
+ public PVisability() {
+ tTreeSubviewID = true;
+ tTreePropertySubviewID = false;
+ tTreeStraightforwardSubviewID = false;
+ }
+
+ public boolean istTreeSubviewID() {
+ return tTreeSubviewID;
+ }
+
+ public void settTreeSubviewID(boolean treeSubviewID) {
+ tTreeSubviewID = treeSubviewID;
+ }
+
+ public boolean istTreePropertySubviewID() {
+ return tTreePropertySubviewID;
+ }
+
+ public void settTreePropertySubviewID(boolean treePropertySubviewID) {
+ tTreePropertySubviewID = treePropertySubviewID;
+ }
+
+ public boolean istTreeStraightforwardSubviewID() {
+ return tTreeStraightforwardSubviewID;
+ }
+
+ public void settTreeStraightforwardSubviewID(
+ boolean treeStraightforwardSubviewID) {
+ tTreeStraightforwardSubviewID = treeStraightforwardSubviewID;
+ }
+}
Added: trunk/test-applications/jsp/src/main/java/tTree/TTree.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/tTree/TTree.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/tTree/TTree.java 2008-12-04 15:43:48 UTC (rev 11550)
@@ -0,0 +1,61 @@
+package tTree;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Map;
+import org.richfaces.component.UITree;
+import org.richfaces.component.xml.XmlTreeDataBuilder;
+import org.richfaces.model.TreeNode;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+public class TTree {
+ private String switchType = "server";
+ private TreeNode data;
+ private UITree tree;
+
+ public TTree() {
+ try {
+ data = XmlTreeDataBuilder.build(new InputSource(getClass()
+ .getResourceAsStream("test.xml")));
+
+ TreeNode pomData = XmlTreeDataBuilder.build(new InputSource(
+ getClass().getResourceAsStream("pom_sample.xml")));
+
+ Iterator children = pomData.getChildren();
+ while (children.hasNext()) {
+ Map.Entry entry = (Map.Entry) children.next();
+ data.addChild(new Long(1), (TreeNode) entry.getValue());
+ }
+
+ } catch (SAXException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public String getSwitchType() {
+ return switchType;
+ }
+
+ public void setSwitchType(String switchType) {
+ this.switchType = switchType;
+ }
+
+ public TreeNode getData() {
+ return data;
+ }
+
+ public void setData(TreeNode data) {
+ this.data = data;
+ }
+
+ public UITree getTree() {
+ return tree;
+ }
+
+ public void setTree(UITree tree) {
+ this.tree = tree;
+ }
+}
Added: trunk/test-applications/jsp/src/main/java/tTree/TTreeNA.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/tTree/TTreeNA.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/tTree/TTreeNA.java 2008-12-04 15:43:48 UTC (rev 11550)
@@ -0,0 +1,38 @@
+package tTree;
+
+import java.util.ArrayList;
+
+import tTree.data.Dir;
+import tTree.data.Package;
+import tTree.data.Project;
+
+public class TTreeNA {
+ private ArrayList<Project> treeNA;
+
+ public TTreeNA() {
+ treeNA = new ArrayList<Project>();
+ ArrayList<Dir> dirsArr = new ArrayList<Dir>();
+ ArrayList<Package> packArr = new ArrayList<Package>();
+
+ treeNA.clear();
+ for (int i = 0; i < 3; i++) {
+ dirsArr.clear();
+ for (int j = 0; j < 4; j++) {
+ packArr.clear();
+ for (int k = 0; k < 5; k++) {
+ packArr.add(new Package("package #" + i + " " + j + " " + k));
+ }
+ dirsArr.add(new Dir("dir #" + i + " " + j, new ArrayList<Package>(packArr)));
+ }
+ treeNA.add(new Project("project #" + i, new ArrayList<Dir>(dirsArr)));
+ }
+ }
+
+ public ArrayList<Project> getTreeNA() {
+ return treeNA;
+ }
+
+ public void setTreeNA(ArrayList<Project> treeNA) {
+ this.treeNA = treeNA;
+ }
+}
Added: trunk/test-applications/jsp/src/main/java/tTree/TTreeRNA.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/tTree/TTreeRNA.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/tTree/TTreeRNA.java 2008-12-04 15:43:48 UTC (rev 11550)
@@ -0,0 +1,47 @@
+package tTree;
+
+import java.util.ArrayList;
+
+import tTree.data.Dir;
+import tTree.data.Package;
+
+public class TTreeRNA {
+ private ArrayList<Dir> treeRNAroots;
+
+ public TTreeRNA() {
+ treeRNAroots = new ArrayList<Dir>();
+ ArrayList<Dir> dirsArr = new ArrayList<Dir>();
+ ArrayList<Dir> subDirsArr = new ArrayList<Dir>();
+ ArrayList<Package> packArr = new ArrayList<Package>();
+ ArrayList<Package> subPackArr = new ArrayList<Package>();
+
+ treeRNAroots.clear();
+ for (int i = 0; i < 3; i++) {
+ dirsArr.clear();
+ for (int j = 0; j < 4; j++) {
+ packArr.clear();
+ subDirsArr.clear();
+ for (int k = 0; k < 5; k++) {
+ packArr.add(new Package("package #" + i + " " + j + " " + k));
+ }
+ for (int f = 0; f < 4; f++) {
+ subPackArr.clear();
+ for (int l = 0; l < 5; l++) {
+ subPackArr.add(new Package("subPackage #" + i + " " + j + " "+ f + " " + l));
+ }
+ subDirsArr.add(new Dir("subDir #" + i + " " + j + " " + f, new ArrayList<Package>(subPackArr)));
+ }
+ dirsArr.add(new Dir("dir #" + i + " " + j, new ArrayList<Package>(packArr), new ArrayList<Dir>(subDirsArr)));
+ }
+ }
+ treeRNAroots.addAll(dirsArr);
+ }
+
+ public ArrayList<Dir> getTreeRNAroots() {
+ return treeRNAroots;
+ }
+
+ public void setTreeRNAroots(ArrayList<Dir> treeRNAroots) {
+ this.treeRNAroots = treeRNAroots;
+ }
+}
Added: trunk/test-applications/jsp/src/main/java/tTree/data/Dir.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/tTree/data/Dir.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/tTree/data/Dir.java 2008-12-04 15:43:48 UTC (rev 11550)
@@ -0,0 +1,44 @@
+package tTree.data;
+
+import java.util.ArrayList;
+
+public class Dir {
+ private String name;
+ private ArrayList<Package> packages;
+ private ArrayList<Dir> dirs;
+
+ public Dir(String name, ArrayList<Package> packages) {
+ this.name = name;
+ this.packages = packages;
+ }
+
+ public Dir(String name, ArrayList<Package> packages, ArrayList<Dir> dirs) {
+ this.name = name;
+ this.packages = packages;
+ this.dirs = dirs;
+ }
+
+ public ArrayList<Dir> getDirs() {
+ return dirs;
+ }
+
+ public void setDirs(ArrayList<Dir> dirs) {
+ this.dirs = dirs;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public ArrayList<Package> getPackages() {
+ return packages;
+ }
+
+ public void setPackages(ArrayList<Package> packages) {
+ this.packages = packages;
+ }
+}
Added: trunk/test-applications/jsp/src/main/java/tTree/data/Package.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/tTree/data/Package.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/tTree/data/Package.java 2008-12-04 15:43:48 UTC (rev 11550)
@@ -0,0 +1,17 @@
+package tTree.data;
+
+public class Package {
+ private String name;
+
+ public Package(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
Added: trunk/test-applications/jsp/src/main/java/tTree/data/Project.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/tTree/data/Project.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/tTree/data/Project.java 2008-12-04 15:43:48 UTC (rev 11550)
@@ -0,0 +1,29 @@
+package tTree.data;
+
+import java.util.ArrayList;
+
+public class Project {
+ private String name;
+ private ArrayList<Dir> srcDirs;
+
+ public Project(String name, ArrayList<Dir> srcDirs) {
+ this.name = name;
+ this.srcDirs = srcDirs;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public ArrayList<Dir> getSrcDirs() {
+ return srcDirs;
+ }
+
+ public void setSrcDirs(ArrayList<Dir> srcDirs) {
+ this.srcDirs = srcDirs;
+ }
+}
Added: trunk/test-applications/jsp/src/main/java/tTree/pom_sample.xml
===================================================================
--- trunk/test-applications/jsp/src/main/java/tTree/pom_sample.xml (rev 0)
+++ trunk/test-applications/jsp/src/main/java/tTree/pom_sample.xml 2008-12-04 15:43:48 UTC (rev 11550)
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces</groupId>
+ <artifactId>tree</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.ajax4jsf.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <library>
+ <prefix>org.richfaces</prefix>
+ <taglib>
+ <shortName>tree</shortName>
+ </taglib>
+ </library>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <repositories>
+ <repository>
+ <releases />
+ <snapshots>
+ <enabled>false</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ <id>maven2-repository.dev.java.net</id>
+ <name>Java.net Repository for Maven</name>
+ <url>https://maven2-repository.dev.java.net/nonav/repository</url>
+ </repository>
+ <repository>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <updatePolicy>always</updatePolicy>
+ </snapshots>
+ <id>maven2-snapshots.ajax4jsf.org</id>
+ <name>Ajax4jsf Repository for Maven Snapshots</name>
+ <url>https://ajax4jsf.dev.java.net/nonav/snapshots</url>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <updatePolicy>always</updatePolicy>
+ </snapshots>
+ <id>maven2-snapshots.ajax4jsf.org</id>
+ <name>Ajax4jsf Repository for Maven Snapshots</name>
+ <url>https://ajax4jsf.dev.java.net/nonav/snapshots</url>
+ </pluginRepository>
+ </pluginRepositories>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.facelets</groupId>
+ <artifactId>jsf-facelets</artifactId>
+ <version>1.1.6</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>1.1_02</version>
+ </dependency>
+ <dependency>
+ <groupId>org.ajax4jsf</groupId>
+ <artifactId>framework</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Added: trunk/test-applications/jsp/src/main/java/tTree/test.xml
===================================================================
--- trunk/test-applications/jsp/src/main/java/tTree/test.xml (rev 0)
+++ trunk/test-applications/jsp/src/main/java/tTree/test.xml 2008-12-04 15:43:48 UTC (rev 11550)
@@ -0,0 +1,74 @@
+<?xml version="1.0"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <description>RF Test-Application</description>
+ <display-name>test-application</display-name>
+ <context-param>
+ <param-name>org.ajax4jsf.SKIN</param-name>
+ <param-value>#{skinBean.skin}</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.REFRESH_PERIOD</param-name>
+ <param-value>2</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>client</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.verifyObjects</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.CONFIG_FILES</param-name>
+ <param-value>/WEB-INF/faces-config-RichPanelsBean.xml,/WEB-INF/faces-config-DataTable.xml,/WEB-INF/faces-config-SimpleTogglePanel.xml,
+ /WEB-INF/faces-config-Panel.xml,/WEB-INF/faces-config-PanelBar.xml,/WEB-INF/faces-config-TabPanel.xml,
+ /WEB-INF/faces-config-TogglePanel.xml,/WEB-INF/faces-config-Paint2D.xml,/WEB-INF/faces-config-InputNumberSlider.xml,
+ /WEB-INF/faces-config-InputNumberSpinner.xml,/WEB-INF/faces-config-DDMenu.xml,/WEB-INF/faces-config-Tree.xml,
+ /WEB-INF/faces-config-PanelMenu.xml,/WEB-INF/faces-config-Icon.xml,/WEB-INF/faces-config-ModalPanel.xml,
+ /WEB-INF/faces-config-tooltip.xml,/WEB-INF/faces-config-Skin.xml,/WEB-INF/faces-config-Calendar.xml,
+ /WEB-INF/faces-config-Gmap.xml,/WEB-INF/faces-config-DataFilterSlider.xml,/WEB-INF/faces-config-Separator.xml,
+ /WEB-INF/faces-config-Spacer.xml,/WEB-INF/faces-config-ToolBar.xml,/WEB-INF/faces-config-DataScroller.xml,
+ /WEB-INF/faces-config-SuggestionBox.xml,/WEB-INF/faces-config-Message.xml,
+ /WEB-INF/faces-config-VirtualEarth.xml,/WEB-INF/faces-config-Effect.xml,/WEB-INF/faces-config-Insert.xml,
+ /WEB-INF/faces-config-RichBean.xml,/WEB-INF/faces-config-ScrollableDataTable.xml,
+ /WEB-INF/faces-config-RichTest.xml,/WEB-INF/faces-config-jQuery.xml,/WEB-INF/faces-config-DragAndDrop.xml,
+ /WEB-INF/faces-config-OrderingList.xml,/WEB-INF/faces-config-DataOrderedList.xml,/WEB-INF/faces-config-DataDefinitionList.xml</param-value>
+ </context-param>
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Added: trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-tTree.xml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-tTree.xml (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-tTree.xml 2008-12-04 15:43:48 UTC (rev 11550)
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
+<faces-config>
+ <managed-bean>
+ <managed-bean-name>tTree</managed-bean-name>
+ <managed-bean-class>tTree.TTree</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>pVisability</managed-bean-name>
+ <managed-bean-class>tTree.PVisability</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>tTreeNA</managed-bean-name>
+ <managed-bean-class>tTree.TTreeNA</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>tTreeRNA</managed-bean-name>
+ <managed-bean-class>tTree.TTreeRNA</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+</faces-config>
Modified: trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml 2008-12-04 15:36:47 UTC (rev 11549)
+++ trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml 2008-12-04 15:43:48 UTC (rev 11550)
@@ -197,7 +197,7 @@
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>
- /WEB-INF/faces-config-Queue.xml,/WEB-INF/faces-config-Editor.xml,/WEB-INF/faces-config-ExtendedDataTable.xml,/WEB-INF/faces-config-DataGrid.xml,/WEB-INF/faces-config-Validator.xml,/WEB-INF/faces-config-ComponentInfo.xml,/WEB-INF/faces-config-HotKey.xml,/WEB-INF/faces-config-DataTable.xml,/WEB-INF/faces-config-SimpleTogglePanel.xml,/WEB-INF/faces-config-Panel.xml,/WEB-INF/faces-config-PanelBar.xml,/WEB-INF/faces-config-TabPanel.xml,/WEB-INF/faces-config-TogglePanel.xml,/WEB-INF/faces-config-Paint2D.xml,/WEB-INF/faces-config-InputNumberSlider.xml,/WEB-INF/faces-config-InputNumberSpinner.xml,/WEB-INF/faces-config-DDMenu.xml,/WEB-INF/faces-config-Tree.xml,/WEB-INF/faces-config-PanelMenu.xml,/WEB-INF/faces-config-Icon.xml,/WEB-INF/faces-config-ModalPanel.xml,/WEB-INF/faces-config-tooltip.xml,/WEB-INF/faces-config-Skin.xml,/WEB-INF/faces-config-Calendar.xml,/WEB-INF/faces-config-Gmap.xml,/WEB-INF/faces-config-DataFilterSlider.xml,/WEB-INF/faces-config-Separator.xml,/WEB-INF/fa!
ces-config-Spacer.xml,/WEB-INF/faces-config-ToolBar.xml,/WEB-INF/faces-config-DataScroller.xml,/WEB-INF/faces-config-SuggestionBox.xml,/WEB-INF/faces-config-Message.xml,/WEB-INF/faces-config-VirtualEarth.xml,/WEB-INF/faces-config-Effect.xml,/WEB-INF/faces-config-Insert.xml,/WEB-INF/faces-config-RichBean.xml,/WEB-INF/faces-config-RichTest.xml,/WEB-INF/faces-config-ScrollableDataTable.xml,/WEB-INF/faces-config-jQuery.xml,/WEB-INF/faces-config-DragAndDrop.xml,/WEB-INF/faces-config-OrderingList.xml,/WEB-INF/faces-config-DataOrderedList.xml,/WEB-INF/faces-config-DataDefinitionList.xml,/WEB-INF/faces-config-ContextMenu.xml,/WEB-INF/faces-config-ListShuttle.xml,/WEB-INF/faces-config-Converter.xml,/WEB-INF/faces-config-ComponentControl.xml,/WEB-INF/faces-config-Columns.xml,/WEB-INF/faces-config-PickList.xml,/WEB-INF/faces-config-Combobox.xml,/WEB-INF/faces-config-PTComponent.xml,/WEB-INF/faces-config-Event.xml,/WEB-INF/faces-config-ProgressBar.xml,/WEB-INF/faces-config-Options.xml,!
/WEB-INF/faces-config-SortingAndFiltering.xml,/WEB-INF/faces-config-St
yle.xml,/WEB-INF/faces-config-FileUpload.xml,/WEB-INF/faces-config-InplaceSelect.xml,/WEB-INF/faces-config-InplaceInput.xml,/WEB-INF/faces-config-Skinning.xml,/WEB-INF/faces-config-Custom.xml
+ /WEB-INF/faces-config-tTree.xml,/WEB-INF/faces-config-Queue.xml,/WEB-INF/faces-config-Editor.xml,/WEB-INF/faces-config-ExtendedDataTable.xml,/WEB-INF/faces-config-DataGrid.xml,/WEB-INF/faces-config-Validator.xml,/WEB-INF/faces-config-ComponentInfo.xml,/WEB-INF/faces-config-HotKey.xml,/WEB-INF/faces-config-DataTable.xml,/WEB-INF/faces-config-SimpleTogglePanel.xml,/WEB-INF/faces-config-Panel.xml,/WEB-INF/faces-config-PanelBar.xml,/WEB-INF/faces-config-TabPanel.xml,/WEB-INF/faces-config-TogglePanel.xml,/WEB-INF/faces-config-Paint2D.xml,/WEB-INF/faces-config-InputNumberSlider.xml,/WEB-INF/faces-config-InputNumberSpinner.xml,/WEB-INF/faces-config-DDMenu.xml,/WEB-INF/faces-config-Tree.xml,/WEB-INF/faces-config-PanelMenu.xml,/WEB-INF/faces-config-Icon.xml,/WEB-INF/faces-config-ModalPanel.xml,/WEB-INF/faces-config-tooltip.xml,/WEB-INF/faces-config-Skin.xml,/WEB-INF/faces-config-Calendar.xml,/WEB-INF/faces-config-Gmap.xml,/WEB-INF/faces-config-DataFilterSlider.xml,/WEB-INF/faces-!
config-Separator.xml,/WEB-INF/faces-config-Spacer.xml,/WEB-INF/faces-config-ToolBar.xml,/WEB-INF/faces-config-DataScroller.xml,/WEB-INF/faces-config-SuggestionBox.xml,/WEB-INF/faces-config-Message.xml,/WEB-INF/faces-config-VirtualEarth.xml,/WEB-INF/faces-config-Effect.xml,/WEB-INF/faces-config-Insert.xml,/WEB-INF/faces-config-RichBean.xml,/WEB-INF/faces-config-RichTest.xml,/WEB-INF/faces-config-ScrollableDataTable.xml,/WEB-INF/faces-config-jQuery.xml,/WEB-INF/faces-config-DragAndDrop.xml,/WEB-INF/faces-config-OrderingList.xml,/WEB-INF/faces-config-DataOrderedList.xml,/WEB-INF/faces-config-DataDefinitionList.xml,/WEB-INF/faces-config-ContextMenu.xml,/WEB-INF/faces-config-ListShuttle.xml,/WEB-INF/faces-config-Converter.xml,/WEB-INF/faces-config-ComponentControl.xml,/WEB-INF/faces-config-Columns.xml,/WEB-INF/faces-config-PickList.xml,/WEB-INF/faces-config-Combobox.xml,/WEB-INF/faces-config-PTComponent.xml,/WEB-INF/faces-config-Event.xml,/WEB-INF/faces-config-ProgressBar.xml,/W!
EB-INF/faces-config-Options.xml,/WEB-INF/faces-config-SortingAndFilter
ing.xml,/WEB-INF/faces-config-Style.xml,/WEB-INF/faces-config-FileUpload.xml,/WEB-INF/faces-config-InplaceSelect.xml,/WEB-INF/faces-config-InplaceInput.xml,/WEB-INF/faces-config-Skinning.xml,/WEB-INF/faces-config-Custom.xml
</param-value>
</context-param>
Added: trunk/test-applications/jsp/src/main/webapp/tTree/tTree.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/tTree/tTree.jsp (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/tTree/tTree.jsp 2008-12-04 15:43:48 UTC (rev 11550)
@@ -0,0 +1,48 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
+
+<f:subview id="tTreeSubviewID">
+ <h:panelGrid columns="2" border="1">
+ <f:facet name="header">
+ <h:outputText value="Select tree to show: " />
+ </f:facet>
+ <h:outputText value="default Tree: " />
+ <h:selectBooleanCheckbox value="#{pVisability.tTreeSubviewID}"
+ onchange="submit();" />
+ <h:outputText value="Tree with treeNodesAdaptor: " />
+ <h:selectBooleanCheckbox value="#{pVisability.tTreePropertySubviewID}"
+ onchange="submit();" />
+ <h:outputText value="Tree with recursiveTreeNodesAdaptor: " />
+ <h:selectBooleanCheckbox
+ value="#{pVisability.tTreeStraightforwardSubviewID}"
+ onchange="submit();" />
+ </h:panelGrid>
+ <rich:spacer height="10" />
+
+ <h:panelGrid columns="1" rendered="#{pVisability.tTreeSubviewID}">
+ <rich:tree id="dTree" switchType="#{tTree.switchType}"
+ value="#{tTree.data}" var="defTree" binding="#{tTree.tree}"
+ ajaxSubmitSelection="false" immediate="false">
+
+ <rich:treeNode>
+ <h:outputText value="#{defTree} : " />
+ <h:inputText value="#{defTree.name}" />
+ </rich:treeNode>
+
+ <rich:treeNode>
+ <h:outputText value="#{defTree}" />
+ </rich:treeNode>
+ </rich:tree>
+
+ <h:panelGrid columns="2">
+ <h:outputText value="Change tree switchType:" />
+ <h:selectOneRadio value="#{tTree.switchType}" onclick="submit();">
+ <f:selectItem itemLabel="client" itemValue="client" />
+ <f:selectItem itemLabel="server" itemValue="server" />
+ <f:selectItem itemLabel="ajax" itemValue="ajax" />
+ </h:selectOneRadio>
+ </h:panelGrid>
+ </h:panelGrid>
+</f:subview>
Added: trunk/test-applications/jsp/src/main/webapp/tTree/tTreeProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/tTree/tTreeProperty.jsp (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/tTree/tTreeProperty.jsp 2008-12-04 15:43:48 UTC (rev 11550)
@@ -0,0 +1,26 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
+<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
+
+<f:subview id="tTreePropertySubviewID"
+ rendered="#{pVisability.tTreePropertySubviewID}">
+
+ <rich:tree>
+ <rich:treeNodesAdaptor nodes="#{tTreeNA.treeNA}" var="project">
+ <rich:treeNode>
+ <h:outputText value="#{project.name}" />
+ </rich:treeNode>
+ <rich:treeNodesAdaptor nodes="#{project.srcDirs}" var="dir">
+ <rich:treeNode>
+ <h:outputText value="#{dir.name}" />
+ </rich:treeNode>
+ <rich:treeNodesAdaptor nodes="#{dir.packages}" var="package">
+ <rich:treeNode>
+ <h:outputText value="#{package.name}" />
+ </rich:treeNode>
+ </rich:treeNodesAdaptor>
+ </rich:treeNodesAdaptor>
+ </rich:treeNodesAdaptor>
+ </rich:tree>
+</f:subview>
Added: trunk/test-applications/jsp/src/main/webapp/tTree/tTreeStraightforward.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/tTree/tTreeStraightforward.jsp (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/tTree/tTreeStraightforward.jsp 2008-12-04 15:43:48 UTC (rev 11550)
@@ -0,0 +1,22 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
+<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
+
+<f:subview id="tTreeStraightforwardSubviewID"
+ rendered="#{pVisability.tTreeStraightforwardSubviewID}">
+
+ <rich:tree>
+ <rich:recursiveTreeNodesAdaptor var="dir" roots="#{tTreeRNA.treeRNAroots}"
+ nodes="#{dir.dirs}">
+ <rich:treeNode>
+ <h:outputText value="#{dir.name}" />
+ </rich:treeNode>
+ <rich:treeNodesAdaptor nodes="#{dir.packages}" var="package">
+ <rich:treeNode>
+ <h:outputText value="#{package.name}" />
+ </rich:treeNode>
+ </rich:treeNodesAdaptor>
+ </rich:recursiveTreeNodesAdaptor>
+ </rich:tree>
+</f:subview>
\ No newline at end of file
16 years, 1 month
JBoss Rich Faces SVN: r11549 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-12-04 10:36:47 -0500 (Thu, 04 Dec 2008)
New Revision: 11549
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
Log:
RF-5197
only for test
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 2008-12-04 14:42:26 UTC (rev 11548)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2008-12-04 15:36:47 UTC (rev 11549)
@@ -59,7 +59,7 @@
/** Specifies the time to wait for ajax processing */
protected static final int ajaxCompletionTime = 3000;
- protected static final String serverPort = "8085";
+ protected static final String serverPort = "8080";
protected static final String WINDOW_JS_RESOLVER = "selenium.browserbot.getCurrentWindow().";
16 years, 1 month
JBoss Rich Faces SVN: r11548 - trunk/ui/orderingList/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-12-04 09:42:26 -0500 (Thu, 04 Dec 2008)
New Revision: 11548
Modified:
trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingBaseComponent.java
Log:
NPE in UIOrderingBaseComponent fixed
Modified: trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingBaseComponent.java
===================================================================
--- trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingBaseComponent.java 2008-12-04 14:41:35 UTC (rev 11547)
+++ trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingBaseComponent.java 2008-12-04 14:42:26 UTC (rev 11548)
@@ -20,7 +20,6 @@
*/
package org.richfaces.component;
-import java.beans.FeatureDescriptor;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
@@ -30,8 +29,6 @@
import java.util.List;
import java.util.Map;
-import javax.el.ELContext;
-import javax.el.ELResolver;
import javax.el.ValueExpression;
import javax.faces.FacesException;
import javax.faces.application.Application;
@@ -601,14 +598,19 @@
};
public Converter getConverterForValue(FacesContext context) {
+ Converter converter = null;
ValueExpression expression = this.getValueExpression("value");
- Class<?> containerClass = ELUtils.getContainerClass(context, expression);
-
- Converter converter = getConverterForType(context, containerClass);
- if (converter == null && String.class.equals(containerClass)) {
- converter = noOpConverter;
+
+ if (expression != null) {
+ Class<?> containerClass = ELUtils.getContainerClass(context, expression);
+
+ converter = getConverterForType(context, containerClass);
+ if (converter == null && String.class.equals(containerClass)) {
+ converter = noOpConverter;
+ }
}
+
return converter;
}
}
\ No newline at end of file
16 years, 1 month
JBoss Rich Faces SVN: r11547 - trunk/test-applications/seleniumTest/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-12-04 09:41:35 -0500 (Thu, 04 Dec 2008)
New Revision: 11547
Modified:
trunk/test-applications/seleniumTest/richfaces/pom.xml
Log:
avoid test running twice
Modified: trunk/test-applications/seleniumTest/richfaces/pom.xml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/pom.xml 2008-12-04 14:12:13 UTC (rev 11546)
+++ trunk/test-applications/seleniumTest/richfaces/pom.xml 2008-12-04 14:41:35 UTC (rev 11547)
@@ -75,7 +75,7 @@
<execution>
<phase>integration-test</phase>
<goals>
- <goal>test</goal>
+ <!--goal>test</goal-->
</goals>
<configuration>
<skip>false</skip>
16 years, 1 month
JBoss Rich Faces SVN: r11546 - in trunk/test-applications/seleniumTest/richfaces/src: test/java/org/richfaces/testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-12-04 09:12:13 -0500 (Thu, 04 Dec 2008)
New Revision: 11546
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarDataModel.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
Sub-task RF-5151
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarDataModel.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarDataModel.java 2008-12-04 13:38:46 UTC (rev 11545)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarDataModel.java 2008-12-04 14:12:13 UTC (rev 11546)
@@ -40,13 +40,15 @@
int day;
Object data;
+ Calendar calendar;
public CalendarDataModelItemImpl(Date date) {
Map<String, String> data = new HashMap<String, String>();
Calendar c = Calendar.getInstance();
c.setTime(date);
day = c.get(Calendar.DAY_OF_MONTH);
- this.data = data;
+ this.data = data;
+ this.calendar = c;
}
public Object getData() {
@@ -58,7 +60,7 @@
}
public String getStyleClass() {
- return null;
+ return "styleClass" + this.calendar.get(Calendar.MONTH) + day;
}
public Object getToolTip() {
@@ -70,7 +72,7 @@
}
public boolean isEnabled() {
- return true;
+ return day != 13;
}
}
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-04 13:38:46 UTC (rev 11545)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java 2008-12-04 14:12:13 UTC (rev 11546)
@@ -42,7 +42,7 @@
public static final String DATE_PATTERN = "MM/dd/yyyy HH:mm";
- public static final Locale LOCALE = new Locale("US");
+ public static final Locale LOCALE = Locale.US;
public static final TimeZone TIME_ZONE = TimeZone.getTimeZone("GMT+2");
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-04 13:38:46 UTC (rev 11545)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-04 14:12:13 UTC (rev 11546)
@@ -33,6 +33,8 @@
import org.testng.Assert;
import org.testng.annotations.Test;
+import com.thoughtworks.selenium.SeleniumException;
+
public class CalendarTest extends SeleniumTestBase {
static final String RESET_METHOD = "#{calendarBean.reset}";
@@ -41,6 +43,8 @@
static final String CONTROLS_FORM_ID = "_controls:";
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";
String calendarId;
@@ -140,7 +144,7 @@
void changeDate() {
String weekNumId = calendarId + "WeekNum2";
- selenium.click("//tr[@id='" + weekNumId + "']/td[@class='" + availableDayCellClass + "']");
+ selenium.click("//tr[@id='" + weekNumId + "']/td[starts-with(@class, '" + availableDayCellClass + "')]");
}
void changeCurrentDate(boolean wait4ajax) {
@@ -162,7 +166,49 @@
selenium.click(timeSelectionXpath);
}
+ void _testModelDataAppliedToClient() {
+ String currentDate = selenium.getText(dateSelectionXpath);
+ selenium.click("//table[@id='"+calendarId+"']/tbody/tr/td[text() = '13']");
+
+ if (!selenium.getText(dateSelectionXpath).equals(currentDate)) {
+ Assert.fail("Enabled attribute of data model was not applied for client data. 13th day should disabled and should force date change after click.");
+ }
+
+ Calendar c = Calendar.getInstance();
+ c.setTime(new Date());
+ int currentMonth = c.get(Calendar.MONTH);
+
+ String cellDay7StyleClass = selenium.getAttribute("//table[@id='"+calendarId+"']/tbody/tr/td[text() = '7']/@class");
+ String cellDay7ModelClass = "styleClass"+currentMonth+"7";
+ if (cellDay7StyleClass == null || cellDay7StyleClass.indexOf(cellDay7ModelClass) == -1) {
+ Assert.fail("Style class was not applied from data model to cell days. Style class for 7th day should contain [" + cellDay7ModelClass + "]. But has only + [" + cellDay7StyleClass +"]");
+ }
+
+ String cellDay5StyleClass = selenium.getAttribute("//table[@id='"+calendarId+"']/tbody/tr/td[text() = '5']/@class");
+ String cellDay5ModelClass = "styleClass"+currentMonth+"5";
+ if (cellDay5StyleClass == null || cellDay5StyleClass.indexOf(cellDay5ModelClass) == -1) {
+ Assert.fail("Style class was not applied from data model to cell days. Style class for 5th day should contain [" + cellDay5ModelClass + "]. But has only + [" + cellDay5StyleClass +"]");
+ }
+ }
+
@Test
+ public void testDataModelAttribute(Template template) {
+ renderPage(template, RESET_METHOD);
+ initIds(getParentId());
+
+ _testModelDataAppliedToClient();
+
+ try {
+ changeCurrentDate(true);
+ }catch (SeleniumException exception) {
+ Assert.fail("Celendar in ajax mode does not request for the next portion of data after current date has been changed");
+ }
+
+ _testModelDataAppliedToClient();
+
+ }
+
+ @Test
public void testTimeSelection(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -210,7 +256,7 @@
}
- //@Test
+ @Test
public void testListenersInAjaxMode(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -229,7 +275,7 @@
}
- //@Test
+ @Test
public void testListenersInClientMode(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -250,9 +296,9 @@
}
- // @Test
+ //@Test
public void testCalendarComponent(Template template) {
- renderPage(template);
+ renderPage(template);
String containerId = getParentId() + "_form:";
String calendarOpenedId = containerId + "calendar";
16 years, 1 month
JBoss Rich Faces SVN: r11545 - trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-12-04 08:38:46 -0500 (Thu, 04 Dec 2008)
New Revision: 11545
Modified:
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
Log:
https://jira.jboss.org/jira/browse/RF-3670
Modified: trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
===================================================================
--- trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2008-12-04 13:08:40 UTC (rev 11544)
+++ trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2008-12-04 13:38:46 UTC (rev 11545)
@@ -394,17 +394,17 @@
}
},
- rExpFormElements : /^(?:a|input|select|button|textarea)$/i,
- rExpHidden : /^hidden$/,
+ formElements: "|a|input|select|button|textarea|",
processAllFocusElements: function(root, callback) {
- if (root.focus &&
- // Many not visible elements have focus method, we is had to avoid processing them.
- this.rExpFormElements.test(root.tagName) &&
- !root.disabled && !this.rExpHidden.test(root.type) &&
- root.style.display != 'none') {
-
- callback.call(this, root);
+ if (root.nodeType==1) {
+ var tagName = root.tagName.toLowerCase();
+ if (root.focus &&
+ // Many not visible elements have focus method, we is had to avoid processing them.
+ this.formElements.indexOf(tagName)!=-1 &&
+ !root.disabled && root.type!="hidden") {
+ callback.call(this, root);
+ }
} else {
if (root != this.id) {
var child = root.firstChild;
@@ -419,7 +419,7 @@
},
processTabindexes: function(input) {
- if (!this.firstOutside && !(/^select$/i.test(input.tagName) && ModalPanel.disableSelects)) {
+ if (!this.firstOutside && !(input.tagName.toLowerCase()=="select" && ModalPanel.disableSelects)) {
this.firstOutside = input;
}
this.lastOutside = input;
@@ -880,7 +880,7 @@
var target = Event.element(e);
if (e && target) {
// Concret input but not entire form is a target element for onsubmit in FF
- while (target && !/^form$/i.test(target.tagName)) {
+ while (target && target.tagName.toLowerCase()!="form") {
target = target.parentNode;
}
16 years, 1 month
JBoss Rich Faces SVN: r11544 - trunk/ui/editor/src/main/antlr.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-04 08:08:40 -0500 (Thu, 04 Dec 2008)
New Revision: 11544
Modified:
trunk/ui/editor/src/main/antlr/html-seamtext.g
Log:
https://jira.jboss.org/jira/browse/RF-5108
Modified: trunk/ui/editor/src/main/antlr/html-seamtext.g
===================================================================
--- trunk/ui/editor/src/main/antlr/html-seamtext.g 2008-12-04 12:55:58 UTC (rev 11543)
+++ trunk/ui/editor/src/main/antlr/html-seamtext.g 2008-12-04 13:08:40 UTC (rev 11544)
@@ -456,7 +456,7 @@
| gt:ESCAPED_GT {append(escapeSeamText(gt, preformatted));}
| amp:ESCAPED_AMP {append(escapeSeamText(amp, preformatted));}
| qout:ESCAPED_QOUT {append(escapeSeamText(qout, preformatted));}
- | nbsp:ESCAPED_NBSP {append(nbsp.getText());}
+ | nbsp:ESCAPED_NBSP {append(" ");}
;
eof: EOF;
16 years, 1 month