diff --git a/api/src/main/javascript/META-INF/resources/myfaces/_impl/core/Impl.js b/api/src/main/javascript/META-INF/resources/myfaces/_impl/core/Impl.js index c3e5aed426..43275455ce 100644 --- a/api/src/main/javascript/META-INF/resources/myfaces/_impl/core/Impl.js +++ b/api/src/main/javascript/META-INF/resources/myfaces/_impl/core/Impl.js @@ -343,6 +343,9 @@ _MF_SINGLTN(_PFX_CORE + "Impl", _MF_OBJECT, /** @lends myfaces._impl.core.Impl. var delayTimeout = options.delay || this._RT.getLocalOrGlobalConfig(context, "delay", false); if (!!delayTimeout) { + if(delayTimeout.toLowerCase && delayTimeout.toLowerCase() === "none"){ + delayTimeout = 0; + } if(!(delayTimeout >= 0)) { // abbreviation which covers all cases of non positive values, // including NaN and non-numeric strings, no type equality is deliberate here, diff --git a/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js b/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js index 5d0da4feaf..8faf6a9441 100644 --- a/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js +++ b/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js @@ -194,7 +194,10 @@ _MF_SINGLTN(_PFX_XHR+"_AjaxUtils", _MF_OBJECT, form = this._Dom.byId(form); var _t = this; var foundNames = this._Dom.findAll(form, function(node) { - var name = node.getAttribute("name"); + var name = null; + if(node.getAttribute && node.getAttribute("name")) { + name = node.getAttribute("name"); + } if(!name || name.indexOf(_t.P_VIEWSTATE)) { return false; } diff --git a/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java b/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java index c7301b9e20..d563aabd66 100755 --- a/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java +++ b/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java @@ -588,7 +588,6 @@ public final void addELContextListener(final ELContextListener listener) public void publishEvent(FacesContext facesContext, Class systemEventClass, Class sourceBaseType, Object source) { - checkNull(facesContext, "facesContext"); checkNull(systemEventClass, "systemEventClass"); checkNull(source, "source"); @@ -647,7 +646,6 @@ public void publishEvent(FacesContext facesContext, Class @Override public void publishEvent(FacesContext facesContext, Class systemEventClass, Object source) { - checkNull(source, "source"); publishEvent(facesContext, systemEventClass, source.getClass(), source); } diff --git a/impl/src/main/java/org/apache/myfaces/cdi/JsfArtifactProducer.java b/impl/src/main/java/org/apache/myfaces/cdi/JsfArtifactProducer.java index 2fbbb453d8..7d7cd67910 100644 --- a/impl/src/main/java/org/apache/myfaces/cdi/JsfArtifactProducer.java +++ b/impl/src/main/java/org/apache/myfaces/cdi/JsfArtifactProducer.java @@ -31,6 +31,7 @@ import javax.faces.annotation.RequestParameterValuesMap; import javax.faces.annotation.SessionMap; import javax.faces.annotation.ViewMap; +import javax.faces.application.Application; import javax.faces.application.ResourceHandler; import javax.faces.component.UIViewRoot; import javax.faces.context.ExternalContext; @@ -45,9 +46,9 @@ public class JsfArtifactProducer @Produces @Named("application") @ApplicationScoped - public Object getApplication() + public Application getApplication() { - return FacesContext.getCurrentInstance().getExternalContext().getContext(); + return FacesContext.getCurrentInstance().getApplication(); } @Produces diff --git a/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java b/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java index 45f38ebaee..76b6969834 100755 --- a/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java +++ b/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java @@ -590,10 +590,6 @@ public void redirect(final String url) throws IOException PartialViewContext partialViewContext = facesContext.getPartialViewContext(); if (partialViewContext.isPartialRequest()) { - if (_servletResponse instanceof HttpServletResponse && facesContext.getResponseComplete()) - { - throw new IllegalStateException(); - } PartialResponseWriter writer = partialViewContext.getPartialResponseWriter(); this.setResponseContentType("text/xml"); this.setResponseCharacterEncoding("UTF-8"); diff --git a/impl/src/test/java/org/apache/myfaces/component/search/SearchExpressionImplTest.java b/impl/src/test/java/org/apache/myfaces/component/search/SearchExpressionImplTest.java index 7fedce82f0..7cbb8ae396 100644 --- a/impl/src/test/java/org/apache/myfaces/component/search/SearchExpressionImplTest.java +++ b/impl/src/test/java/org/apache/myfaces/component/search/SearchExpressionImplTest.java @@ -423,7 +423,7 @@ public void testMyFaces4695() throws Exception SearchExpressionHandler handler = facesContext.getApplication().getSearchExpressionHandler(); - Assertions.assertEquals("form1:one", handler.resolveClientId(searchContext, "form1:one")); + Assert.assertEquals("form1:one", handler.resolveClientId(searchContext, "form1:one")); processRemainingPhases(); } diff --git a/shared/src/main/java/org/apache/myfaces/shared/application/FacesServletMappingUtils.java b/shared/src/main/java/org/apache/myfaces/shared/application/FacesServletMappingUtils.java index c8ad9e232a..91271fc772 100644 --- a/shared/src/main/java/org/apache/myfaces/shared/application/FacesServletMappingUtils.java +++ b/shared/src/main/java/org/apache/myfaces/shared/application/FacesServletMappingUtils.java @@ -292,7 +292,7 @@ else if (allowExactMatch && mapping.startsWith("/") && mapping.equals(servletPat } if (mapping.equals(servletPath)) { - return FacesServletMapping.createExactMapping(mapping); // MYFACES-4524 + return FacesServletMapping.createPrefixMapping(mapping); } } }