Author: alexsmirnov
Date: 2010-12-02 18:10:02 -0500 (Thu, 02 Dec 2010)
New Revision: 20321
Added:
branches/RF-8742-1/core/api/src/main/java/org/ajax4jsf/javascript/FunctionDefWithDependencies.java
branches/RF-8742-1/core/api/src/main/java/org/ajax4jsf/javascript/ScriptWithDependencies.java
branches/RF-8742-1/core/api/src/main/java/org/richfaces/javascript/ScriptsHolder.java
Modified:
branches/RF-8742-1/core/api/src/main/java/org/richfaces/javascript/JavaScriptService.java
branches/RF-8742-1/core/impl/src/main/java/org/richfaces/component/UIScripts.java
branches/RF-8742-1/core/impl/src/main/java/org/richfaces/context/PartialViewContextImpl.java
branches/RF-8742-1/core/impl/src/main/java/org/richfaces/javascript/JavaScriptServiceImpl.java
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/application/ValidatorModule.java
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/ClientAndAjaxScript.java
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/ClientOnlyScript.java
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/ClientValidatorRenderer.java
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/ComponentValidatorScript.java
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/LibraryScriptFunction.java
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/NullConverterScript.java
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/javascript/ClientScriptServiceTest.java
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/javascript/Script.java
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/javascript/ServiceConfigParserTest.java
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/renderkit/html/RendererGetClientSideScriptTest.java
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/renderkit/html/RendererGetComponentScriptTest.java
branches/RF-8742-1/ui/validator/ui/src/test/resources/org/richfaces/component/test.xhtml
Log:
RESOLVED - issue RF-9612: Create JSF 2.0 resource loading extension to dynamically add
scripts and its dependencies.
https://jira.jboss.org/browse/RF-9612
Copied:
branches/RF-8742-1/core/api/src/main/java/org/ajax4jsf/javascript/FunctionDefWithDependencies.java
(from rev 20317,
branches/RF-8742-1/ui/validator/api/src/main/java/org/richfaces/javascript/FunctionDefWithDependencies.java)
===================================================================
---
branches/RF-8742-1/core/api/src/main/java/org/ajax4jsf/javascript/FunctionDefWithDependencies.java
(rev 0)
+++
branches/RF-8742-1/core/api/src/main/java/org/ajax4jsf/javascript/FunctionDefWithDependencies.java 2010-12-02
23:10:02 UTC (rev 20321)
@@ -0,0 +1,35 @@
+/*
+ * $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.ajax4jsf.javascript;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public interface FunctionDefWithDependencies extends ScriptWithDependencies {
+
+ String getName();
+
+}
Property changes on:
branches/RF-8742-1/core/api/src/main/java/org/ajax4jsf/javascript/FunctionDefWithDependencies.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied:
branches/RF-8742-1/core/api/src/main/java/org/ajax4jsf/javascript/ScriptWithDependencies.java
(from rev 20317,
branches/RF-8742-1/ui/validator/api/src/main/java/org/richfaces/javascript/ScriptWithDependencies.java)
===================================================================
---
branches/RF-8742-1/core/api/src/main/java/org/ajax4jsf/javascript/ScriptWithDependencies.java
(rev 0)
+++
branches/RF-8742-1/core/api/src/main/java/org/ajax4jsf/javascript/ScriptWithDependencies.java 2010-12-02
23:10:02 UTC (rev 20321)
@@ -0,0 +1,13 @@
+package org.ajax4jsf.javascript;
+
+import org.richfaces.resource.ResourceLibrary;
+
+/**
+ * This interface describes JavaScript object with optional dependent resources.
+ * @author asmirnov
+ *
+ */
+public interface ScriptWithDependencies extends ResourceLibrary, ScriptString {
+
+
+}
\ No newline at end of file
Property changes on:
branches/RF-8742-1/core/api/src/main/java/org/ajax4jsf/javascript/ScriptWithDependencies.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Modified:
branches/RF-8742-1/core/api/src/main/java/org/richfaces/javascript/JavaScriptService.java
===================================================================
---
branches/RF-8742-1/core/api/src/main/java/org/richfaces/javascript/JavaScriptService.java 2010-12-02
19:50:37 UTC (rev 20320)
+++
branches/RF-8742-1/core/api/src/main/java/org/richfaces/javascript/JavaScriptService.java 2010-12-02
23:10:02 UTC (rev 20321)
@@ -53,4 +53,12 @@
* @return
*/
<S> S addPageReadyScript(FacesContext facesContext, S script);
+
+ /**
+ * <p class="changed_added_4_0">Get object with collection of scripts
designeted for deffered rendering.</p>
+ * @param context
+ * @return ViewResource component that holds contect of all scripts, or special case
object with empty collections.
+ */
+ ScriptsHolder getScriptsHolder(FacesContext context);
+
}
Added:
branches/RF-8742-1/core/api/src/main/java/org/richfaces/javascript/ScriptsHolder.java
===================================================================
--- branches/RF-8742-1/core/api/src/main/java/org/richfaces/javascript/ScriptsHolder.java
(rev 0)
+++
branches/RF-8742-1/core/api/src/main/java/org/richfaces/javascript/ScriptsHolder.java 2010-12-02
23:10:02 UTC (rev 20321)
@@ -0,0 +1,15 @@
+package org.richfaces.javascript;
+
+import java.util.Collection;
+
+public interface ScriptsHolder {
+
+ Collection<Object> getScripts();
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the pageReadyScripts
+ */
+ Collection<Object> getPageReadyScripts();
+
+}
\ No newline at end of file
Property changes on:
branches/RF-8742-1/core/api/src/main/java/org/richfaces/javascript/ScriptsHolder.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
branches/RF-8742-1/core/impl/src/main/java/org/richfaces/component/UIScripts.java
===================================================================
---
branches/RF-8742-1/core/impl/src/main/java/org/richfaces/component/UIScripts.java 2010-12-02
19:50:37 UTC (rev 20320)
+++
branches/RF-8742-1/core/impl/src/main/java/org/richfaces/component/UIScripts.java 2010-12-02
23:10:02 UTC (rev 20321)
@@ -26,6 +26,8 @@
import java.util.Collection;
import java.util.List;
+import org.richfaces.javascript.ScriptsHolder;
+
import com.google.common.collect.Lists;
/**
@@ -37,7 +39,7 @@
* @author asmirnov(a)exadel.com
*
*/
-public class UIScripts extends UITransient {
+public class UIScripts extends UITransient implements ScriptsHolder {
public static final String COMPONENT_TYPE = "org.richfaces.Scripts";
@@ -50,13 +52,15 @@
private String target = "form";
+ /* (non-Javadoc)
+ * @see org.richfaces.component.ScriptsHolder#getScripts()
+ */
public Collection<Object> getScripts() {
return scripts;
}
- /**
- * <p class="changed_added_4_0"></p>
- * @return the pageReadyScripts
+ /* (non-Javadoc)
+ * @see org.richfaces.component.ScriptsHolder#getPageReadyScripts()
*/
public Collection<Object> getPageReadyScripts() {
return this.pageReadyScripts;
Modified:
branches/RF-8742-1/core/impl/src/main/java/org/richfaces/context/PartialViewContextImpl.java
===================================================================
---
branches/RF-8742-1/core/impl/src/main/java/org/richfaces/context/PartialViewContextImpl.java 2010-12-02
19:50:37 UTC (rev 20320)
+++
branches/RF-8742-1/core/impl/src/main/java/org/richfaces/context/PartialViewContextImpl.java 2010-12-02
23:10:02 UTC (rev 20321)
@@ -47,7 +47,11 @@
import javax.faces.event.PhaseId;
import org.ajax4jsf.context.AjaxContext;
+import org.ajax4jsf.javascript.ScriptUtils;
+import org.richfaces.application.ServiceTracker;
import org.richfaces.component.MetaComponentEncoder;
+import org.richfaces.javascript.JavaScriptService;
+import org.richfaces.javascript.ScriptsHolder;
import org.richfaces.log.Logger;
import org.richfaces.log.RichfacesLogger;
import org.richfaces.renderkit.util.CoreAjaxRendererUtils;
@@ -425,6 +429,15 @@
}
protected void renderExtensions(FacesContext context, UIComponent component) throws
IOException {
+ // ADD deffered scripts
+ AjaxContext ajaxContext = AjaxContext.getCurrentInstance();
+ ScriptsHolder scriptsHolder =
ServiceTracker.getService(JavaScriptService.class).getScriptsHolder(context);
+ for (Object script : scriptsHolder.getScripts()) {
+ ajaxContext.appendOncomplete(ScriptUtils.toScript(script));
+ }
+ for (Object script : scriptsHolder.getPageReadyScripts()) {
+ ajaxContext.appendOncomplete(ScriptUtils.toScript(script));
+ }
CoreAjaxRendererUtils.renderAjaxExtensions(context, component);
}
Modified:
branches/RF-8742-1/core/impl/src/main/java/org/richfaces/javascript/JavaScriptServiceImpl.java
===================================================================
---
branches/RF-8742-1/core/impl/src/main/java/org/richfaces/javascript/JavaScriptServiceImpl.java 2010-12-02
19:50:37 UTC (rev 20320)
+++
branches/RF-8742-1/core/impl/src/main/java/org/richfaces/javascript/JavaScriptServiceImpl.java 2010-12-02
23:10:02 UTC (rev 20321)
@@ -24,6 +24,7 @@
package org.richfaces.javascript;
import java.util.Collection;
+import java.util.Collections;
import java.util.List;
import javax.faces.FacesException;
@@ -42,6 +43,21 @@
*/
public class JavaScriptServiceImpl implements JavaScriptService {
+ /**
+ * <p class="changed_added_4_0">'Special Case' object to
return if no Component with scripts added to View Root.</p>
+ *
+ */
+ private static final ScriptsHolder EMPTY_SCRIPTS_HOLDER = new ScriptsHolder(){
+
+ public Collection<Object> getScripts() {
+ return Collections.emptySet();
+ }
+
+ public Collection<Object> getPageReadyScripts() {
+ return Collections.emptySet();
+ }
+
+ };
/*
* (non-Javadoc)
*
@@ -89,20 +105,25 @@
if (null == viewRoot) {
throw new FacesException("View is not created");
}
+ UIScripts scriptResource = findScriptResource(facesContext, viewRoot);
+ if (null == scriptResource) {
+ scriptResource = (UIScripts)
facesContext.getApplication().createComponent(UIScripts.COMPONENT_TYPE);
+ viewRoot.addComponentResource(facesContext, scriptResource);
+ }
+ return scriptResource;
+ }
+
+ private UIScripts findScriptResource(FacesContext facesContext, UIViewRoot viewRoot)
{
List<UIComponent> componentResources =
viewRoot.getComponentResources(facesContext, "form");
- UIScripts scriptResource = findScriptResource(componentResources);
+ UIScripts scriptResource = findScriptComponent(componentResources);
if (null == scriptResource) {
componentResources = viewRoot.getComponentResources(facesContext,
"body");
- scriptResource = findScriptResource(componentResources);
- if (null == scriptResource) {
- scriptResource = (UIScripts)
facesContext.getApplication().createComponent(UIScripts.COMPONENT_TYPE);
- viewRoot.addComponentResource(facesContext, scriptResource);
- }
+ scriptResource = findScriptComponent(componentResources);
}
return scriptResource;
}
- private UIScripts findScriptResource(List<UIComponent> componentResources) {
+ private UIScripts findScriptComponent(List<UIComponent> componentResources) {
for (UIComponent uiComponent : componentResources) {
if (uiComponent instanceof UIScripts) {
UIScripts script = (UIScripts) uiComponent;
@@ -112,4 +133,16 @@
return null;
}
+ public ScriptsHolder getScriptsHolder(FacesContext context) {
+ UIViewRoot viewRoot = context.getViewRoot();
+ ScriptsHolder result=null;
+ if (null != viewRoot) {
+ result = findScriptResource(context, viewRoot);
+ }
+ if(null == result){
+ result = EMPTY_SCRIPTS_HOLDER;
+ }
+ return result;
+ }
+
}
Modified:
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/application/ValidatorModule.java
===================================================================
---
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/application/ValidatorModule.java 2010-12-02
19:50:37 UTC (rev 20320)
+++
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/application/ValidatorModule.java 2010-12-02
23:10:02 UTC (rev 20321)
@@ -31,8 +31,6 @@
import org.richfaces.javascript.ClientScriptService;
import org.richfaces.javascript.ClientScriptServiceImpl;
import org.richfaces.javascript.ClientServiceConfigParser;
-import org.richfaces.javascript.JavaScriptService;
-import org.richfaces.javascript.JavaScriptServiceImpl;
import org.richfaces.javascript.LibraryFunction;
import org.richfaces.validator.BeanValidator;
import org.richfaces.validator.BeanValidatorFactory;
Modified:
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/ClientAndAjaxScript.java
===================================================================
---
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/ClientAndAjaxScript.java 2010-12-02
19:50:37 UTC (rev 20320)
+++
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/ClientAndAjaxScript.java 2010-12-02
23:10:02 UTC (rev 20321)
@@ -2,7 +2,7 @@
import java.util.Collection;
-import org.richfaces.javascript.ScriptWithDependencies;
+import org.ajax4jsf.javascript.ScriptWithDependencies;
import org.richfaces.resource.ResourceKey;
import com.google.common.collect.Iterables;
Modified:
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/ClientOnlyScript.java
===================================================================
---
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/ClientOnlyScript.java 2010-12-02
19:50:37 UTC (rev 20320)
+++
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/ClientOnlyScript.java 2010-12-02
23:10:02 UTC (rev 20321)
@@ -3,7 +3,7 @@
import java.util.Collection;
import java.util.LinkedHashSet;
-import org.richfaces.javascript.ScriptWithDependencies;
+import org.ajax4jsf.javascript.ScriptWithDependencies;
import org.richfaces.resource.ResourceKey;
import com.google.common.collect.Iterables;
Modified:
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/ClientValidatorRenderer.java
===================================================================
---
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/ClientValidatorRenderer.java 2010-12-02
19:50:37 UTC (rev 20320)
+++
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/ClientValidatorRenderer.java 2010-12-02
23:10:02 UTC (rev 20321)
@@ -19,6 +19,7 @@
import org.ajax4jsf.javascript.JSReference;
import org.ajax4jsf.javascript.ScriptUtils;
+import org.ajax4jsf.javascript.ScriptWithDependencies;
import org.richfaces.application.ServiceTracker;
import org.richfaces.component.behavior.ClientValidatorBehavior;
import org.richfaces.component.behavior.ConverterNotFoundException;
@@ -26,7 +27,6 @@
import org.richfaces.javascript.JavaScriptService;
import org.richfaces.javascript.LibraryFunction;
import org.richfaces.javascript.ScriptNotFoundException;
-import org.richfaces.javascript.ScriptWithDependencies;
import org.richfaces.validator.ConverterDescriptor;
import org.richfaces.validator.FacesObjectDescriptor;
import org.richfaces.validator.ValidatorDescriptor;
Modified:
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/ComponentValidatorScript.java
===================================================================
---
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/ComponentValidatorScript.java 2010-12-02
19:50:37 UTC (rev 20320)
+++
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/ComponentValidatorScript.java 2010-12-02
23:10:02 UTC (rev 20321)
@@ -1,6 +1,6 @@
package org.richfaces.renderkit.html;
-import org.richfaces.javascript.FunctionDefWithDependencies;
+import org.ajax4jsf.javascript.FunctionDefWithDependencies;
public interface ComponentValidatorScript extends FunctionDefWithDependencies {
Modified:
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/LibraryScriptFunction.java
===================================================================
---
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/LibraryScriptFunction.java 2010-12-02
19:50:37 UTC (rev 20320)
+++
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/LibraryScriptFunction.java 2010-12-02
23:10:02 UTC (rev 20321)
@@ -24,8 +24,8 @@
package org.richfaces.renderkit.html;
import org.ajax4jsf.javascript.JSFunction;
+import org.ajax4jsf.javascript.ScriptWithDependencies;
import org.richfaces.javascript.LibraryFunction;
-import org.richfaces.javascript.ScriptWithDependencies;
import org.richfaces.resource.ResourceKey;
/**
Modified:
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/NullConverterScript.java
===================================================================
---
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/NullConverterScript.java 2010-12-02
19:50:37 UTC (rev 20320)
+++
branches/RF-8742-1/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/NullConverterScript.java 2010-12-02
23:10:02 UTC (rev 20321)
@@ -6,7 +6,7 @@
import java.util.Collections;
import org.ajax4jsf.javascript.JSLiteral;
-import org.richfaces.javascript.ScriptWithDependencies;
+import org.ajax4jsf.javascript.ScriptWithDependencies;
import org.richfaces.resource.ResourceKey;
/**
Modified:
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/javascript/ClientScriptServiceTest.java
===================================================================
---
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/javascript/ClientScriptServiceTest.java 2010-12-02
19:50:37 UTC (rev 20320)
+++
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/javascript/ClientScriptServiceTest.java 2010-12-02
23:10:02 UTC (rev 20321)
@@ -3,15 +3,13 @@
*/
package org.richfaces.javascript;
-import static org.easymock.EasyMock.expect;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.*;
import java.util.Map;
import javax.faces.application.Resource;
import javax.faces.application.ResourceHandler;
-import javax.faces.context.FacesContext;
import javax.validation.constraints.Max;
import org.jboss.test.faces.mock.Environment;
@@ -24,9 +22,6 @@
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.richfaces.javascript.ClientScriptServiceImpl;
-import org.richfaces.javascript.LibraryFunction;
-import org.richfaces.javascript.ScriptNotFoundException;
import org.richfaces.resource.ResourceKey;
import org.richfaces.validator.ValidatorWithFacesResource;
Modified:
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/javascript/Script.java
===================================================================
---
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/javascript/Script.java 2010-12-02
19:50:37 UTC (rev 20320)
+++
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/javascript/Script.java 2010-12-02
23:10:02 UTC (rev 20321)
@@ -3,9 +3,13 @@
import java.io.IOException;
import java.util.Collections;
+import org.ajax4jsf.javascript.ScriptWithDependencies;
import org.richfaces.resource.ResourceKey;
final class Script implements ScriptWithDependencies {
+
+ static final ResourceKey FOO_RESOURCE =
ResourceKey.create("foo","org.rf");
+
private final String name;
Script(String name) {
@@ -29,7 +33,7 @@
}
public Iterable<ResourceKey> getResources() {
- return Collections.singleton(JavaScriptServiceTest.FOO_RESOURCE);
+ return Collections.singleton(FOO_RESOURCE);
}
/* (non-Javadoc)
Modified:
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/javascript/ServiceConfigParserTest.java
===================================================================
---
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/javascript/ServiceConfigParserTest.java 2010-12-02
19:50:37 UTC (rev 20320)
+++
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/javascript/ServiceConfigParserTest.java 2010-12-02
23:10:02 UTC (rev 20321)
@@ -9,8 +9,6 @@
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import org.richfaces.javascript.ClientServiceConfigParser;
-import org.richfaces.javascript.LibraryFunction;
import org.richfaces.resource.ResourceKey;
import com.google.common.collect.Iterables;
Modified:
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/renderkit/html/RendererGetClientSideScriptTest.java
===================================================================
---
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/renderkit/html/RendererGetClientSideScriptTest.java 2010-12-02
19:50:37 UTC (rev 20320)
+++
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/renderkit/html/RendererGetClientSideScriptTest.java 2010-12-02
23:10:02 UTC (rev 20321)
@@ -11,6 +11,7 @@
import javax.faces.convert.NumberConverter;
import javax.faces.validator.RegexValidator;
+import org.ajax4jsf.javascript.ScriptWithDependencies;
import org.jboss.test.faces.mock.Mock;
import org.jboss.test.faces.mock.MockTestRunner;
import org.junit.After;
@@ -20,7 +21,6 @@
import org.richfaces.application.ServiceTracker;
import org.richfaces.javascript.ClientScriptService;
import org.richfaces.javascript.LibraryFunction;
-import org.richfaces.javascript.ScriptWithDependencies;
import org.richfaces.javascript.ScriptNotFoundException;
import org.richfaces.validator.ConverterDescriptor;
import org.richfaces.validator.ValidatorDescriptor;
Modified:
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/renderkit/html/RendererGetComponentScriptTest.java
===================================================================
---
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/renderkit/html/RendererGetComponentScriptTest.java 2010-12-02
19:50:37 UTC (rev 20320)
+++
branches/RF-8742-1/ui/validator/ui/src/test/java/org/richfaces/renderkit/html/RendererGetComponentScriptTest.java 2010-12-02
23:10:02 UTC (rev 20321)
@@ -17,6 +17,7 @@
import javax.validation.constraints.Min;
import org.ajax4jsf.javascript.JSReference;
+import org.ajax4jsf.javascript.ScriptWithDependencies;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
@@ -26,7 +27,6 @@
import org.junit.runner.RunWith;
import org.richfaces.javascript.LibraryFunction;
import org.richfaces.javascript.ScriptNotFoundException;
-import org.richfaces.javascript.ScriptWithDependencies;
import org.richfaces.resource.ResourceKey;
import org.richfaces.validator.ConverterDescriptor;
import org.richfaces.validator.FacesObjectDescriptor;
Modified:
branches/RF-8742-1/ui/validator/ui/src/test/resources/org/richfaces/component/test.xhtml
===================================================================
---
branches/RF-8742-1/ui/validator/ui/src/test/resources/org/richfaces/component/test.xhtml 2010-12-02
19:50:37 UTC (rev 20320)
+++
branches/RF-8742-1/ui/validator/ui/src/test/resources/org/richfaces/component/test.xhtml 2010-12-02
23:10:02 UTC (rev 20321)
@@ -11,7 +11,6 @@
</h:inputText>
<h:outputText id="out"
value="#{test.value}"></h:outputText>
<h:message id="message" for="text" />
- <h:commandLink id="submit">Submit</h:commandLink>
</h:form>
</h:body>
</html>