You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ta...@apache.org on 2017/12/10 13:50:45 UTC
svn commit: r1817712 - in /myfaces/core/branches/2.3.x:
impl/src/main/java/org/apache/myfaces/context/servlet/
impl/src/main/java/org/apache/myfaces/webapp/
shared/src/main/java/org/apache/myfaces/shared/config/
Author: tandraschko
Date: Sun Dec 10 13:50:45 2017
New Revision: 1817712
URL: http://svn.apache.org/viewvc?rev=1817712&view=rev
Log:
code cleanup / removed unused code
Modified:
myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/context/servlet/PartialViewContextImpl.java
myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java
myfaces/core/branches/2.3.x/shared/src/main/java/org/apache/myfaces/shared/config/MyfacesConfig.java
Modified: myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/context/servlet/PartialViewContextImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/context/servlet/PartialViewContextImpl.java?rev=1817712&r1=1817711&r2=1817712&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/context/servlet/PartialViewContextImpl.java (original)
+++ myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/context/servlet/PartialViewContextImpl.java Sun Dec 10 13:50:45 2017
@@ -512,43 +512,6 @@ public class PartialViewContextImpl exte
processRenderResource(_facesContext, writer, rvc, updatedComponents, "head");
processRenderResource(_facesContext, writer, rvc, updatedComponents, "body");
processRenderResource(_facesContext, writer, rvc, updatedComponents, "form");
-
- /*
- if (!ExternalContextUtils.isPortlet(_facesContext.getExternalContext()) &&
- MyfacesConfig.getCurrentInstance(externalContext).isStrictJsf2RefreshTargetAjax())
- {
- RequestViewContext rvc = RequestViewContext.getCurrentInstance(_facesContext);
- if (rvc.isRenderTarget("head"))
- {
- UIComponent head = findHeadComponent(viewRoot);
- if (head != null)
- {
- writer.startUpdate("javax.faces.ViewHead");
- head.encodeAll(_facesContext);
- writer.endUpdate();
- if (updatedComponents == null)
- {
- updatedComponents = new ArrayList<UIComponent>();
- }
- updatedComponents.add(head);
- }
- }
- if (rvc.isRenderTarget("body") || rvc.isRenderTarget("form"))
- {
- UIComponent body = findBodyComponent(viewRoot);
- if (body != null)
- {
- writer.startUpdate("javax.faces.ViewBody");
- body.encodeAll(_facesContext);
- writer.endUpdate();
- if (updatedComponents == null)
- {
- updatedComponents = new ArrayList<UIComponent>();
- }
- updatedComponents.add(body);
- }
- }
- }*/
VisitContext visitCtx = getVisitContextFactory().getVisitContext(
_facesContext, renderIds, PARTIAL_RENDER_HINTS);
@@ -564,32 +527,6 @@ public class PartialViewContextImpl exte
processRenderResource(_facesContext, writer, rvc, updatedComponents, "body");
processRenderResource(_facesContext, writer, rvc, updatedComponents, "form");
}
- /*
- else if (!ExternalContextUtils.isPortlet(_facesContext.getExternalContext()) &&
- MyfacesConfig.getCurrentInstance(externalContext).isStrictJsf2RefreshTargetAjax())
- {
- RequestViewContext rvc = RequestViewContext.getCurrentInstance(_facesContext);
- if (rvc.isRenderTarget("head"))
- {
- UIComponent head = findHeadComponent(viewRoot);
- if (head != null)
- {
- writer.startUpdate("javax.faces.ViewHead");
- head.encodeAll(_facesContext);
- writer.endUpdate();
- }
- }
- if (rvc.isRenderTarget("body") || rvc.isRenderTarget("form"))
- {
- UIComponent body = findBodyComponent(viewRoot);
- if (body != null)
- {
- writer.startUpdate("javax.faces.ViewBody");
- body.encodeAll(_facesContext);
- writer.endUpdate();
- }
- }
- }*/
List<String> evalScripts = pvc.getEvalScripts();
if (evalScripts != null && evalScripts.size() > 0)
Modified: myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java?rev=1817712&r1=1817711&r2=1817712&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java (original)
+++ myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java Sun Dec 10 13:50:45 2017
@@ -868,5 +868,11 @@ public abstract class AbstractFacesIniti
{
log.severe("'org.apache.myfaces.ERROR_HANDLER' is not supported anymore since 2.3.");
}
+
+ value = externalContext.getInitParameter("org.apache.myfaces.STRICT_JSF_2_REFRESH_TARGET_AJAX");
+ if (value != null && !value.isEmpty())
+ {
+ log.severe("'org.apache.myfaces.STRICT_JSF_2_REFRESH_TARGET_AJAX' is not supported anymore since 2.3.");
+ }
}
}
Modified: myfaces/core/branches/2.3.x/shared/src/main/java/org/apache/myfaces/shared/config/MyfacesConfig.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/shared/src/main/java/org/apache/myfaces/shared/config/MyfacesConfig.java?rev=1817712&r1=1817711&r2=1817712&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/shared/src/main/java/org/apache/myfaces/shared/config/MyfacesConfig.java (original)
+++ myfaces/core/branches/2.3.x/shared/src/main/java/org/apache/myfaces/shared/config/MyfacesConfig.java Sun Dec 10 13:50:45 2017
@@ -313,21 +313,6 @@ public class MyfacesConfig
public final static boolean INIT_PARAM_DEBUG_PHASE_LISTENER_DEFAULT = false;
/**
- * DEPRECATED: No longer used in JSF 2.3, because PartialViewContext now contemplates update resources
- * in ajax request. Detect if a target (usually head) should be update for the current view in an ajax render
- * operation. This is activated if a css or js resource is added dynamically by effect of a refresh
- * (c:if, ui:include src="#{...}" or a manipulation of the tree). This ensures ajax updates of content
- * using ui:include will be consistent. Note this behavior is a myfaces specific extension, so to
- * ensure strict compatibility with the spec, set this param to false (default false).
- *
- * @deprecated
- */
- @JSFWebConfigParam(since="2.0.10", expectedValues="true, false", defaultValue="false",deprecated = true)
- public final static String INIT_PARAM_STRICT_JSF_2_REFRESH_TARGET_AJAX =
- "org.apache.myfaces.STRICT_JSF_2_REFRESH_TARGET_AJAX";
- public final static boolean INIT_PARAM_STRICT_JSF_2_REFRESH_TARGET_AJAX_DEFAULT = false;
-
- /**
* Change default getType() behavior for composite component EL resolver, from return null
* (see JSF 2_0 spec section 5_6_2_2) to
* use the metadata information added by composite:attribute, ensuring components working with
@@ -574,7 +559,6 @@ public class MyfacesConfig
private boolean _wrapScriptContentWithXmlCommentTag;
private boolean _renderFormSubmitScriptInline;
private boolean _debugPhaseListenerEnabled;
- private boolean _strictJsf2RefreshTargetAjax;
private boolean _strictJsf2CCELResolver;
private String _defaultResponseWriterContentTypeMode;
private boolean _viewUniqueIdsCacheEnabled;
@@ -686,7 +670,6 @@ public class MyfacesConfig
setCheckExtensionsFilter(false);
setRenderFormSubmitScriptInline(INIT_PARAM_RENDER_FORM_SUBMIT_SCRIPT_INLINE_DEFAULT);
setDebugPhaseListenerEnabled(INIT_PARAM_DEBUG_PHASE_LISTENER_DEFAULT);
- setStrictJsf2RefreshTargetAjax(INIT_PARAM_STRICT_JSF_2_REFRESH_TARGET_AJAX_DEFAULT);
setStrictJsf2CCELResolver(INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER_DEFAULT);
setDefaultResponseWriterContentTypeMode(INIT_PARAM_DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE_DEFAULT);
setViewUniqueIdsCacheEnabled(INIT_PARAM_VIEW_UNIQUE_IDS_CACHE_ENABLED_DEFAULT);
@@ -789,10 +772,7 @@ public class MyfacesConfig
myfacesConfig.setDebugPhaseListenerEnabled(getBooleanInitParameter(extCtx, INIT_PARAM_DEBUG_PHASE_LISTENER,
INIT_PARAM_DEBUG_PHASE_LISTENER_DEFAULT));
-
- myfacesConfig.setStrictJsf2RefreshTargetAjax(WebConfigParamUtils.getBooleanInitParameter(extCtx,
- INIT_PARAM_STRICT_JSF_2_REFRESH_TARGET_AJAX, INIT_PARAM_STRICT_JSF_2_REFRESH_TARGET_AJAX_DEFAULT));
-
+
myfacesConfig.setStrictJsf2CCELResolver(WebConfigParamUtils.getBooleanInitParameter(extCtx,
INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER, INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER_DEFAULT));
@@ -1344,16 +1324,6 @@ public class MyfacesConfig
this._debugPhaseListenerEnabled = debugPhaseListener;
}
- public boolean isStrictJsf2RefreshTargetAjax()
- {
- return _strictJsf2RefreshTargetAjax;
- }
-
- public void setStrictJsf2RefreshTargetAjax(boolean strictJsf2RefreshTargetAjax)
- {
- this._strictJsf2RefreshTargetAjax = strictJsf2RefreshTargetAjax;
- }
-
public boolean isStrictJsf2CCELResolver()
{
return _strictJsf2CCELResolver;