JBoss Rich Faces SVN: r20707 - in branches/4.0.0.M5: cdk/generator/src/main/java/org/richfaces/cdk/apt/processors and 17 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-12-20 19:37:16 -0500 (Mon, 20 Dec 2010)
New Revision: 20707
Added:
branches/4.0.0.M5/ui/validator/ui/src/main/java/org/richfaces/view/
branches/4.0.0.M5/ui/validator/ui/src/main/java/org/richfaces/view/facelets/
branches/4.0.0.M5/ui/validator/ui/src/main/java/org/richfaces/view/facelets/html/
branches/4.0.0.M5/ui/validator/ui/src/main/java/org/richfaces/view/facelets/html/ClientValidatorHandler.java
Removed:
branches/4.0.0.M5/ui/validator/ui/src/main/java/org/richfaces/view/facelets/
branches/4.0.0.M5/ui/validator/ui/src/main/java/org/richfaces/view/facelets/html/
branches/4.0.0.M5/ui/validator/ui/src/main/java/org/richfaces/view/facelets/html/ClientValidatorHandler.java
Modified:
branches/4.0.0.M5/
branches/4.0.0.M5/cdk/generator/src/main/java/org/richfaces/cdk/apt/processors/AttributesProcessorImpl.java
branches/4.0.0.M5/cdk/generator/src/main/resources/META-INF/templates/_attribute_accessors.ftl
branches/4.0.0.M5/ui/core/ui/src/main/java/org/richfaces/view/facelets/html/AjaxHandler.java
branches/4.0.0.M5/ui/validator/ui/pom.xml
branches/4.0.0.M5/ui/validator/ui/src/main/config/faces-config.xml
branches/4.0.0.M5/ui/validator/ui/src/main/java/org/richfaces/component/behavior/ClientValidatorImpl.java
branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/component/AjaxValidationTest.java
branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/component/ClientValidationTest.java
branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/component/behavior/BehaviorGetValidatorTest.java
branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/component/behavior/BehaviorTestBase.java
branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/component/behavior/GetScriptTest.java
branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/el/TestCaptureEL.java
branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/el/ValueExpressionAnalayserTest.java
branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/converter/ConverterTestBase.java
branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/ClearMessageTest.java
branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/MessageTestBase.java
branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/validator/LengthValidatorTest.java
branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/validator/ValidatorTestBase.java
branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/renderkit/html/RendererGetClientSideScriptTest.java
branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/validator/BeanValidatorServiceConstrainsTest.java
branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/validator/FacesConverterServiceTest.java
branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/validator/FacesValidatorServiceTest.java
Log:
Merged revisions 20702-20705 via svnmerge from
https://svn.jboss.org/repos/richfaces/trunk
.......
r20702 | alexsmirnov | 2010-12-20 15:33:39 -0800 (Mon, 20 Dec 2010) | 2 lines
RESOLVED - issue RF-10063: Switch CSV to RichFaces AJAX behavior
https://issues.jboss.org/browse/RF-10063
.......
r20703 | alexsmirnov | 2010-12-20 15:48:52 -0800 (Mon, 20 Dec 2010) | 2 lines
RESOLVED - issue RF-9776: CDK: code with potential NPEs is generated
https://issues.jboss.org/browse/RF-9776
.......
r20704 | alexsmirnov | 2010-12-20 16:06:06 -0800 (Mon, 20 Dec 2010) | 2 lines
RESOLVED - issue RF-9811: CDK: attributes import errors are silently ignored
https://issues.jboss.org/browse/RF-9811
.......
r20705 | alexsmirnov | 2010-12-20 16:08:20 -0800 (Mon, 20 Dec 2010) | 2 lines
RESOLVED - issue RF-10063: Switch CSV to RichFaces AJAX behavior
https://issues.jboss.org/browse/RF-10063
.......
Property changes on: branches/4.0.0.M5
___________________________________________________________________
Name: svnmerge-integrated
- /branches/RF-7817:1-19154 /branches/RF-8742:1-19867 /branches/RF-9309:1-19112,19378 /trunk:1-20691
+ /branches/RF-7817:1-19154 /branches/RF-8742:1-19867 /branches/RF-9309:1-19112,19378 /trunk:1-20691,20702-20705
Modified: branches/4.0.0.M5/cdk/generator/src/main/java/org/richfaces/cdk/apt/processors/AttributesProcessorImpl.java
===================================================================
--- branches/4.0.0.M5/cdk/generator/src/main/java/org/richfaces/cdk/apt/processors/AttributesProcessorImpl.java 2010-12-21 00:18:05 UTC (rev 20706)
+++ branches/4.0.0.M5/cdk/generator/src/main/java/org/richfaces/cdk/apt/processors/AttributesProcessorImpl.java 2010-12-21 00:37:16 UTC (rev 20707)
@@ -237,7 +237,7 @@
} catch (CdkException e) {
log.error(e);
} catch (FileNotFoundException e) {
- log.debug("No properties description found at " + attributes);
+ log.error("No properties description found at " + attributes);
}
}
}
Modified: branches/4.0.0.M5/cdk/generator/src/main/resources/META-INF/templates/_attribute_accessors.ftl
===================================================================
--- branches/4.0.0.M5/cdk/generator/src/main/resources/META-INF/templates/_attribute_accessors.ftl 2010-12-21 00:18:05 UTC (rev 20706)
+++ branches/4.0.0.M5/cdk/generator/src/main/resources/META-INF/templates/_attribute_accessors.ftl 2010-12-21 00:37:16 UTC (rev 20707)
@@ -6,9 +6,7 @@
</#if>
public ${attribute.typeName} ${attribute.getterName}() {
- <#if attribute.typeForCasting?contains("Boolean")>
- return Boolean.valueOf(getStateHelper().eval(Properties.${propertyKey}<#if attribute.defaultValue?exists>, ${attribute.defaultValue}</#if>).toString());
- <#elseif attribute.bindingAttribute || attribute.literal >
+ <#if attribute.bindingAttribute || attribute.literal >
return (${attribute.typeForCasting}) getStateHelper().get(Properties.${propertyKey});
<#else>
return (${attribute.typeForCasting}) getStateHelper().eval(Properties.${propertyKey}<#if attribute.defaultValue?exists>, ${attribute.defaultValue}</#if>);
Modified: branches/4.0.0.M5/ui/core/ui/src/main/java/org/richfaces/view/facelets/html/AjaxHandler.java
===================================================================
--- branches/4.0.0.M5/ui/core/ui/src/main/java/org/richfaces/view/facelets/html/AjaxHandler.java 2010-12-21 00:18:05 UTC (rev 20706)
+++ branches/4.0.0.M5/ui/core/ui/src/main/java/org/richfaces/view/facelets/html/AjaxHandler.java 2010-12-21 00:37:16 UTC (rev 20707)
@@ -98,7 +98,7 @@
BehaviorStack ajaxBehaviors = BehaviorStack.getBehaviorStack(context, true);
String eventName = getEventName();
- ajaxBehaviors.pushBehavior(context, ajaxBehavior, AjaxBehavior.BEHAVIOR_ID, eventName);
+ ajaxBehaviors.pushBehavior(context, ajaxBehavior, getBehaviorId(), eventName);
AttachQueueStack attachQueueStack = AttachQueueStack.getStack(context, true);
AttachQueueInfo attachQueueInfo = new AttachQueueInfo(parent);
@@ -138,6 +138,7 @@
}
}
+
private void applyNested(FaceletContext ctx, UIComponent parent, AjaxBehavior behavior) {
if (!ComponentHandler.isNew(parent)) {
return;
Modified: branches/4.0.0.M5/ui/validator/ui/pom.xml
===================================================================
--- branches/4.0.0.M5/ui/validator/ui/pom.xml 2010-12-21 00:18:05 UTC (rev 20706)
+++ branches/4.0.0.M5/ui/validator/ui/pom.xml 2010-12-21 00:37:16 UTC (rev 20707)
@@ -74,6 +74,10 @@
<groupId>org.richfaces.ui.common</groupId>
<artifactId>richfaces-ui-common-ui</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.core</groupId>
+ <artifactId>richfaces-ui-core-ui</artifactId>
+ </dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
Modified: branches/4.0.0.M5/ui/validator/ui/src/main/config/faces-config.xml
===================================================================
--- branches/4.0.0.M5/ui/validator/ui/src/main/config/faces-config.xml 2010-12-21 00:18:05 UTC (rev 20706)
+++ branches/4.0.0.M5/ui/validator/ui/src/main/config/faces-config.xml 2010-12-21 00:37:16 UTC (rev 20707)
@@ -3,6 +3,7 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:cdk="http://jboss.org/schema/richfaces/cdk/extensions"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <!--
<behavior>
<behavior-id>org.richfaces.behavior.ClientValidator</behavior-id>
<behavior-class>org.richfaces.component.behavior.ClientValidatorImpl</behavior-class>
@@ -13,6 +14,7 @@
</cdk:tag>
</behavior-extension>
</behavior>
+ -->
<render-kit>
<client-behavior-renderer>
<client-behavior-renderer-type>org.richfaces.ClientValidatorRenderer</client-behavior-renderer-type>
Modified: branches/4.0.0.M5/ui/validator/ui/src/main/java/org/richfaces/component/behavior/ClientValidatorImpl.java
===================================================================
--- branches/4.0.0.M5/ui/validator/ui/src/main/java/org/richfaces/component/behavior/ClientValidatorImpl.java 2010-12-21 00:18:05 UTC (rev 20706)
+++ branches/4.0.0.M5/ui/validator/ui/src/main/java/org/richfaces/component/behavior/ClientValidatorImpl.java 2010-12-21 00:37:16 UTC (rev 20707)
@@ -36,7 +36,6 @@
import javax.faces.component.UIComponent;
import javax.faces.component.UIMessage;
import javax.faces.component.UIMessages;
-import javax.faces.component.behavior.AjaxBehavior;
import javax.faces.component.behavior.ClientBehaviorContext;
import javax.faces.context.FacesContext;
import javax.faces.context.PartialViewContext;
@@ -48,7 +47,11 @@
import javax.faces.validator.BeanValidator;
import javax.faces.validator.Validator;
+import org.ajax4jsf.component.behavior.AjaxBehavior;
import org.richfaces.application.ServiceTracker;
+import org.richfaces.cdk.annotations.JsfBehavior;
+import org.richfaces.cdk.annotations.Tag;
+import org.richfaces.cdk.annotations.TagType;
import org.richfaces.component.UIRichMessages;
import org.richfaces.log.Logger;
import org.richfaces.log.RichfacesLogger;
@@ -69,6 +72,7 @@
* @author asmirnov(a)exadel.com
*
*/
+@JsfBehavior(id = "org.richfaces.behavior.ClientValidator", tag = @Tag(name = "validator", handler = "org.richfaces.view.facelets.html.ClientValidatorHandler", type = TagType.Facelets))
public class ClientValidatorImpl extends AjaxBehavior implements ClientValidatorBehavior {
@@ -359,5 +363,14 @@
}
}
}
+
+ /* (non-Javadoc)
+ * @see org.richfaces.component.behavior.ClientValidatorBehavior#isImmediateSet()
+ */
+ public boolean isImmediateSet() {
+ // TODO - implement this method in RichFaces AjaxBehavior
+ return false;
+ }
+
}
Copied: branches/4.0.0.M5/ui/validator/ui/src/main/java/org/richfaces/view (from rev 20705, trunk/ui/validator/ui/src/main/java/org/richfaces/view)
Copied: branches/4.0.0.M5/ui/validator/ui/src/main/java/org/richfaces/view/facelets (from rev 20705, trunk/ui/validator/ui/src/main/java/org/richfaces/view/facelets)
Copied: branches/4.0.0.M5/ui/validator/ui/src/main/java/org/richfaces/view/facelets/html (from rev 20705, trunk/ui/validator/ui/src/main/java/org/richfaces/view/facelets/html)
Deleted: branches/4.0.0.M5/ui/validator/ui/src/main/java/org/richfaces/view/facelets/html/ClientValidatorHandler.java
===================================================================
--- trunk/ui/validator/ui/src/main/java/org/richfaces/view/facelets/html/ClientValidatorHandler.java 2010-12-21 00:08:20 UTC (rev 20705)
+++ branches/4.0.0.M5/ui/validator/ui/src/main/java/org/richfaces/view/facelets/html/ClientValidatorHandler.java 2010-12-21 00:37:16 UTC (rev 20707)
@@ -1,43 +0,0 @@
-/*
- * $Id$
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.richfaces.view.facelets.html;
-
-import javax.faces.view.facelets.BehaviorConfig;
-
-/**
- * <p class="changed_added_4_0"></p>
- * @author asmirnov(a)exadel.com
- *
- */
-public class ClientValidatorHandler extends AjaxHandler {
-
- /**
- * <p class="changed_added_4_0"></p>
- * @param config
- */
- public ClientValidatorHandler(BehaviorConfig config) {
- super(config);
- }
-
-}
Copied: branches/4.0.0.M5/ui/validator/ui/src/main/java/org/richfaces/view/facelets/html/ClientValidatorHandler.java (from rev 20705, trunk/ui/validator/ui/src/main/java/org/richfaces/view/facelets/html/ClientValidatorHandler.java)
===================================================================
--- branches/4.0.0.M5/ui/validator/ui/src/main/java/org/richfaces/view/facelets/html/ClientValidatorHandler.java (rev 0)
+++ branches/4.0.0.M5/ui/validator/ui/src/main/java/org/richfaces/view/facelets/html/ClientValidatorHandler.java 2010-12-21 00:37:16 UTC (rev 20707)
@@ -0,0 +1,43 @@
+/*
+ * $Id$
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.richfaces.view.facelets.html;
+
+import javax.faces.view.facelets.BehaviorConfig;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class ClientValidatorHandler extends AjaxHandler {
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param config
+ */
+ public ClientValidatorHandler(BehaviorConfig config) {
+ super(config);
+ }
+
+}
Modified: branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/component/AjaxValidationTest.java
===================================================================
--- branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/component/AjaxValidationTest.java 2010-12-21 00:18:05 UTC (rev 20706)
+++ branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/component/AjaxValidationTest.java 2010-12-21 00:37:16 UTC (rev 20707)
@@ -69,9 +69,9 @@
HtmlInput input = getInput(page);
input.setValueAttribute(value);
input.fireEvent("blur");
+ System.out.println(page.asXml());
HtmlElement message = page.getElementById("uiMessage");
assertThat(message.getTextContent(), matcher);
-// System.out.println(page.asXml());
}
private HtmlInput getInput(HtmlPage page) {
HtmlForm htmlForm = page.getFormByName("form");
Modified: branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/component/ClientValidationTest.java
===================================================================
--- branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/component/ClientValidationTest.java 2010-12-21 00:18:05 UTC (rev 20706)
+++ branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/component/ClientValidationTest.java 2010-12-21 00:37:16 UTC (rev 20707)
@@ -11,7 +11,6 @@
import org.jboss.test.faces.htmlunit.HtmlUnitEnvironment;
import org.junit.After;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
Modified: branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/component/behavior/BehaviorGetValidatorTest.java
===================================================================
--- branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/component/behavior/BehaviorGetValidatorTest.java 2010-12-21 00:18:05 UTC (rev 20706)
+++ branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/component/behavior/BehaviorGetValidatorTest.java 2010-12-21 00:37:16 UTC (rev 20707)
@@ -1,11 +1,8 @@
package org.richfaces.component.behavior;
-import static org.easymock.EasyMock.expect;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.*;
-import java.util.Arrays;
import java.util.Collection;
import javax.el.ValueExpression;
Modified: branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/component/behavior/BehaviorTestBase.java
===================================================================
--- branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/component/behavior/BehaviorTestBase.java 2010-12-21 00:18:05 UTC (rev 20706)
+++ branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/component/behavior/BehaviorTestBase.java 2010-12-21 00:37:16 UTC (rev 20707)
@@ -1,6 +1,6 @@
package org.richfaces.component.behavior;
-import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.*;
import javax.faces.component.UIComponent;
import javax.faces.component.UIInput;
Modified: branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/component/behavior/GetScriptTest.java
===================================================================
--- branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/component/behavior/GetScriptTest.java 2010-12-21 00:18:05 UTC (rev 20706)
+++ branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/component/behavior/GetScriptTest.java 2010-12-21 00:37:16 UTC (rev 20707)
@@ -1,15 +1,15 @@
package org.richfaces.component.behavior;
-import static org.easymock.EasyMock.expect;
-import static org.junit.Assert.assertEquals;
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.*;
import javax.faces.FacesException;
import javax.faces.component.UICommand;
import javax.faces.component.UIComponent;
import javax.faces.component.UIOutput;
-import javax.faces.component.behavior.AjaxBehavior;
import javax.faces.component.behavior.ClientBehaviorContext;
import javax.faces.render.RenderKit;
+import org.ajax4jsf.component.behavior.AjaxBehavior;
import org.jboss.test.faces.mock.Mock;
import org.jboss.test.faces.mock.MockTestRunner;
import org.jboss.test.faces.mock.Stub;
Modified: branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/el/TestCaptureEL.java
===================================================================
--- branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/el/TestCaptureEL.java 2010-12-21 00:18:05 UTC (rev 20706)
+++ branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/el/TestCaptureEL.java 2010-12-21 00:37:16 UTC (rev 20707)
@@ -1,9 +1,6 @@
package org.richfaces.el;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
+import static org.junit.Assert.*;
import javax.el.ValueExpression;
Modified: branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/el/ValueExpressionAnalayserTest.java
===================================================================
--- branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/el/ValueExpressionAnalayserTest.java 2010-12-21 00:18:05 UTC (rev 20706)
+++ branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/el/ValueExpressionAnalayserTest.java 2010-12-21 00:37:16 UTC (rev 20707)
@@ -1,7 +1,7 @@
package org.richfaces.el;
-import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.*;
import static org.junit.Assert.*;
import javax.el.ELException;
Modified: branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/converter/ConverterTestBase.java
===================================================================
--- branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/converter/ConverterTestBase.java 2010-12-21 00:18:05 UTC (rev 20706)
+++ branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/converter/ConverterTestBase.java 2010-12-21 00:37:16 UTC (rev 20707)
@@ -2,14 +2,11 @@
import static org.junit.Assert.*;
-
import javax.faces.convert.Converter;
import javax.faces.convert.ConverterException;
import org.ajax4jsf.javascript.JSFunction;
import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
import org.richfaces.javascript.client.MockTestBase;
import org.richfaces.javascript.client.RunParameters;
Modified: branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/ClearMessageTest.java
===================================================================
--- branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/ClearMessageTest.java 2010-12-21 00:18:05 UTC (rev 20706)
+++ branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/ClearMessageTest.java 2010-12-21 00:37:16 UTC (rev 20707)
@@ -28,7 +28,6 @@
import org.junit.Test;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
-import com.gargoylesoftware.htmlunit.html.HtmlPage;
/**
* <p class="changed_added_4_0"></p>
Modified: branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/MessageTestBase.java
===================================================================
--- branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/MessageTestBase.java 2010-12-21 00:18:05 UTC (rev 20706)
+++ branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/MessageTestBase.java 2010-12-21 00:37:16 UTC (rev 20707)
@@ -14,15 +14,15 @@
public class MessageTestBase {
- @Rule
- public final Qunit qunit;
-
public static final String COMPONENT = "form:component";
public static final String MY_MESSAGE = "form:uiMessage";
public static final String MESSAGE_INIT = "new RichFaces.ui.Message(\"" + MY_MESSAGE + "\", {forComponentId:\"" + COMPONENT + "\"})";
+ @Rule
+ public final Qunit qunit;
+
public MessageTestBase() {
this.qunit = createQunitPage().build();
}
Modified: branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/validator/LengthValidatorTest.java
===================================================================
--- branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/validator/LengthValidatorTest.java 2010-12-21 00:18:05 UTC (rev 20706)
+++ branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/validator/LengthValidatorTest.java 2010-12-21 00:37:16 UTC (rev 20707)
@@ -3,8 +3,6 @@
*/
package org.richfaces.javascript.client.validator;
-import static org.easymock.EasyMock.anyObject;
-
import java.util.List;
import java.util.Map;
Modified: branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/validator/ValidatorTestBase.java
===================================================================
--- branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/validator/ValidatorTestBase.java 2010-12-21 00:18:05 UTC (rev 20706)
+++ branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/validator/ValidatorTestBase.java 2010-12-21 00:37:16 UTC (rev 20707)
@@ -1,6 +1,6 @@
package org.richfaces.javascript.client.validator;
-import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.*;
import static org.junit.Assert.*;
import java.util.Collections;
@@ -12,7 +12,6 @@
import javax.faces.validator.ValidatorException;
import javax.validation.ValidationException;
-
import net.sourceforge.htmlunit.corejs.javascript.JavaScriptException;
import net.sourceforge.htmlunit.corejs.javascript.NativeObject;
@@ -26,58 +25,58 @@
public abstract class ValidatorTestBase extends MockTestBase {
private static final Converter NUMBER_CONVERTER = new Converter() {
-
- public String getAsString(FacesContext context, UIComponent component, Object value) {
-
- return String.valueOf(value);
- }
-
- public Object getAsObject(FacesContext context, UIComponent component, String value) {
- return Double.valueOf(value);
- }
- };
+ public String getAsString(FacesContext context, UIComponent component, Object value) {
+
+ return String.valueOf(value);
+ }
+
+ public Object getAsObject(FacesContext context, UIComponent component, String value) {
+ return Double.valueOf(value);
+ }
+ };
+
public ValidatorTestBase(RunParameters criteria) {
super(criteria);
}
-
@Test
public void testValidator() throws Exception {
Validator validator = createValidator();
try {
- validator.validate(facesEnvironment.getFacesContext(), component, criteria.getValue());
- validateOnClient();
+ validator.validate(facesEnvironment.getFacesContext(), component, criteria.getValue());
+ validateOnClient();
} catch (ValidatorException e) {
// client-side script has to throw exception too.
try {
validateOnClient();
- assertFalse("JSF validator throws exception for value: "+criteria.getValue(),true);
+ assertFalse("JSF validator throws exception for value: " + criteria.getValue(), true);
} catch (ScriptException e2) {
// both methods throws exceptions - it's ok.
e2.printStackTrace();
Throwable cause = e2.getCause();
assertTrue(cause instanceof JavaScriptException);
- NativeObject value = (NativeObject) ((JavaScriptException)cause).getValue();
+ NativeObject value = (NativeObject) ((JavaScriptException) cause).getValue();
assertEquals(getErrorMessage().getDetail(), value.get("detail"));
}
}
}
-
+
protected Object validateOnClient() throws ValidationException {
- JSFunction clientSideFunction = new JSFunction("RichFaces.csv." + getJavaScriptFunctionName(),criteria.getValue(),getErrorMessage(),getJavaScriptOptions());
+ JSFunction clientSideFunction =
+ new JSFunction("RichFaces.csv." + getJavaScriptFunctionName(), criteria.getValue(), getErrorMessage(),
+ getJavaScriptOptions());
return qunit.runScript(clientSideFunction.toScript());
}
-
+
protected abstract Validator createValidator();
-
@Override
protected void recordMocks() {
super.recordMocks();
expect(component.getAttributes()).andStubReturn(Collections.EMPTY_MAP);
- expect(component.getClientId(facesEnvironment.getFacesContext())).andStubReturn("testComponent");
+ expect(component.getClientId(facesEnvironment.getFacesContext())).andStubReturn("testComponent");
expect(facesEnvironment.getApplication().createConverter("javax.faces.Number")).andStubReturn(NUMBER_CONVERTER);
}
}
Modified: branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/renderkit/html/RendererGetClientSideScriptTest.java
===================================================================
--- branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/renderkit/html/RendererGetClientSideScriptTest.java 2010-12-21 00:18:05 UTC (rev 20706)
+++ branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/renderkit/html/RendererGetClientSideScriptTest.java 2010-12-21 00:37:16 UTC (rev 20707)
@@ -1,8 +1,7 @@
package org.richfaces.renderkit.html;
-import static org.easymock.EasyMock.expect;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.*;
import java.util.Collection;
import java.util.Collections;
Modified: branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/validator/BeanValidatorServiceConstrainsTest.java
===================================================================
--- branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/validator/BeanValidatorServiceConstrainsTest.java 2010-12-21 00:18:05 UTC (rev 20706)
+++ branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/validator/BeanValidatorServiceConstrainsTest.java 2010-12-21 00:37:16 UTC (rev 20707)
@@ -1,8 +1,7 @@
package org.richfaces.validator;
-import static junit.framework.Assert.assertEquals;
-import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.*;
import static org.junit.Assert.*;
import java.lang.annotation.Annotation;
Modified: branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/validator/FacesConverterServiceTest.java
===================================================================
--- branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/validator/FacesConverterServiceTest.java 2010-12-21 00:18:05 UTC (rev 20706)
+++ branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/validator/FacesConverterServiceTest.java 2010-12-21 00:37:16 UTC (rev 20707)
@@ -1,8 +1,7 @@
package org.richfaces.validator;
-import static org.easymock.EasyMock.expect;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.*;
import java.util.HashMap;
import java.util.Locale;
Modified: branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/validator/FacesValidatorServiceTest.java
===================================================================
--- branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/validator/FacesValidatorServiceTest.java 2010-12-21 00:18:05 UTC (rev 20706)
+++ branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/validator/FacesValidatorServiceTest.java 2010-12-21 00:37:16 UTC (rev 20707)
@@ -1,8 +1,7 @@
package org.richfaces.validator;
-import static org.easymock.EasyMock.expect;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.*;
import java.util.HashMap;
import java.util.Locale;
14 years
JBoss Rich Faces SVN: r20706 - branches/4.0.0.M5.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-12-20 19:18:05 -0500 (Mon, 20 Dec 2010)
New Revision: 20706
Modified:
branches/4.0.0.M5/
Log:
Initialized merge tracking via "svnmerge" with revisions "1-20691" from
https://svn.jboss.org/repos/richfaces/trunk
Property changes on: branches/4.0.0.M5
___________________________________________________________________
Name: svnmerge-integrated
- /branches/RF-7817:1-19154 /branches/RF-8742:1-19867 /branches/RF-9309:1-19112,19378
+ /branches/RF-7817:1-19154 /branches/RF-8742:1-19867 /branches/RF-9309:1-19112,19378 /trunk:1-20691
14 years
JBoss Rich Faces SVN: r20705 - in trunk/ui/validator/ui/src/main/java/org/richfaces: view and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-12-20 19:08:20 -0500 (Mon, 20 Dec 2010)
New Revision: 20705
Added:
trunk/ui/validator/ui/src/main/java/org/richfaces/view/
trunk/ui/validator/ui/src/main/java/org/richfaces/view/facelets/
trunk/ui/validator/ui/src/main/java/org/richfaces/view/facelets/html/
trunk/ui/validator/ui/src/main/java/org/richfaces/view/facelets/html/ClientValidatorHandler.java
Log:
RESOLVED - issue RF-10063: Switch CSV to RichFaces AJAX behavior
https://issues.jboss.org/browse/RF-10063
Added: trunk/ui/validator/ui/src/main/java/org/richfaces/view/facelets/html/ClientValidatorHandler.java
===================================================================
--- trunk/ui/validator/ui/src/main/java/org/richfaces/view/facelets/html/ClientValidatorHandler.java (rev 0)
+++ trunk/ui/validator/ui/src/main/java/org/richfaces/view/facelets/html/ClientValidatorHandler.java 2010-12-21 00:08:20 UTC (rev 20705)
@@ -0,0 +1,43 @@
+/*
+ * $Id$
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.richfaces.view.facelets.html;
+
+import javax.faces.view.facelets.BehaviorConfig;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class ClientValidatorHandler extends AjaxHandler {
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param config
+ */
+ public ClientValidatorHandler(BehaviorConfig config) {
+ super(config);
+ }
+
+}
14 years
JBoss Rich Faces SVN: r20704 - trunk/cdk/generator/src/main/java/org/richfaces/cdk/apt/processors.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-12-20 19:06:06 -0500 (Mon, 20 Dec 2010)
New Revision: 20704
Modified:
trunk/cdk/generator/src/main/java/org/richfaces/cdk/apt/processors/AttributesProcessorImpl.java
Log:
RESOLVED - issue RF-9811: CDK: attributes import errors are silently ignored
https://issues.jboss.org/browse/RF-9811
Modified: trunk/cdk/generator/src/main/java/org/richfaces/cdk/apt/processors/AttributesProcessorImpl.java
===================================================================
--- trunk/cdk/generator/src/main/java/org/richfaces/cdk/apt/processors/AttributesProcessorImpl.java 2010-12-20 23:48:52 UTC (rev 20703)
+++ trunk/cdk/generator/src/main/java/org/richfaces/cdk/apt/processors/AttributesProcessorImpl.java 2010-12-21 00:06:06 UTC (rev 20704)
@@ -237,7 +237,7 @@
} catch (CdkException e) {
log.error(e);
} catch (FileNotFoundException e) {
- log.debug("No properties description found at " + attributes);
+ log.error("No properties description found at " + attributes);
}
}
}
14 years
JBoss Rich Faces SVN: r20703 - trunk/cdk/generator/src/main/resources/META-INF/templates.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-12-20 18:48:52 -0500 (Mon, 20 Dec 2010)
New Revision: 20703
Modified:
trunk/cdk/generator/src/main/resources/META-INF/templates/_attribute_accessors.ftl
Log:
RESOLVED - issue RF-9776: CDK: code with potential NPEs is generated
https://issues.jboss.org/browse/RF-9776
Modified: trunk/cdk/generator/src/main/resources/META-INF/templates/_attribute_accessors.ftl
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates/_attribute_accessors.ftl 2010-12-20 23:33:39 UTC (rev 20702)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates/_attribute_accessors.ftl 2010-12-20 23:48:52 UTC (rev 20703)
@@ -6,9 +6,7 @@
</#if>
public ${attribute.typeName} ${attribute.getterName}() {
- <#if attribute.typeForCasting?contains("Boolean")>
- return Boolean.valueOf(getStateHelper().eval(Properties.${propertyKey}<#if attribute.defaultValue?exists>, ${attribute.defaultValue}</#if>).toString());
- <#elseif attribute.bindingAttribute || attribute.literal >
+ <#if attribute.bindingAttribute || attribute.literal >
return (${attribute.typeForCasting}) getStateHelper().get(Properties.${propertyKey});
<#else>
return (${attribute.typeForCasting}) getStateHelper().eval(Properties.${propertyKey}<#if attribute.defaultValue?exists>, ${attribute.defaultValue}</#if>);
14 years
JBoss Rich Faces SVN: r20702 - in trunk/ui: validator/ui and 10 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-12-20 18:33:39 -0500 (Mon, 20 Dec 2010)
New Revision: 20702
Modified:
trunk/ui/core/ui/src/main/java/org/richfaces/view/facelets/html/AjaxHandler.java
trunk/ui/validator/ui/pom.xml
trunk/ui/validator/ui/src/main/config/faces-config.xml
trunk/ui/validator/ui/src/main/java/org/richfaces/component/behavior/ClientValidatorImpl.java
trunk/ui/validator/ui/src/test/java/org/richfaces/component/AjaxValidationTest.java
trunk/ui/validator/ui/src/test/java/org/richfaces/component/ClientValidationTest.java
trunk/ui/validator/ui/src/test/java/org/richfaces/component/behavior/BehaviorGetValidatorTest.java
trunk/ui/validator/ui/src/test/java/org/richfaces/component/behavior/BehaviorTestBase.java
trunk/ui/validator/ui/src/test/java/org/richfaces/component/behavior/GetScriptTest.java
trunk/ui/validator/ui/src/test/java/org/richfaces/el/TestCaptureEL.java
trunk/ui/validator/ui/src/test/java/org/richfaces/el/ValueExpressionAnalayserTest.java
trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/converter/ConverterTestBase.java
trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/ClearMessageTest.java
trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/MessageTestBase.java
trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/validator/LengthValidatorTest.java
trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/validator/ValidatorTestBase.java
trunk/ui/validator/ui/src/test/java/org/richfaces/renderkit/html/RendererGetClientSideScriptTest.java
trunk/ui/validator/ui/src/test/java/org/richfaces/validator/BeanValidatorServiceConstrainsTest.java
trunk/ui/validator/ui/src/test/java/org/richfaces/validator/FacesConverterServiceTest.java
trunk/ui/validator/ui/src/test/java/org/richfaces/validator/FacesValidatorServiceTest.java
Log:
RESOLVED - issue RF-10063: Switch CSV to RichFaces AJAX behavior
https://issues.jboss.org/browse/RF-10063
Modified: trunk/ui/core/ui/src/main/java/org/richfaces/view/facelets/html/AjaxHandler.java
===================================================================
--- trunk/ui/core/ui/src/main/java/org/richfaces/view/facelets/html/AjaxHandler.java 2010-12-20 20:43:19 UTC (rev 20701)
+++ trunk/ui/core/ui/src/main/java/org/richfaces/view/facelets/html/AjaxHandler.java 2010-12-20 23:33:39 UTC (rev 20702)
@@ -98,7 +98,7 @@
BehaviorStack ajaxBehaviors = BehaviorStack.getBehaviorStack(context, true);
String eventName = getEventName();
- ajaxBehaviors.pushBehavior(context, ajaxBehavior, AjaxBehavior.BEHAVIOR_ID, eventName);
+ ajaxBehaviors.pushBehavior(context, ajaxBehavior, getBehaviorId(), eventName);
AttachQueueStack attachQueueStack = AttachQueueStack.getStack(context, true);
AttachQueueInfo attachQueueInfo = new AttachQueueInfo(parent);
@@ -138,6 +138,7 @@
}
}
+
private void applyNested(FaceletContext ctx, UIComponent parent, AjaxBehavior behavior) {
if (!ComponentHandler.isNew(parent)) {
return;
Modified: trunk/ui/validator/ui/pom.xml
===================================================================
--- trunk/ui/validator/ui/pom.xml 2010-12-20 20:43:19 UTC (rev 20701)
+++ trunk/ui/validator/ui/pom.xml 2010-12-20 23:33:39 UTC (rev 20702)
@@ -74,6 +74,10 @@
<groupId>org.richfaces.ui.common</groupId>
<artifactId>richfaces-ui-common-ui</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.core</groupId>
+ <artifactId>richfaces-ui-core-ui</artifactId>
+ </dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
Modified: trunk/ui/validator/ui/src/main/config/faces-config.xml
===================================================================
--- trunk/ui/validator/ui/src/main/config/faces-config.xml 2010-12-20 20:43:19 UTC (rev 20701)
+++ trunk/ui/validator/ui/src/main/config/faces-config.xml 2010-12-20 23:33:39 UTC (rev 20702)
@@ -3,6 +3,7 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:cdk="http://jboss.org/schema/richfaces/cdk/extensions"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <!--
<behavior>
<behavior-id>org.richfaces.behavior.ClientValidator</behavior-id>
<behavior-class>org.richfaces.component.behavior.ClientValidatorImpl</behavior-class>
@@ -13,6 +14,7 @@
</cdk:tag>
</behavior-extension>
</behavior>
+ -->
<render-kit>
<client-behavior-renderer>
<client-behavior-renderer-type>org.richfaces.ClientValidatorRenderer</client-behavior-renderer-type>
Modified: trunk/ui/validator/ui/src/main/java/org/richfaces/component/behavior/ClientValidatorImpl.java
===================================================================
--- trunk/ui/validator/ui/src/main/java/org/richfaces/component/behavior/ClientValidatorImpl.java 2010-12-20 20:43:19 UTC (rev 20701)
+++ trunk/ui/validator/ui/src/main/java/org/richfaces/component/behavior/ClientValidatorImpl.java 2010-12-20 23:33:39 UTC (rev 20702)
@@ -36,7 +36,6 @@
import javax.faces.component.UIComponent;
import javax.faces.component.UIMessage;
import javax.faces.component.UIMessages;
-import javax.faces.component.behavior.AjaxBehavior;
import javax.faces.component.behavior.ClientBehaviorContext;
import javax.faces.context.FacesContext;
import javax.faces.context.PartialViewContext;
@@ -48,7 +47,11 @@
import javax.faces.validator.BeanValidator;
import javax.faces.validator.Validator;
+import org.ajax4jsf.component.behavior.AjaxBehavior;
import org.richfaces.application.ServiceTracker;
+import org.richfaces.cdk.annotations.JsfBehavior;
+import org.richfaces.cdk.annotations.Tag;
+import org.richfaces.cdk.annotations.TagType;
import org.richfaces.component.UIRichMessages;
import org.richfaces.log.Logger;
import org.richfaces.log.RichfacesLogger;
@@ -69,6 +72,7 @@
* @author asmirnov(a)exadel.com
*
*/
+@JsfBehavior(id = "org.richfaces.behavior.ClientValidator", tag = @Tag(name = "validator", handler = "org.richfaces.view.facelets.html.ClientValidatorHandler", type = TagType.Facelets))
public class ClientValidatorImpl extends AjaxBehavior implements ClientValidatorBehavior {
@@ -359,5 +363,14 @@
}
}
}
+
+ /* (non-Javadoc)
+ * @see org.richfaces.component.behavior.ClientValidatorBehavior#isImmediateSet()
+ */
+ public boolean isImmediateSet() {
+ // TODO - implement this method in RichFaces AjaxBehavior
+ return false;
+ }
+
}
Modified: trunk/ui/validator/ui/src/test/java/org/richfaces/component/AjaxValidationTest.java
===================================================================
--- trunk/ui/validator/ui/src/test/java/org/richfaces/component/AjaxValidationTest.java 2010-12-20 20:43:19 UTC (rev 20701)
+++ trunk/ui/validator/ui/src/test/java/org/richfaces/component/AjaxValidationTest.java 2010-12-20 23:33:39 UTC (rev 20702)
@@ -69,9 +69,9 @@
HtmlInput input = getInput(page);
input.setValueAttribute(value);
input.fireEvent("blur");
+ System.out.println(page.asXml());
HtmlElement message = page.getElementById("uiMessage");
assertThat(message.getTextContent(), matcher);
-// System.out.println(page.asXml());
}
private HtmlInput getInput(HtmlPage page) {
HtmlForm htmlForm = page.getFormByName("form");
Modified: trunk/ui/validator/ui/src/test/java/org/richfaces/component/ClientValidationTest.java
===================================================================
--- trunk/ui/validator/ui/src/test/java/org/richfaces/component/ClientValidationTest.java 2010-12-20 20:43:19 UTC (rev 20701)
+++ trunk/ui/validator/ui/src/test/java/org/richfaces/component/ClientValidationTest.java 2010-12-20 23:33:39 UTC (rev 20702)
@@ -11,7 +11,6 @@
import org.jboss.test.faces.htmlunit.HtmlUnitEnvironment;
import org.junit.After;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
Modified: trunk/ui/validator/ui/src/test/java/org/richfaces/component/behavior/BehaviorGetValidatorTest.java
===================================================================
--- trunk/ui/validator/ui/src/test/java/org/richfaces/component/behavior/BehaviorGetValidatorTest.java 2010-12-20 20:43:19 UTC (rev 20701)
+++ trunk/ui/validator/ui/src/test/java/org/richfaces/component/behavior/BehaviorGetValidatorTest.java 2010-12-20 23:33:39 UTC (rev 20702)
@@ -1,11 +1,8 @@
package org.richfaces.component.behavior;
-import static org.easymock.EasyMock.expect;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.*;
-import java.util.Arrays;
import java.util.Collection;
import javax.el.ValueExpression;
Modified: trunk/ui/validator/ui/src/test/java/org/richfaces/component/behavior/BehaviorTestBase.java
===================================================================
--- trunk/ui/validator/ui/src/test/java/org/richfaces/component/behavior/BehaviorTestBase.java 2010-12-20 20:43:19 UTC (rev 20701)
+++ trunk/ui/validator/ui/src/test/java/org/richfaces/component/behavior/BehaviorTestBase.java 2010-12-20 23:33:39 UTC (rev 20702)
@@ -1,6 +1,6 @@
package org.richfaces.component.behavior;
-import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.*;
import javax.faces.component.UIComponent;
import javax.faces.component.UIInput;
Modified: trunk/ui/validator/ui/src/test/java/org/richfaces/component/behavior/GetScriptTest.java
===================================================================
--- trunk/ui/validator/ui/src/test/java/org/richfaces/component/behavior/GetScriptTest.java 2010-12-20 20:43:19 UTC (rev 20701)
+++ trunk/ui/validator/ui/src/test/java/org/richfaces/component/behavior/GetScriptTest.java 2010-12-20 23:33:39 UTC (rev 20702)
@@ -1,15 +1,15 @@
package org.richfaces.component.behavior;
-import static org.easymock.EasyMock.expect;
-import static org.junit.Assert.assertEquals;
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.*;
import javax.faces.FacesException;
import javax.faces.component.UICommand;
import javax.faces.component.UIComponent;
import javax.faces.component.UIOutput;
-import javax.faces.component.behavior.AjaxBehavior;
import javax.faces.component.behavior.ClientBehaviorContext;
import javax.faces.render.RenderKit;
+import org.ajax4jsf.component.behavior.AjaxBehavior;
import org.jboss.test.faces.mock.Mock;
import org.jboss.test.faces.mock.MockTestRunner;
import org.jboss.test.faces.mock.Stub;
Modified: trunk/ui/validator/ui/src/test/java/org/richfaces/el/TestCaptureEL.java
===================================================================
--- trunk/ui/validator/ui/src/test/java/org/richfaces/el/TestCaptureEL.java 2010-12-20 20:43:19 UTC (rev 20701)
+++ trunk/ui/validator/ui/src/test/java/org/richfaces/el/TestCaptureEL.java 2010-12-20 23:33:39 UTC (rev 20702)
@@ -1,9 +1,6 @@
package org.richfaces.el;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
+import static org.junit.Assert.*;
import javax.el.ValueExpression;
Modified: trunk/ui/validator/ui/src/test/java/org/richfaces/el/ValueExpressionAnalayserTest.java
===================================================================
--- trunk/ui/validator/ui/src/test/java/org/richfaces/el/ValueExpressionAnalayserTest.java 2010-12-20 20:43:19 UTC (rev 20701)
+++ trunk/ui/validator/ui/src/test/java/org/richfaces/el/ValueExpressionAnalayserTest.java 2010-12-20 23:33:39 UTC (rev 20702)
@@ -1,7 +1,7 @@
package org.richfaces.el;
-import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.*;
import static org.junit.Assert.*;
import javax.el.ELException;
Modified: trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/converter/ConverterTestBase.java
===================================================================
--- trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/converter/ConverterTestBase.java 2010-12-20 20:43:19 UTC (rev 20701)
+++ trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/converter/ConverterTestBase.java 2010-12-20 23:33:39 UTC (rev 20702)
@@ -2,14 +2,11 @@
import static org.junit.Assert.*;
-
import javax.faces.convert.Converter;
import javax.faces.convert.ConverterException;
import org.ajax4jsf.javascript.JSFunction;
import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
import org.richfaces.javascript.client.MockTestBase;
import org.richfaces.javascript.client.RunParameters;
Modified: trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/ClearMessageTest.java
===================================================================
--- trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/ClearMessageTest.java 2010-12-20 20:43:19 UTC (rev 20701)
+++ trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/ClearMessageTest.java 2010-12-20 23:33:39 UTC (rev 20702)
@@ -28,7 +28,6 @@
import org.junit.Test;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
-import com.gargoylesoftware.htmlunit.html.HtmlPage;
/**
* <p class="changed_added_4_0"></p>
Modified: trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/MessageTestBase.java
===================================================================
--- trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/MessageTestBase.java 2010-12-20 20:43:19 UTC (rev 20701)
+++ trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/MessageTestBase.java 2010-12-20 23:33:39 UTC (rev 20702)
@@ -14,15 +14,15 @@
public class MessageTestBase {
- @Rule
- public final Qunit qunit;
-
public static final String COMPONENT = "form:component";
public static final String MY_MESSAGE = "form:uiMessage";
public static final String MESSAGE_INIT = "new RichFaces.ui.Message(\"" + MY_MESSAGE + "\", {forComponentId:\"" + COMPONENT + "\"})";
+ @Rule
+ public final Qunit qunit;
+
public MessageTestBase() {
this.qunit = createQunitPage().build();
}
Modified: trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/validator/LengthValidatorTest.java
===================================================================
--- trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/validator/LengthValidatorTest.java 2010-12-20 20:43:19 UTC (rev 20701)
+++ trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/validator/LengthValidatorTest.java 2010-12-20 23:33:39 UTC (rev 20702)
@@ -3,8 +3,6 @@
*/
package org.richfaces.javascript.client.validator;
-import static org.easymock.EasyMock.anyObject;
-
import java.util.List;
import java.util.Map;
Modified: trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/validator/ValidatorTestBase.java
===================================================================
--- trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/validator/ValidatorTestBase.java 2010-12-20 20:43:19 UTC (rev 20701)
+++ trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/validator/ValidatorTestBase.java 2010-12-20 23:33:39 UTC (rev 20702)
@@ -1,6 +1,6 @@
package org.richfaces.javascript.client.validator;
-import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.*;
import static org.junit.Assert.*;
import java.util.Collections;
@@ -12,7 +12,6 @@
import javax.faces.validator.ValidatorException;
import javax.validation.ValidationException;
-
import net.sourceforge.htmlunit.corejs.javascript.JavaScriptException;
import net.sourceforge.htmlunit.corejs.javascript.NativeObject;
@@ -26,58 +25,58 @@
public abstract class ValidatorTestBase extends MockTestBase {
private static final Converter NUMBER_CONVERTER = new Converter() {
-
- public String getAsString(FacesContext context, UIComponent component, Object value) {
-
- return String.valueOf(value);
- }
-
- public Object getAsObject(FacesContext context, UIComponent component, String value) {
- return Double.valueOf(value);
- }
- };
+ public String getAsString(FacesContext context, UIComponent component, Object value) {
+
+ return String.valueOf(value);
+ }
+
+ public Object getAsObject(FacesContext context, UIComponent component, String value) {
+ return Double.valueOf(value);
+ }
+ };
+
public ValidatorTestBase(RunParameters criteria) {
super(criteria);
}
-
@Test
public void testValidator() throws Exception {
Validator validator = createValidator();
try {
- validator.validate(facesEnvironment.getFacesContext(), component, criteria.getValue());
- validateOnClient();
+ validator.validate(facesEnvironment.getFacesContext(), component, criteria.getValue());
+ validateOnClient();
} catch (ValidatorException e) {
// client-side script has to throw exception too.
try {
validateOnClient();
- assertFalse("JSF validator throws exception for value: "+criteria.getValue(),true);
+ assertFalse("JSF validator throws exception for value: " + criteria.getValue(), true);
} catch (ScriptException e2) {
// both methods throws exceptions - it's ok.
e2.printStackTrace();
Throwable cause = e2.getCause();
assertTrue(cause instanceof JavaScriptException);
- NativeObject value = (NativeObject) ((JavaScriptException)cause).getValue();
+ NativeObject value = (NativeObject) ((JavaScriptException) cause).getValue();
assertEquals(getErrorMessage().getDetail(), value.get("detail"));
}
}
}
-
+
protected Object validateOnClient() throws ValidationException {
- JSFunction clientSideFunction = new JSFunction("RichFaces.csv." + getJavaScriptFunctionName(),criteria.getValue(),getErrorMessage(),getJavaScriptOptions());
+ JSFunction clientSideFunction =
+ new JSFunction("RichFaces.csv." + getJavaScriptFunctionName(), criteria.getValue(), getErrorMessage(),
+ getJavaScriptOptions());
return qunit.runScript(clientSideFunction.toScript());
}
-
+
protected abstract Validator createValidator();
-
@Override
protected void recordMocks() {
super.recordMocks();
expect(component.getAttributes()).andStubReturn(Collections.EMPTY_MAP);
- expect(component.getClientId(facesEnvironment.getFacesContext())).andStubReturn("testComponent");
+ expect(component.getClientId(facesEnvironment.getFacesContext())).andStubReturn("testComponent");
expect(facesEnvironment.getApplication().createConverter("javax.faces.Number")).andStubReturn(NUMBER_CONVERTER);
}
}
Modified: trunk/ui/validator/ui/src/test/java/org/richfaces/renderkit/html/RendererGetClientSideScriptTest.java
===================================================================
--- trunk/ui/validator/ui/src/test/java/org/richfaces/renderkit/html/RendererGetClientSideScriptTest.java 2010-12-20 20:43:19 UTC (rev 20701)
+++ trunk/ui/validator/ui/src/test/java/org/richfaces/renderkit/html/RendererGetClientSideScriptTest.java 2010-12-20 23:33:39 UTC (rev 20702)
@@ -1,8 +1,7 @@
package org.richfaces.renderkit.html;
-import static org.easymock.EasyMock.expect;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.*;
import java.util.Collection;
import java.util.Collections;
Modified: trunk/ui/validator/ui/src/test/java/org/richfaces/validator/BeanValidatorServiceConstrainsTest.java
===================================================================
--- trunk/ui/validator/ui/src/test/java/org/richfaces/validator/BeanValidatorServiceConstrainsTest.java 2010-12-20 20:43:19 UTC (rev 20701)
+++ trunk/ui/validator/ui/src/test/java/org/richfaces/validator/BeanValidatorServiceConstrainsTest.java 2010-12-20 23:33:39 UTC (rev 20702)
@@ -1,8 +1,7 @@
package org.richfaces.validator;
-import static junit.framework.Assert.assertEquals;
-import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.*;
import static org.junit.Assert.*;
import java.lang.annotation.Annotation;
Modified: trunk/ui/validator/ui/src/test/java/org/richfaces/validator/FacesConverterServiceTest.java
===================================================================
--- trunk/ui/validator/ui/src/test/java/org/richfaces/validator/FacesConverterServiceTest.java 2010-12-20 20:43:19 UTC (rev 20701)
+++ trunk/ui/validator/ui/src/test/java/org/richfaces/validator/FacesConverterServiceTest.java 2010-12-20 23:33:39 UTC (rev 20702)
@@ -1,8 +1,7 @@
package org.richfaces.validator;
-import static org.easymock.EasyMock.expect;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.*;
import java.util.HashMap;
import java.util.Locale;
Modified: trunk/ui/validator/ui/src/test/java/org/richfaces/validator/FacesValidatorServiceTest.java
===================================================================
--- trunk/ui/validator/ui/src/test/java/org/richfaces/validator/FacesValidatorServiceTest.java 2010-12-20 20:43:19 UTC (rev 20701)
+++ trunk/ui/validator/ui/src/test/java/org/richfaces/validator/FacesValidatorServiceTest.java 2010-12-20 23:33:39 UTC (rev 20702)
@@ -1,8 +1,7 @@
package org.richfaces.validator;
-import static org.easymock.EasyMock.expect;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.*;
import java.util.HashMap;
import java.util.Locale;
14 years
JBoss Rich Faces SVN: r20701 - in branches/4.0.0.M5/ui: validator/ui/src/main/resources/META-INF/resources/org.richfaces and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-12-20 15:43:19 -0500 (Mon, 20 Dec 2010)
New Revision: 20701
Modified:
branches/4.0.0.M5/ui/dnd/ui/src/main/java/org/richfaces/renderkit/DropTargetRenderer.java
branches/4.0.0.M5/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/message.js
branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/MessageTestBase.java
Log:
Merged fixes for:
- https://issues.jboss.org/browse/RF-10057
- 'unload' event caused exception in message.js
Modified: branches/4.0.0.M5/ui/dnd/ui/src/main/java/org/richfaces/renderkit/DropTargetRenderer.java
===================================================================
--- branches/4.0.0.M5/ui/dnd/ui/src/main/java/org/richfaces/renderkit/DropTargetRenderer.java 2010-12-20 18:13:50 UTC (rev 20700)
+++ branches/4.0.0.M5/ui/dnd/ui/src/main/java/org/richfaces/renderkit/DropTargetRenderer.java 2010-12-20 20:43:19 UTC (rev 20701)
@@ -33,7 +33,7 @@
Map<String, String> requestParamMap = facesContext.getExternalContext().getRequestParameterMap();
String dragSourceId = (String) requestParamMap.get("dragSource");
- if(!"".equals(dragSourceId)) {
+ if(dragSourceId !=null && !"".equals(dragSourceId)) {
DragSourceContextCallBack dragSourceContextCallBack = new DragSourceContextCallBack();
facesContext.getViewRoot().invokeOnComponent(facesContext, dragSourceId, dragSourceContextCallBack);
Modified: branches/4.0.0.M5/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/message.js
===================================================================
--- branches/4.0.0.M5/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/message.js 2010-12-20 18:13:50 UTC (rev 20700)
+++ branches/4.0.0.M5/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/message.js 2010-12-20 20:43:19 UTC (rev 20701)
@@ -22,7 +22,7 @@
__bindEventHandlers: function () {
},
destroy: function () {
- rf.Event.unbind(this.id, this.namespace);
+ rf.Event.unbindById(this.id, this.namespace);
$super.destroy.call(this);
}
});
Modified: branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/MessageTestBase.java
===================================================================
--- branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/MessageTestBase.java 2010-12-20 18:13:50 UTC (rev 20700)
+++ branches/4.0.0.M5/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/MessageTestBase.java 2010-12-20 20:43:19 UTC (rev 20701)
@@ -34,13 +34,13 @@
protected Builder createQunitPage() {
return Qunit.builder().emulate(BrowserVersion.FIREFOX_3_6).loadJsfResource("jquery.js").loadJsfResource("richfaces.js")
.loadJsfResource("richfaces-event.js").loadJsfResource("richfaces-base-component.js").
- loadJsfResource("csv.js", "org.richfaces").loadJsfResource("message.js", "org.richfaces").content(/*"<form id=\"form\" name=\"form\" method=\"post\" action=\"/client-test.jsf\" enctype=\"application/x-www-form-urlencoded\">\n" + */
+ loadJsfResource("csv.js", "org.richfaces").loadJsfResource("message.js", "org.richfaces").content("<form id=\"form\" name=\"form\" method=\"post\" action=\"/client-test.jsf\" enctype=\"application/x-www-form-urlencoded\">\n" +
" <input type=\"hidden\" name=\"form\" value=\"form\"/>\n" +
" <input id=\"form:text\" type=\"text\" name=\"form:text\" value=\"fooValue\" onblur=\"form_3Atext_3Av("form:text",this,event)\"/>\n" +
" <span id=\"form:out\">\n" +
" fooValue\n" +
" </span><div id=\"foo\" ><ul id=\"" + MY_MESSAGE + "\">"+getMessageContent()+"</ul></div><input type=\"hidden\" name=\"javax.faces.ViewState\" id=\"javax.faces.ViewState\" value=\"4262028796446907996:-2607792463910755035\" autocomplete=\"off\"/>\n"
- /*+ " </form>"*/);
+ + " </form>");
}
14 years
JBoss Rich Faces SVN: r20700 - in modules/tests/metamer/trunk: ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-12-20 13:13:50 -0500 (Mon, 20 Dec 2010)
New Revision: 20700
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTogglePanel/TestRichTogglePanel.java
Log:
* added test for itemChangeListener, execute, data and activeItem
* fixed test for immediate
* refactored
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java 2010-12-20 18:11:05 UTC (rev 20699)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java 2010-12-20 18:13:50 UTC (rev 20700)
@@ -58,7 +58,8 @@
attributes.setAttribute("activeItem", "item1");
attributes.setAttribute("rendered", true);
-
+
+ attributes.remove("itemChangeListener");
}
public Attributes getAttributes() {
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java 2010-12-20 18:11:05 UTC (rev 20699)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java 2010-12-20 18:13:50 UTC (rev 20700)
@@ -30,6 +30,7 @@
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertNotSame;
import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
import java.net.URL;
@@ -101,8 +102,7 @@
@Test
public void testSwitchTypeAjax() {
- JQueryLocator selectOption = pjq("input[type=radio][id$=switchTypeInput:0]");
- selenium.click(selectOption);
+ selenium.click(pjq("input[type=radio][id$=switchTypeInput:0]"));
selenium.waitForPageToLoad();
testSwitchTypeNull();
@@ -110,8 +110,7 @@
@Test
public void testSwitchTypeClient() {
- JQueryLocator selectOption = pjq("input[type=radio][id$=switchTypeInput:1]");
- selenium.click(selectOption);
+ selenium.click(pjq("input[type=radio][id$=switchTypeInput:1]"));
selenium.waitForPageToLoad();
for (int i = 2; i >= 0; i--) {
@@ -124,8 +123,7 @@
@Test
@IssueTracking("https://issues.jboss.org/browse/RF-10040")
public void testSwitchTypeServer() {
- JQueryLocator selectOption = pjq("input[type=radio][id$=switchTypeInput:3]");
- selenium.click(selectOption);
+ selenium.click(pjq("input[type=radio][id$=switchTypeInput:3]"));
selenium.waitForPageToLoad();
for (int i = 2; i >= 0; i--) {
@@ -136,9 +134,43 @@
}
@Test
+ public void testActiveItem() {
+ selenium.type(pjq("input[type=text][id$=activeItemInput]"), "item5");
+ selenium.waitForPageToLoad();
+
+ boolean accordionDisplayed = selenium.isDisplayed(accordion);
+ assertTrue(accordionDisplayed, "Accordion is not present on the page.");
+
+ for (int i = 0; i < 5; i++) {
+ accordionDisplayed = selenium.isDisplayed(itemHeaders[i]);
+ assertTrue(accordionDisplayed, "Item" + (i + 1) + "'s header should be visible.");
+ }
+
+ accordionDisplayed = selenium.isDisplayed(itemContents[4]);
+ assertTrue(accordionDisplayed, "Content of item5 should be visible.");
+
+ for (int i = 0; i < 4; i++) {
+ accordionDisplayed = selenium.isDisplayed(itemContents[i]);
+ assertFalse(accordionDisplayed, "Item" + (i + 1) + "'s content should not be visible.");
+ }
+
+ selenium.type(pjq("input[type=text][id$=activeItemInput]"), "item4");
+ selenium.waitForPageToLoad();
+
+ for (int i = 0; i < 5; i++) {
+ accordionDisplayed = selenium.isDisplayed(itemHeaders[i]);
+ assertTrue(accordionDisplayed, "Item" + (i + 1) + "'s header should be visible.");
+ }
+
+ for (int i = 0; i < 5; i++) {
+ accordionDisplayed = selenium.isDisplayed(itemContents[i]);
+ assertFalse(accordionDisplayed, "Item" + (i + 1) + "'s content should not be visible.");
+ }
+ }
+
+ @Test
public void testBypassUpdates() {
- JQueryLocator input = pjq("input[type=radio][name$=bypassUpdatesInput][value=true]");
- selenium.click(input);
+ selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
selenium.waitForPageToLoad();
selenium.click(itemHeaders[2]);
@@ -161,8 +193,7 @@
result = selenium.getEval(new JavaScript("window.RichFaces.$('" + accordionId + "').prevItem('item1')"));
assertEquals(result, "null", "Result of function prevItem('item1')");
- JQueryLocator input = pjq("input[type=radio][name$=cycledSwitchingInput][value=true]");
- selenium.click(input);
+ selenium.click(pjq("input[type=radio][name$=cycledSwitchingInput][value=true]"));
selenium.waitForPageToLoad();
// RichFaces.$('form:accordion').nextItem('item5') will be item1
@@ -175,20 +206,53 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-10061")
+ public void testData() {
+ selenium.type(pjq("input[type=text][id$=dataInput]"), "RichFaces 4");
+ selenium.waitForPageToLoad();
+
+ selenium.type(pjq("input[type=text][id$=onitemchangeInput]"), "data = event.data");
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).click(itemHeaders[2]);
+ waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(itemContents[2]));
+
+ String data = selenium.getEval(new JavaScript("window.data"));
+ assertEquals(data, "RichFaces 4", "Data sent with ajax request");
+ }
+
+ @Test
public void testDir() {
testDir(accordion);
}
@Test
+ public void testExecute() {
+ selenium.type(pjq("input[type=text][id$=executeInput]"), "@this executeChecker");
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).click(itemHeaders[2]);
+ waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(itemContents[2]));
+
+ JQueryLocator logItems = jq("ul.phases-list li:eq({0})");
+ for (int i = 0; i < 6; i++) {
+ if ("* executeChecker".equals(selenium.getText(logItems.format(i)))) {
+ return;
+ }
+ }
+
+ fail("Attribute execute does not work");
+ }
+
+ @Test
public void testHeight() {
- JQueryLocator input = pjq("input[type=text][id$=heightInput]");
AttributeLocator<?> attribute = accordion.getAttribute(new Attribute("style"));
// height = null
assertFalse(selenium.isAttributePresent(attribute), "Attribute style should not be present.");
// height = 300px
- selenium.type(input, "300px");
+ selenium.type(pjq("input[type=text][id$=heightInput]"), "300px");
selenium.waitForPageToLoad(TIMEOUT);
assertTrue(selenium.isAttributePresent(attribute), "Attribute style should be present.");
@@ -198,17 +262,28 @@
@Test
public void testImmediate() {
- JQueryLocator input = pjq("input[type=radio][name$=immediateInput][value=true]");
- selenium.click(input);
+ selenium.click(pjq("input[type=radio][name$=immediateInput][value=true]"));
selenium.waitForPageToLoad();
selenium.click(itemHeaders[2]);
waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(itemContents[2]));
assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.RENDER_RESPONSE);
+
+ String listenerOutput = selenium.getText(jq("div#phasesPanel li:eq(2)"));
+ assertEquals(listenerOutput, "* item changed item1 -> item3", "Item change listener's output");
}
@Test
+ public void testItemChangeListener() {
+ selenium.click(itemHeaders[2]);
+ waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(itemContents[2]));
+
+ String listenerOutput = selenium.getText(jq("div#phasesPanel li:eq(5)"));
+ assertEquals(listenerOutput, "* item changed: item1 -> item3", "Item change listener's output");
+ }
+
+ @Test
public void testItemContentClass() {
testStyleClass(itemContents[2], "itemContentClass");
}
@@ -303,9 +378,6 @@
public void testLimitRender() {
JQueryLocator timeLoc = jq("span[id$=requestTime]");
-// selenium.type(pjq("input[type=text][id$=renderInput]"), "@this");
-// selenium.waitForPageToLoad();
-
selenium.click(pjq("input[type=radio][name$=limitRenderInput][value=true]"));
selenium.waitForPageToLoad();
@@ -355,8 +427,7 @@
@Test
public void testRendered() {
- JQueryLocator input = pjq("input[type=radio][name$=renderedInput][value=false]");
- selenium.click(input);
+ selenium.click(pjq("input[type=radio][name$=renderedInput][value=false]"));
selenium.waitForPageToLoad();
assertFalse(selenium.isElementPresent(accordion), "Accordion should not be rendered when rendered=false.");
@@ -379,14 +450,13 @@
@Test
public void testWidth() {
- JQueryLocator input = pjq("input[type=text][id$=widthInput]");
AttributeLocator<?> attribute = accordion.getAttribute(new Attribute("style"));
// width = null
assertFalse(selenium.isAttributePresent(attribute), "Attribute style should not be present.");
// width = 50%
- selenium.type(input, "50%");
+ selenium.type(pjq("input[type=text][id$=widthInput]"), "50%");
selenium.waitForPageToLoad(TIMEOUT);
assertTrue(selenium.isAttributePresent(attribute), "Attribute style should be present.");
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java 2010-12-20 18:11:05 UTC (rev 20699)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java 2010-12-20 18:13:50 UTC (rev 20700)
@@ -30,6 +30,7 @@
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.assertNotSame;
+import static org.testng.Assert.fail;
import java.net.URL;
@@ -37,7 +38,6 @@
import org.jboss.test.selenium.dom.Event;
import org.jboss.test.selenium.encapsulated.JavaScript;
-import org.jboss.test.selenium.locator.ElementLocator;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.jboss.test.selenium.waiting.EventFiredCondition;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
@@ -111,8 +111,7 @@
@Test
public void testSwitchTypeAjax() {
- JQueryLocator selectOption = pjq("input[name$=switchTypeInput][value=ajax]");
- selenium.click(selectOption);
+ selenium.click(pjq("input[name$=switchTypeInput][value=ajax]"));
selenium.waitForPageToLoad();
testSwitchTypeNull();
@@ -120,8 +119,7 @@
@Test
public void testSwitchTypeClient() {
- JQueryLocator selectOption = pjq("input[name$=switchTypeInput][value=client]");
- selenium.click(selectOption);
+ selenium.click(pjq("input[name$=switchTypeInput][value=client]"));
selenium.waitForPageToLoad();
for (int i = 2; i >= 0; i--) {
@@ -134,8 +132,7 @@
@Test
@IssueTracking("https://issues.jboss.org/browse/RF-10040")
public void testSwitchTypeServer() {
- JQueryLocator selectOption = pjq("input[name$=switchTypeInput][value=server]");
- selenium.click(selectOption);
+ selenium.click(pjq("input[name$=switchTypeInput][value=server]"));
selenium.waitForPageToLoad();
for (int i = 2; i >= 0; i--) {
@@ -146,10 +143,44 @@
}
@Test
+ public void testActiveItem() {
+ selenium.type(pjq("input[type=text][id$=activeItemInput]"), "tab5");
+ selenium.waitForPageToLoad();
+
+ boolean displayed = selenium.isDisplayed(panel);
+ assertTrue(displayed, "Tab panel is not present on the page.");
+
+ for (int i = 0; i < 4; i++) {
+ displayed = selenium.isDisplayed(activeHeaders[i]);
+ assertFalse(displayed, "Tab" + (i + 1) + "'s header should not be active.");
+ }
+
+ displayed = selenium.isDisplayed(itemContents[4]);
+ assertTrue(displayed, "Content of tab5 should be visible.");
+
+ for (int i = 0; i < 4; i++) {
+ displayed = selenium.isDisplayed(itemContents[i]);
+ assertFalse(displayed, "Tab" + (i + 1) + "'s content should not be visible.");
+ }
+
+ selenium.type(pjq("input[type=text][id$=activeItemInput]"), "tab4");
+ selenium.waitForPageToLoad();
+
+ for (int i = 0; i < 5; i++) {
+ displayed = selenium.isDisplayed(activeHeaders[i]);
+ assertFalse(displayed, "Tab" + (i + 1) + "'s header should not be active.");
+ }
+
+ for (int i = 0; i < 5; i++) {
+ displayed = selenium.isDisplayed(itemContents[i]);
+ assertFalse(displayed, "Tab" + (i + 1) + "'s content should not be visible.");
+ }
+ }
+
+ @Test
@IssueTracking("https://issues.jboss.org/browse/RF-10054")
public void testBypassUpdates() {
- JQueryLocator input = pjq("input[type=radio][name$=bypassUpdatesInput][value=true]");
- selenium.click(input);
+ selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
selenium.waitForPageToLoad();
selenium.click(inactiveHeaders[2]);
@@ -172,8 +203,7 @@
result = selenium.getEval(new JavaScript("window.RichFaces.$('" + panelId + "').prevItem('tab1')"));
assertEquals(result, "null", "Result of function prevItem('tab1')");
- JQueryLocator input = pjq("input[type=radio][name$=cycledSwitchingInput][value=true]");
- selenium.click(input);
+ selenium.click(pjq("input[type=radio][name$=cycledSwitchingInput][value=true]"));
selenium.waitForPageToLoad();
// RichFaces.$('form:tabPanel').nextItem('tab5') will be item1
@@ -186,24 +216,69 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-10061")
+ public void testData() {
+ selenium.type(pjq("input[type=text][id$=dataInput]"), "RichFaces 4");
+ selenium.waitForPageToLoad();
+
+ selenium.type(pjq("input[type=text][id$=onitemchangeInput]"), "data = event.data");
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).click(inactiveHeaders[2]);
+ waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(itemContents[2]));
+
+ String data = selenium.getEval(new JavaScript("window.data"));
+ assertEquals(data, "RichFaces 4", "Data sent with ajax request");
+ }
+
+ @Test
public void testDir() {
super.testDir(panel);
}
@Test
+ public void testExecute() {
+ selenium.type(pjq("input[type=text][id$=executeInput]"), "@this executeChecker");
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).click(inactiveHeaders[2]);
+ waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(itemContents[2]));
+
+ JQueryLocator logItems = jq("ul.phases-list li:eq({0})");
+ for (int i = 0; i < 6; i++) {
+ if ("* executeChecker".equals(selenium.getText(logItems.format(i)))) {
+ return;
+ }
+ }
+
+ fail("Attribute execute does not work");
+ }
+
+ @Test
@IssueTracking("https://issues.jboss.org/browse/RF-10054")
public void testImmediate() {
- JQueryLocator input = pjq("input[type=radio][name$=immediateInput][value=true]");
- selenium.click(input);
+ selenium.click(pjq("input[type=radio][name$=immediateInput][value=true]"));
selenium.waitForPageToLoad();
selenium.click(inactiveHeaders[2]);
waitGui.failWith("Tab 3 is not displayed.").until(isDisplayed.locator(itemContents[2]));
assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.RENDER_RESPONSE);
+
+ String listenerOutput = selenium.getText(jq("div#phasesPanel li:eq(2)"));
+ assertEquals(listenerOutput, "* item changed: tab1 -> tab3", "Item change listener's output");
}
@Test
+ public void testItemChangeListener() {
+ selenium.click(inactiveHeaders[2]);
+ waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(itemContents[2]));
+
+ String listenerOutput = selenium.getText(jq("div#phasesPanel li:eq(5)"));
+ assertEquals(listenerOutput, "* item changed: tab1 -> tab3", "Item change listener's output");
+ }
+
+ @Test
public void testLang() {
testLang(panel);
}
@@ -308,8 +383,7 @@
@Test
public void testRendered() {
- JQueryLocator input = pjq("input[type=radio][name$=renderedInput][value=false]");
- selenium.click(input);
+ selenium.click(pjq("input[type=radio][name$=renderedInput][value=false]"));
selenium.waitForPageToLoad();
assertFalse(selenium.isElementPresent(panel), "Tab panel should not be rendered when rendered=false.");
@@ -327,10 +401,9 @@
@Test
public void testTabContentClass() {
- ElementLocator<?> classInput = pjq("input[id$=tabContentClassInput]");
final String value = "metamer-ftest-class";
- selenium.type(classInput, value);
+ selenium.type(pjq("input[id$=tabContentClassInput]"), value);
selenium.waitForPageToLoad();
for (JQueryLocator loc : itemContents) {
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTogglePanel/TestRichTogglePanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTogglePanel/TestRichTogglePanel.java 2010-12-20 18:11:05 UTC (rev 20699)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTogglePanel/TestRichTogglePanel.java 2010-12-20 18:13:50 UTC (rev 20700)
@@ -29,6 +29,7 @@
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
import java.net.URL;
@@ -234,10 +235,27 @@
}
@Test
+ public void testActiveItem() {
+ selenium.type(pjq("input[type=text][id$=activeItemInput]"), "item3");
+ selenium.waitForPageToLoad();
+
+ boolean displayed = selenium.isDisplayed(panel);
+ assertTrue(displayed, "Toggle panel is not present on the page.");
+
+ displayed = selenium.isDisplayed(item1);
+ assertFalse(displayed, "Content of item1 should not be visible.");
+
+ displayed = selenium.isDisplayed(item2);
+ assertFalse(displayed, "Content of item2 should not be visible.");
+
+ displayed = selenium.isDisplayed(item3);
+ assertTrue(displayed, "Content of item3 should be visible.");
+ }
+
+ @Test
@IssueTracking("https://issues.jboss.org/browse/RF-10054")
public void testBypassUpdates() {
- JQueryLocator input = pjq("input[type=radio][name$=bypassUpdatesInput][value=true]");
- selenium.click(input);
+ selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
selenium.waitForPageToLoad();
selenium.click(tc3);
@@ -262,15 +280,48 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-10061")
+ public void testData() {
+ selenium.type(pjq("input[type=text][id$=dataInput]"), "RichFaces 4");
+ selenium.waitForPageToLoad();
+
+ selenium.type(pjq("input[type=text][id$=onitemchangeInput]"), "data = event.data");
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).click(tc3);
+ waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(item3));
+
+ String data = selenium.getEval(new JavaScript("window.data"));
+ assertEquals(data, "RichFaces 4", "Data sent with ajax request");
+ }
+
+ @Test
public void testDir() {
super.testDir(panel);
}
@Test
+ public void testExecute() {
+ selenium.type(pjq("input[type=text][id$=executeInput]"), "@this executeChecker");
+ selenium.waitForPageToLoad();
+
+ guardXhr(selenium).click(tc3);
+ waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(item3));
+
+ JQueryLocator logItems = jq("ul.phases-list li:eq({0})");
+ for (int i = 0; i < 6; i++) {
+ if ("* executeChecker".equals(selenium.getText(logItems.format(i)))) {
+ return;
+ }
+ }
+
+ fail("Attribute execute does not work");
+ }
+
+ @Test
@IssueTracking("https://issues.jboss.org/browse/RF-10054")
public void testImmediate() {
- JQueryLocator input = pjq("input[type=radio][name$=immediateInput][value=true]");
- selenium.click(input);
+ selenium.click(pjq("input[type=radio][name$=immediateInput][value=true]"));
selenium.waitForPageToLoad();
selenium.click(tc3);
@@ -279,10 +330,19 @@
assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.RENDER_RESPONSE);
String listenerOutput = selenium.getText(jq("div#phasesPanel li:eq(2)"));
- assertEquals(listenerOutput, "* item changed item1 -> item3", "Item change listener's output");
+ assertEquals(listenerOutput, "* item changed: item1 -> item3", "Item change listener's output");
}
@Test
+ public void testItemChangeListener() {
+ selenium.click(tc3);
+ waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(item3));
+
+ String listenerOutput = selenium.getText(jq("div#phasesPanel li:eq(5)"));
+ assertEquals(listenerOutput, "* item changed: item1 -> item3", "Item change listener's output");
+ }
+
+ @Test
public void testLang() {
testLang(panel);
}
@@ -384,8 +444,7 @@
@Test
public void testRendered() {
- JQueryLocator input = pjq("input[type=radio][name$=renderedInput][value=false]");
- selenium.click(input);
+ selenium.click(pjq("input[type=radio][name$=renderedInput][value=false]"));
selenium.waitForPageToLoad();
assertFalse(selenium.isElementPresent(panel), "Toggle panel should not be rendered when rendered=false.");
14 years
JBoss Rich Faces SVN: r20699 - in trunk/ui/validator/ui/src: test/java/org/richfaces/javascript/client/message and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-12-20 13:11:05 -0500 (Mon, 20 Dec 2010)
New Revision: 20699
Modified:
trunk/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/message.js
trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/MessageTestBase.java
Log:
message
Modified: trunk/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/message.js
===================================================================
--- trunk/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/message.js 2010-12-20 17:58:37 UTC (rev 20698)
+++ trunk/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/message.js 2010-12-20 18:11:05 UTC (rev 20699)
@@ -22,7 +22,7 @@
__bindEventHandlers: function () {
},
destroy: function () {
- rf.Event.unbind(this.id, this.namespace);
+ rf.Event.unbindById(this.id, this.namespace);
$super.destroy.call(this);
}
});
Modified: trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/MessageTestBase.java
===================================================================
--- trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/MessageTestBase.java 2010-12-20 17:58:37 UTC (rev 20698)
+++ trunk/ui/validator/ui/src/test/java/org/richfaces/javascript/client/message/MessageTestBase.java 2010-12-20 18:11:05 UTC (rev 20699)
@@ -34,13 +34,13 @@
protected Builder createQunitPage() {
return Qunit.builder().emulate(BrowserVersion.FIREFOX_3_6).loadJsfResource("jquery.js").loadJsfResource("richfaces.js")
.loadJsfResource("richfaces-event.js").loadJsfResource("richfaces-base-component.js").
- loadJsfResource("csv.js", "org.richfaces").loadJsfResource("message.js", "org.richfaces").content(/*"<form id=\"form\" name=\"form\" method=\"post\" action=\"/client-test.jsf\" enctype=\"application/x-www-form-urlencoded\">\n" + */
+ loadJsfResource("csv.js", "org.richfaces").loadJsfResource("message.js", "org.richfaces").content("<form id=\"form\" name=\"form\" method=\"post\" action=\"/client-test.jsf\" enctype=\"application/x-www-form-urlencoded\">\n" +
" <input type=\"hidden\" name=\"form\" value=\"form\"/>\n" +
" <input id=\"form:text\" type=\"text\" name=\"form:text\" value=\"fooValue\" onblur=\"form_3Atext_3Av("form:text",this,event)\"/>\n" +
" <span id=\"form:out\">\n" +
" fooValue\n" +
" </span><div id=\"foo\" ><ul id=\"" + MY_MESSAGE + "\">"+getMessageContent()+"</ul></div><input type=\"hidden\" name=\"javax.faces.ViewState\" id=\"javax.faces.ViewState\" value=\"4262028796446907996:-2607792463910755035\" autocomplete=\"off\"/>\n"
- /*+ " </form>"*/);
+ + " </form>");
}
14 years
JBoss Rich Faces SVN: r20698 - trunk/ui/dnd/ui/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-12-20 12:58:37 -0500 (Mon, 20 Dec 2010)
New Revision: 20698
Modified:
trunk/ui/dnd/ui/src/main/java/org/richfaces/renderkit/DropTargetRenderer.java
Log:
https://issues.jboss.org/browse/RF-10057
Modified: trunk/ui/dnd/ui/src/main/java/org/richfaces/renderkit/DropTargetRenderer.java
===================================================================
--- trunk/ui/dnd/ui/src/main/java/org/richfaces/renderkit/DropTargetRenderer.java 2010-12-20 17:06:02 UTC (rev 20697)
+++ trunk/ui/dnd/ui/src/main/java/org/richfaces/renderkit/DropTargetRenderer.java 2010-12-20 17:58:37 UTC (rev 20698)
@@ -33,7 +33,7 @@
Map<String, String> requestParamMap = facesContext.getExternalContext().getRequestParameterMap();
String dragSourceId = (String) requestParamMap.get("dragSource");
- if(!"".equals(dragSourceId)) {
+ if(dragSourceId !=null && !"".equals(dragSourceId)) {
DragSourceContextCallBack dragSourceContextCallBack = new DragSourceContextCallBack();
facesContext.getViewRoot().invokeOnComponent(facesContext, dragSourceId, dragSourceContextCallBack);
14 years