JBoss Rich Faces SVN: r11270 - in trunk/test-applications/seleniumTest/richfaces/src: test/java/org/richfaces/testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-11-20 09:45:18 -0500 (Thu, 20 Nov 2008)
New Revision: 11270
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestHiddens.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TreeTest.java
Log:
https://jira.jboss.org/jira/browse/RF-4829, https://jira.jboss.org/jira/browse/RF-4830 completed
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestHiddens.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestHiddens.xhtml 2008-11-20 13:02:24 UTC (rev 11269)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestHiddens.xhtml 2008-11-20 14:45:18 UTC (rev 11270)
@@ -4,10 +4,10 @@
xmlns:rich="http://richfaces.org/rich"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
- <h:inputHidden id="_auto_input" value="#{autoTestBean.input}" required="true"></h:inputHidden>
+ <h:inputHidden id="_auto_input" value="#{autoTestBean.input}" required="true"></h:inputHidden>
<h:outputText id="_auto_status" style="display: none;" value="#{autoTestBean.status}"></h:outputText>
<h:outputText id="_auto_time" style="display: none;" value="#{autoTestBean.text}"></h:outputText>
<h:commandButton id="_auto_simple_submit" value="Simple submit" immediate="#{autoTestBean.immediate}" style="display: none;" />
<a4j:commandButton id="_auto_ajax_submit" value="Ajax submit" reRender="componentId" immediate="#{autoTestBean.immediate}" style="display: none;" />
- <a4j:commandButton id="_auto_ajax_reset" value="Ajax reset" ajaxSingle="true" style="display: none;" action="#{autoTestBean.reset}" />
+ <a4j:commandButton id="_auto_ajax_reset" value="Ajax reset" ajaxSingle="true" style="display: none;" action="#{autoTestBean.reset}" reRender="_auto_status"/>
</html>
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TreeTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TreeTest.java 2008-11-20 13:02:24 UTC (rev 11269)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TreeTest.java 2008-11-20 14:45:18 UTC (rev 11270)
@@ -128,7 +128,7 @@
tester.renderPage(template, INIT_TOGGLE_ON_CLICK_SERVER_MODE);
tester.reset();
tester.clickLoad();
- writeStatus("Try to toggle a node with server swith type");
+ writeStatus("Try to toggle a node by click with server swith type");
String compId = getAutoTester(this).getClientId(AutoTester.COMPONENT_ID);
selenium.click("//*[@id='"+ compId + ":childs']/table[1]/tbody/tr/td[3]");
waitForPageToLoad();
@@ -140,7 +140,7 @@
writeStatus("Test the same in case of external validation failure");
writeStatus("Set external validation to fail");
tester.setExtrenalValidationFailed();
- selenium.click("//*[@id='"+ compId + ":childs']/div/table[1]/tbody/tr/td[3]");
+ selenium.click("//*[@id='"+ compId + ":childs']/table[1]/tbody/tr/td[3]");
waitForPageToLoad();
writeStatus("Check the node is not collapsed and no listeners are invoked due to external validation error");
Assert.assertTrue(isPresent("//*[@id='"+ compId + ":childs']/div/table[1]/tbody/tr/td[3]"), "Node has been collapsed");
@@ -148,6 +148,54 @@
tester.checkUpdateModel(false);
}
+ @Test
+ public void testToggleOnClickTrueWithAjaxMode(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, INIT_TOGGLE_ON_CLICK_AJAX_MODE);
+ tester.reset();
+ tester.clickLoad();
+ writeStatus("Try to toggle a node by click with ajax swith type");
+ String compId = getAutoTester(this).getClientId(AutoTester.COMPONENT_ID);
+ clickAjaxCommandAndWait("//*[@id='"+ compId + ":childs']/table[1]/tbody/tr/td[3]");
+ writeStatus("Check the node is expanded and proper listeners are invoked");
+ Assert.assertTrue(isPresent("//*[@id='"+ compId + ":childs']/div/table[1]/tbody/tr/td[3]"), "Node has not been expanded");
+ tester.checkNodeExpandedListener(true);
+ tester.checkUpdateModel(true);
+ tester.startTracing();
+ writeStatus("Test the same in case of external validation failure");
+ writeStatus("Set external validation to fail");
+ tester.setExtrenalValidationFailed();
+ clickAjaxCommandAndWait("//*[@id='"+ compId + ":childs']/table[1]/tbody/tr/td[3]");
+ writeStatus("Check the node is not collapsed and no listeners are invoked thanks to external validation error");
+ Assert.assertTrue(isPresent("//*[@id='"+ compId + ":childs']/div/table[1]/tbody/tr/td[3]"), "Node has been collapsed");
+ tester.checkNodeExpandedListener(false);
+ tester.checkUpdateModel(false);
+ }
+
+ @Test
+ public void testToggleOnClickTrueWithClientMode(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, INIT_TOGGLE_ON_CLICK_CLIENT_MODE);
+ tester.reset();
+ tester.clickLoad();
+ writeStatus("Try to toggle a node by click with client swith type");
+ String compId = getAutoTester(this).getClientId(AutoTester.COMPONENT_ID);
+ selenium.click("//*[@id='"+ compId + ":childs']/table[1]/tbody/tr/td[3]");
+ writeStatus("Check the node is expanded and no listeners are invoked");
+ Assert.assertTrue(isPresent("//*[@id='"+ compId + ":childs']/div/table[1]/tbody/tr/td[3]"), "Node has not been expanded");
+ tester.checkNodeExpandedListener(false);
+ tester.checkUpdateModel(false);
+ tester.startTracing();
+ writeStatus("Test the same in case of external validation failure");
+ writeStatus("Set external validation to fail");
+ tester.setExtrenalValidationFailed();
+ selenium.click("//*[@id='"+ compId + ":childs']/table[1]/tbody/tr/td[3]");
+ writeStatus("Check the node is collapsed and no listeners are invoked anyway");
+ Assert.assertTrue(isPresent("//*[@id='"+ compId + ":childs']/div/table[1]/tbody/tr/td[3]"), "Node has not been collapsed");
+ tester.checkNodeExpandedListener(false);
+ tester.checkUpdateModel(false);
+ }
+
@Override
public void sendAjax() {
AutoTester tester = getAutoTester(this);
17 years, 5 months
JBoss Rich Faces SVN: r11269 - trunk/ui/extendedDataTable/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: pgolawski
Date: 2008-11-20 08:02:24 -0500 (Thu, 20 Nov 2008)
New Revision: 11269
Modified:
trunk/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx
Log:
removed duplicated styles and scripts includes
Modified: trunk/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx
===================================================================
--- trunk/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx 2008-11-20 13:01:27 UTC (rev 11268)
+++ trunk/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx 2008-11-20 13:02:24 UTC (rev 11269)
@@ -13,21 +13,13 @@
component="org.richfaces.component.UIExtendedDataTable"
>
<h:styles>
- css/extendedDataTable.xcss,
- css/dragIndicator.xcss,
- css/menucomponents.xcss
+ css/extendedDataTable.xcss
</h:styles>
<h:scripts>
new org.ajax4jsf.javascript.AjaxScript(),
new org.ajax4jsf.javascript.PrototypeScript(),
- new org.ajax4jsf.javascript.DnDScript(),
- /org/richfaces/renderkit/html/scripts/utils.js,
- /org/richfaces/renderkit/html/scripts/json/json-dom.js,
- /org/richfaces/renderkit/html/scripts/json/json-mini.js,
- /org/richfaces/renderkit/html/scripts/dnd/dnd-common.js,
- /org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js,
- /org/richfaces/renderkit/html/scripts/dnd/dnd-dropzone.js,
+ /org/richfaces/renderkit/html/scripts/utils.js,
/org/richfaces/renderkit/html/scripts/browser_info.js,
/org/ajax4jsf/javascript/scripts/form.js,
@@ -37,11 +29,10 @@
/org/richfaces/renderkit/html/script/controlUtils.js,
/org/richfaces/renderkit/html/scripts/common-scrollable-data-table.js,
-
/org/richfaces/renderkit/html/scripts/extended-data-table.js,
+
/org/richfaces/renderkit/html/scripts/drag-indicator.js,
/org/richfaces/renderkit/html/scripts/ext-dt-drag-indicator.js,
-
/org/richfaces/renderkit/html/scripts/ext-dt-simple-draggable.js,
/org/richfaces/renderkit/html/scripts/ext-dt-simple-dropzone.js
</h:scripts>
17 years, 5 months
JBoss Rich Faces SVN: r11268 - trunk/framework/jsf-test.
by richfaces-svn-commits@lists.jboss.org
Author: pgolawski
Date: 2008-11-20 08:01:27 -0500 (Thu, 20 Nov 2008)
New Revision: 11268
Modified:
trunk/framework/jsf-test/
Log:
added target folder to svn:ignore
Property changes on: trunk/framework/jsf-test
___________________________________________________________________
Name: svn:ignore
+ target
17 years, 5 months
JBoss Rich Faces SVN: r11267 - trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: pgolawski
Date: 2008-11-20 07:59:36 -0500 (Thu, 20 Nov 2008)
New Revision: 11267
Modified:
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDraggableRendererContributor.java
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDropzoneRendererContributor.java
Log:
do not use wrapper for all methods
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDraggableRendererContributor.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDraggableRendererContributor.java 2008-11-20 12:57:38 UTC (rev 11266)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDraggableRendererContributor.java 2008-11-20 12:59:36 UTC (rev 11267)
@@ -47,7 +47,6 @@
public void decode(FacesContext context, UIComponent component,
CompositeRenderer compositeRenderer) {
- wrappedContributor.decode(context, component, compositeRenderer);
}
public Class<?> getAcceptableClass() {
@@ -56,7 +55,7 @@
public String getScriptContribution(FacesContext context,
UIComponent component) {
- return wrappedContributor.getScriptContribution(context, component);
+ return null;
}
public String[] getScriptDependencies() {
@@ -69,7 +68,7 @@
public ScriptOptions buildOptions(FacesContext context,
UIComponent component) {
- return wrappedContributor.buildOptions(context, component);
+ return null;
}
/**
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDropzoneRendererContributor.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDropzoneRendererContributor.java 2008-11-20 12:57:38 UTC (rev 11266)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDropzoneRendererContributor.java 2008-11-20 12:59:36 UTC (rev 11267)
@@ -50,7 +50,6 @@
}
public void decode(FacesContext context, UIComponent component, CompositeRenderer compositeRenderer) {
- wrappedContributor.decode(context, component, compositeRenderer);
}
public Class<?> getAcceptableClass() {
@@ -58,7 +57,7 @@
}
public String getScriptContribution(FacesContext context, UIComponent component) {
- return wrappedContributor.getScriptContribution(context, component);
+ return null;
}
/**
17 years, 5 months
JBoss Rich Faces SVN: r11266 - trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: pgolawski
Date: 2008-11-20 07:57:38 -0500 (Thu, 20 Nov 2008)
New Revision: 11266
Modified:
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedRowsRenderer.java
Log:
added contributors for drag/drop support to composite renderer
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedRowsRenderer.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedRowsRenderer.java 2008-11-20 12:56:45 UTC (rev 11265)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedRowsRenderer.java 2008-11-20 12:57:38 UTC (rev 11266)
@@ -37,6 +37,8 @@
import org.ajax4jsf.resource.InternetResource;
import org.richfaces.component.Row;
import org.richfaces.component.UIExtendedDataTable;
+import org.richfaces.renderkit.html.ExtDraggableRendererContributor;
+import org.richfaces.renderkit.html.ExtDropzoneRendererContributor;
import org.richfaces.renderkit.html.TableSelectionRendererContributor;
/**
@@ -51,6 +53,8 @@
protected class CompositeRendererEnabler extends CompositeRenderer {
public CompositeRendererEnabler() {
addContributor(new TableSelectionRendererContributor());
+ addContributor(ExtDraggableRendererContributor.getInstance());
+ addContributor(ExtDropzoneRendererContributor.getInstance());
}
protected Class<? extends UIComponent> getComponentClass() {
17 years, 5 months
JBoss Rich Faces SVN: r11265 - trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/renderer.
by richfaces-svn-commits@lists.jboss.org
Author: pgolawski
Date: 2008-11-20 07:56:45 -0500 (Thu, 20 Nov 2008)
New Revision: 11265
Modified:
trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/renderer/ExtendedDataTableRendererTest.java
Log:
changed testLoadingStyles method: check only if needed CSS file is included, order is not important
Modified: trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/renderer/ExtendedDataTableRendererTest.java
===================================================================
--- trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/renderer/ExtendedDataTableRendererTest.java 2008-11-20 12:50:19 UTC (rev 11264)
+++ trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/renderer/ExtendedDataTableRendererTest.java 2008-11-20 12:56:45 UTC (rev 11265)
@@ -77,8 +77,15 @@
assertNotNull(page);
List links = page.getDocumentHtmlElement().getHtmlElementsByTagName("link");
assertNotNull(links);
- HtmlElement link = (HtmlElement) links.get(0);
- assertTrue(link.getAttributeValue("href").contains("css/extendedDataTable.xcss"));
+ //find extendedDataTable.xcss
+ HtmlElement link = null;
+ for (Object l : links){
+ if (((HtmlElement)l).getAttributeValue("href").contains("css/extendedDataTable.xcss")){
+ link = (HtmlElement)l;
+ break;
+ }
+ }
+ assertNotNull(link);
}
public void testLoadingScripts() throws Exception {
17 years, 5 months
JBoss Rich Faces SVN: r11264 - in trunk/test-applications/regressionArea: regressionArea-web and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-11-20 07:50:19 -0500 (Thu, 20 Nov 2008)
New Revision: 11264
Modified:
trunk/test-applications/regressionArea/regressionArea-ear/pom.xml
trunk/test-applications/regressionArea/regressionArea-web/pom.xml
Log:
RF-4924
Modified: trunk/test-applications/regressionArea/regressionArea-ear/pom.xml
===================================================================
--- trunk/test-applications/regressionArea/regressionArea-ear/pom.xml 2008-11-20 12:01:53 UTC (rev 11263)
+++ trunk/test-applications/regressionArea/regressionArea-ear/pom.xml 2008-11-20 12:50:19 UTC (rev 11264)
@@ -89,10 +89,10 @@
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam</artifactId>
</exclusion>
- <exclusion>
+ <!--exclusion>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-api</artifactId>
- </exclusion>
+ </exclusion-->
<exclusion>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
Modified: trunk/test-applications/regressionArea/regressionArea-web/pom.xml
===================================================================
--- trunk/test-applications/regressionArea/regressionArea-web/pom.xml 2008-11-20 12:01:53 UTC (rev 11263)
+++ trunk/test-applications/regressionArea/regressionArea-web/pom.xml 2008-11-20 12:50:19 UTC (rev 11264)
@@ -16,12 +16,7 @@
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-api</artifactId>
<version>${richversion}</version>
- <exclusions>
- <exclusion>
- <artifactId>commons-logging</artifactId>
- <groupId>commons-logging</groupId>
- </exclusion>
- </exclusions>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.richfaces.framework</groupId>
@@ -32,6 +27,10 @@
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
+ <exclusion>
+ <artifactId>commons-beanutils</artifactId>
+ <groupId>commons-beanutils</groupId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -208,12 +207,12 @@
src/test/resources/testng.xml
</suiteXmlFile>
</suiteXmlFiles>
- <properties>
+ <!--properties>
<property>
<name>listener</name>
<value>org.richfaces.TestAnnotationTransformer</value>
</property>
- </properties>
+ </properties-->
</configuration>
<executions>
<execution>
17 years, 5 months
JBoss Rich Faces SVN: r11263 - in trunk/test-applications/seleniumTest/richfaces/src: main/java/org/ajax4jsf/bean/validation and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-11-20 07:01:53 -0500 (Thu, 20 Nov 2008)
New Revision: 11263
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/IndexBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/validation/OrderOfDay.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/GraphValidatorTest.java
Log:
RF-4969
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/IndexBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/IndexBean.java 2008-11-20 11:37:14 UTC (rev 11262)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/IndexBean.java 2008-11-20 12:01:53 UTC (rev 11263)
@@ -100,7 +100,8 @@
list.add(new ComponentItem("<rich:dragSupport>", "dnd/dndTest.xhtml"));
list.add(new ComponentItem("<rich:dropSupport>", "dnd/dndTest.xhtml"));
list.add(new ComponentItem("<rich:effect>", "effect/effectTest.xhtml"));
-
+ list.add(new ComponentItem("<rich:graphValidator>", "graphValidator/graphValidatorTest.xhtml"));
+
sortList();
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/validation/OrderOfDay.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/validation/OrderOfDay.java 2008-11-20 11:37:14 UTC (rev 11262)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/validation/OrderOfDay.java 2008-11-20 12:01:53 UTC (rev 11263)
@@ -38,5 +38,11 @@
}
return retVal;
}
+
+ @NotNull
+ @Max(value = 10, message = "Are you sure you have power for this??!!")
+ public Integer getSportTime() {
+ return activities.get(0).getTime();
+ }
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/GraphValidatorTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/GraphValidatorTest.java 2008-11-20 11:37:14 UTC (rev 11262)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/GraphValidatorTest.java 2008-11-20 12:01:53 UTC (rev 11263)
@@ -81,6 +81,8 @@
String parentId = getParentId() + "_form1:";
String firstCompErrMsg = parentId + "table:0:time" + ERR_MSG_POSTFIX;
+ String compErrMsg3 = parentId + "table:2:time" + ERR_MSG_POSTFIX;
+
String saveBtn = parentId + SAVE_BTN;
String allMessages = parentId + ALL_MSGS;
@@ -90,17 +92,36 @@
AssertTextEquals(allMessages, "Invalid values: Please fill at least one entry");
writeStatus("Check bean properties are validated at validation phase. Type time of sport activity greater than allowed");
- spinnerManualInput("13");
+ spinnerManualInput("13", 0);
clickAjaxCommandAndWait(saveBtn);
assertPresent(firstCompErrMsg);
writeStatus("Correct the input and save data again");
- spinnerManualInput("11");
+ spinnerManualInput("9", 0);
clickAjaxCommandAndWait(saveBtn);
assertNotPresent(firstCompErrMsg);
-
AssertTextEquals(allMessages, "Changes Stored Successfully");
+
+ spinnerManualInput("17", 0);
+ spinnerManualInput("10", 1);
+ spinnerManualInput("17", 2);
+ spinnerManualInput("10", 3);
+ clickAjaxCommandAndWait(saveBtn);
+ assertPresent(firstCompErrMsg);
+ assertPresent(compErrMsg3);
+
+ spinnerManualInput("11", 0);
+ spinnerManualInput("10", 1);
+ spinnerManualInput("10", 2);
+ spinnerManualInput("10", 3);
+ clickAjaxCommandAndWait(saveBtn);
+ AssertTextEquals(allMessages, "Invalid values: Only 24h in a day!Invalid values: Are you sure you have power for this??!!", "All properties validation phase has been skipped ");
+
+ spinnerManualInput("9", 0);
+ clickAjaxCommandAndWait(saveBtn);
+ AssertTextEquals(allMessages, "Invalid values: Only 24h in a day!", "All properties validation phase has been skipped ");
+
}
private void assertPresent(String id) {
@@ -111,8 +132,8 @@
AssertTextEquals(id, "", "Message [" + id + "] must be empty on the page");
}
- private void spinnerManualInput(String value) {
- type("xpath=//table[@id='" + getParentId() + "_form1:table:0:time']/tbody/tr/td/input", value);
+ private void spinnerManualInput(String value, int n) {
+ type("xpath=//table[@id='" + getParentId() + "_form1:table:"+n+":time']/tbody/tr/td/input", value);
}
@Override
17 years, 5 months
JBoss Rich Faces SVN: r11262 - trunk/sandbox/ui/editor/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-11-20 06:37:14 -0500 (Thu, 20 Nov 2008)
New Revision: 11262
Modified:
trunk/sandbox/ui/editor/src/main/templates/editor.jspx
Log:
Editor: correct tabIndex attribute functionality
Modified: trunk/sandbox/ui/editor/src/main/templates/editor.jspx
===================================================================
--- trunk/sandbox/ui/editor/src/main/templates/editor.jspx 2008-11-20 11:28:45 UTC (rev 11261)
+++ trunk/sandbox/ui/editor/src/main/templates/editor.jspx 2008-11-20 11:37:14 UTC (rev 11262)
@@ -46,7 +46,9 @@
</jsp:scriptlet>
<div id="#{clientId}" x:passThruWithExclusions="id,value,styleClass,class"
class="rich-editor #{component.attributes['styleClass']}" style="#{component.attributes['style']}">
- <textarea id="#{clientId}TextArea" name="#{clientId}TextArea" style="#{this:getTextAreaStyle(component)}">
+ <textarea id="#{clientId}TextArea" name="#{clientId}TextArea"
+ style="#{this:getTextAreaStyle(component)}"
+ tabindex="#{component.attributes['tabindex']}">
#{this:getFormattedComponentStringValue(context, component)}
</textarea>
</div>
17 years, 5 months
JBoss Rich Faces SVN: r11261 - in trunk/sandbox/ui/editor/src/main: java/org/richfaces/component and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2008-11-20 06:28:45 -0500 (Thu, 20 Nov 2008)
New Revision: 11261
Added:
trunk/sandbox/ui/editor/src/main/java/org/richfaces/convert/seamtext/
trunk/sandbox/ui/editor/src/main/java/org/richfaces/convert/seamtext/SeamTextConverter.java
Removed:
trunk/sandbox/ui/editor/src/main/java/org/richfaces/convert/SeamTextConverter.java
Modified:
trunk/sandbox/ui/editor/src/main/config/component/editor.xml
trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java
trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java
Log:
readonly, useSeamText, autoResize now boolean instead of Boolean, move SeamTextConverter class ti the package org.richfaces.convert.seamtext, create SeamTextConverter instance then HtmlEditor instance created
Modified: trunk/sandbox/ui/editor/src/main/config/component/editor.xml
===================================================================
--- trunk/sandbox/ui/editor/src/main/config/component/editor.xml 2008-11-20 11:10:18 UTC (rev 11260)
+++ trunk/sandbox/ui/editor/src/main/config/component/editor.xml 2008-11-20 11:28:45 UTC (rev 11261)
@@ -71,7 +71,7 @@
</property>
<property>
<name>useSeamText</name>
- <classname>java.lang.Boolean</classname>
+ <classname>boolean</classname>
<description>
Attribute defines if model value should be converted to Seam Text
</description>
@@ -87,7 +87,7 @@
</property>
<property>
<name>readonly</name>
- <classname>java.lang.Boolean</classname>
+ <classname>boolean</classname>
<description>
Attribute defines Editor is readonly
</description>
@@ -101,7 +101,7 @@
</property>
<property>
<name>autoResize</name>
- <classname>java.lang.Boolean</classname>
+ <classname>boolean</classname>
<description>
Attribute enables to get the Editor area to resize to the boundaries of the contents.
</description>
Modified: trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java
===================================================================
--- trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java 2008-11-20 11:10:18 UTC (rev 11260)
+++ trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java 2008-11-20 11:28:45 UTC (rev 11261)
@@ -30,7 +30,7 @@
import javax.faces.component.UIInput;
import javax.faces.convert.Converter;
-import org.richfaces.convert.SeamTextConverter;
+import org.richfaces.convert.seamtext.SeamTextConverter;
/**
* JSF component class
@@ -47,7 +47,9 @@
/** Id suffix of textarea which used as target element for tinyMCE scripts*/
public static final String EDITOR_TEXT_AREA_ID_SUFFIX = "TextArea";
-
+
+ private SeamTextConverter defaultSeamTextConverter = new SeamTextConverter();
+
public abstract void setType(String type);
public abstract String getType();
@@ -64,10 +66,10 @@
public abstract String getTheme();
- public abstract void setUseSeamText(Boolean useSeamText);
+ public abstract void setUseSeamText(boolean useSeamText);
- public abstract Boolean getUseSeamText();
-
+ public abstract boolean isUseSeamText();
+
public abstract void setPlugins(String plugins);
public abstract String getPlugins();
@@ -96,13 +98,13 @@
public abstract String getOnsetup();
- public abstract void setAutoResize(Boolean autoResize);
+ public abstract void setAutoResize(boolean autoResize);
- public abstract Boolean getAutoResize();
+ public abstract boolean isAutoResize();
- public abstract void setReadonly(Boolean readonly);
+ public abstract void setReadonly(boolean readonly);
- public abstract Boolean getReadonly();
+ public abstract boolean isReadonly();
public abstract void setConfiguration(String configuration);
@@ -137,11 +139,10 @@
@Override
public Converter getConverter() {
Converter converter = super.getConverter();
- if (getUseSeamText() && converter == null) {
- return new SeamTextConverter();
+ if(isUseSeamText() && converter == null) {
+ converter = defaultSeamTextConverter;
}
return converter;
}
-
}
Deleted: trunk/sandbox/ui/editor/src/main/java/org/richfaces/convert/SeamTextConverter.java
===================================================================
--- trunk/sandbox/ui/editor/src/main/java/org/richfaces/convert/SeamTextConverter.java 2008-11-20 11:10:18 UTC (rev 11260)
+++ trunk/sandbox/ui/editor/src/main/java/org/richfaces/convert/SeamTextConverter.java 2008-11-20 11:28:45 UTC (rev 11261)
@@ -1,123 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/*
- * SeamTextConverter.java Date created: 26.09.2008
- * Last modified by: $Author$
- * $Revision$ $Date$
- */
-
-package org.richfaces.convert;
-
-import java.io.Reader;
-import java.io.StringReader;
-import java.lang.reflect.Constructor;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.convert.Converter;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.seam.text.SeamTextLexer;
-import org.jboss.seam.text.SeamTextParser;
-import org.richfaces.antlr.HtmlSeamTextLexer;
-import org.richfaces.antlr.HtmlSeamTextParser;
-
-import antlr.ANTLRException;
-import antlr.RecognitionException;
-import antlr.TokenStream;
-
-/**
- * Seam Text Converter class. Provides converting html to seam text and vice versa.
- *
- * @author Alexandr Levkovsky
- *
- */
-public class SeamTextConverter implements Converter {
-
- /** log4j instance for converter class */
- private static final Log _log = LogFactory.getLog(SeamTextConverter.class);
-
- /** The converter id for this converter. */
- public static final String CONVERTER_ID = SeamTextConverter.class.getName();
-
- /* (non-Javadoc)
- * @see javax.faces.convert.Converter#getAsObject(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.String)
- */
- @SuppressWarnings("unchecked")
- public Object getAsObject(FacesContext context, UIComponent component,
- String value) {
- try {
- Reader r = new StringReader(value);
- HtmlSeamTextLexer lexer = new HtmlSeamTextLexer(r);
- HtmlSeamTextParser parser = new HtmlSeamTextParser(lexer);
- parser.startRule();
- return parser.toString();
- } catch (RecognitionException rex) {
- // Log a nice message for any lexer/parser errors, users can disable
- // this if they want to
- _log.warn("Seam Text parse error: " + rex.getMessage());
- } catch (ANTLRException ex) {
- // All other errors are fatal;
- throw new RuntimeException(ex);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see javax.faces.convert.Converter#getAsString(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)
- */
- @SuppressWarnings("unchecked")
- public String getAsString(FacesContext context, UIComponent component,
- Object value) {
- if (value == null) {
- return "";
- }
-
- SeamTextParser parser = null;
-
- try {
-
- Reader r = new StringReader(value.toString());
- Class seamTextLexerClass = Class.forName("org.jboss.seam.text.SeamTextLexer");
- Class seamTextParserClass = Class.forName("org.jboss.seam.text.SeamTextParser");
- Constructor seamTextLexerConstructor = seamTextLexerClass.getConstructor(Reader.class);
- SeamTextLexer lexer = (SeamTextLexer) seamTextLexerConstructor.newInstance(new Object[] { r });
- Constructor seamTextParserConstructor = seamTextParserClass.getConstructor(TokenStream.class);
- parser = (SeamTextParser) seamTextParserConstructor.newInstance(new Object[] { lexer });
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- try {
- parser.startRule();
- } catch (RecognitionException rex) {
- // Log a nice message for any lexer/parser errors, users can disable
- // this if they want to
- _log.warn("Seam Text parse error: " + rex.getMessage());
- } catch (ANTLRException ex) {
- // All other errors are fatal;
- throw new RuntimeException(ex);
- }
- return parser.toString();
- }
-
-}
Added: trunk/sandbox/ui/editor/src/main/java/org/richfaces/convert/seamtext/SeamTextConverter.java
===================================================================
--- trunk/sandbox/ui/editor/src/main/java/org/richfaces/convert/seamtext/SeamTextConverter.java (rev 0)
+++ trunk/sandbox/ui/editor/src/main/java/org/richfaces/convert/seamtext/SeamTextConverter.java 2008-11-20 11:28:45 UTC (rev 11261)
@@ -0,0 +1,123 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * SeamTextConverter.java Date created: 26.09.2008
+ * Last modified by: $Author: alevkovsky $
+ * $Revision: 11244 $ $Date: 2008-11-19 18:45:36 +0200 (Wed, 19 Nov 2008) $
+ */
+
+package org.richfaces.convert.seamtext;
+
+import java.io.Reader;
+import java.io.StringReader;
+import java.lang.reflect.Constructor;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.seam.text.SeamTextLexer;
+import org.jboss.seam.text.SeamTextParser;
+import org.richfaces.antlr.HtmlSeamTextLexer;
+import org.richfaces.antlr.HtmlSeamTextParser;
+
+import antlr.ANTLRException;
+import antlr.RecognitionException;
+import antlr.TokenStream;
+
+/**
+ * Seam Text Converter class. Provides converting html to seam text and vice versa.
+ *
+ * @author Alexandr Levkovsky
+ *
+ */
+public class SeamTextConverter implements Converter {
+
+ /** log4j instance for converter class */
+ private static final Log _log = LogFactory.getLog(SeamTextConverter.class);
+
+ /** The converter id for this converter. */
+ public static final String CONVERTER_ID = SeamTextConverter.class.getName();
+
+ /* (non-Javadoc)
+ * @see javax.faces.convert.Converter#getAsObject(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.String)
+ */
+ @SuppressWarnings("unchecked")
+ public Object getAsObject(FacesContext context, UIComponent component,
+ String value) {
+ try {
+ Reader r = new StringReader(value);
+ HtmlSeamTextLexer lexer = new HtmlSeamTextLexer(r);
+ HtmlSeamTextParser parser = new HtmlSeamTextParser(lexer);
+ parser.startRule();
+ return parser.toString();
+ } catch (RecognitionException rex) {
+ // Log a nice message for any lexer/parser errors, users can disable
+ // this if they want to
+ _log.warn("Seam Text parse error: " + rex.getMessage());
+ } catch (ANTLRException ex) {
+ // All other errors are fatal;
+ throw new RuntimeException(ex);
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.convert.Converter#getAsString(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)
+ */
+ @SuppressWarnings("unchecked")
+ public String getAsString(FacesContext context, UIComponent component,
+ Object value) {
+ if (value == null) {
+ return "";
+ }
+
+ SeamTextParser parser = null;
+
+ try {
+
+ Reader r = new StringReader(value.toString());
+ Class seamTextLexerClass = Class.forName("org.jboss.seam.text.SeamTextLexer");
+ Class seamTextParserClass = Class.forName("org.jboss.seam.text.SeamTextParser");
+ Constructor seamTextLexerConstructor = seamTextLexerClass.getConstructor(Reader.class);
+ SeamTextLexer lexer = (SeamTextLexer) seamTextLexerConstructor.newInstance(new Object[] { r });
+ Constructor seamTextParserConstructor = seamTextParserClass.getConstructor(TokenStream.class);
+ parser = (SeamTextParser) seamTextParserConstructor.newInstance(new Object[] { lexer });
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ try {
+ parser.startRule();
+ } catch (RecognitionException rex) {
+ // Log a nice message for any lexer/parser errors, users can disable
+ // this if they want to
+ _log.warn("Seam Text parse error: " + rex.getMessage());
+ } catch (ANTLRException ex) {
+ // All other errors are fatal;
+ throw new RuntimeException(ex);
+ }
+ return parser.toString();
+ }
+
+}
Modified: trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java
===================================================================
--- trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java 2008-11-20 11:10:18 UTC (rev 11260)
+++ trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java 2008-11-20 11:28:45 UTC (rev 11261)
@@ -302,16 +302,13 @@
+ ScriptUtils.toScript(component.getLanguage()) + ";\n",
null);
}
- if (component.getAutoResize() != null) {
- writer.writeText("tinyMceParams.auto_resize = "
- + ScriptUtils.toScript(component.getAutoResize()) + ";\n",
- null);
- }
- if (component.getReadonly() != null) {
- writer.writeText("tinyMceParams.readonly = "
- + ScriptUtils.toScript(component.getReadonly()) + ";\n",
- null);
- }
+ writer.writeText("tinyMceParams.auto_resize = "
+ + ScriptUtils.toScript(component.isAutoResize()) + ";\n",
+ null);
+
+ writer.writeText("tinyMceParams.readonly = "
+ + ScriptUtils.toScript(component.isReadonly()) + ";\n",
+ null);
if (component.getPlugins() != null
&& component.getPlugins().length() > 0) {
writer.writeText("tinyMceParams.plugins = "
17 years, 5 months