You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2014/09/16 23:34:53 UTC
svn commit: r1625403 - in /myfaces/shared/trunk_4.0.x/core: ./
src/main/java/org/apache/myfaces/shared/context/
src/main/java/org/apache/myfaces/shared/renderkit/html/
Author: lu4242
Date: Tue Sep 16 21:34:53 2014
New Revision: 1625403
URL: http://svn.apache.org/r1625403
Log:
update shared for 2.0.22 release
Modified:
myfaces/shared/trunk_4.0.x/core/pom.xml
myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/context/SwitchAjaxExceptionHandlerWrapperImpl.java
myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlJavaScriptUtils.java
myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java
Modified: myfaces/shared/trunk_4.0.x/core/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_4.0.x/core/pom.xml?rev=1625403&r1=1625402&r2=1625403&view=diff
==============================================================================
--- myfaces/shared/trunk_4.0.x/core/pom.xml (original)
+++ myfaces/shared/trunk_4.0.x/core/pom.xml Tue Sep 16 21:34:53 2014
@@ -143,7 +143,7 @@
<profile>
<id>synch-myfaces-impl-shared</id>
<properties>
- <myfaces.impl.shared.version>2.0.20-SNAPSHOT</myfaces.impl.shared.version>
+ <myfaces.impl.shared.version>2.0.22-SNAPSHOT</myfaces.impl.shared.version>
</properties>
<activation>
<property>
Modified: myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/context/SwitchAjaxExceptionHandlerWrapperImpl.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/context/SwitchAjaxExceptionHandlerWrapperImpl.java?rev=1625403&r1=1625402&r2=1625403&view=diff
==============================================================================
--- myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/context/SwitchAjaxExceptionHandlerWrapperImpl.java (original)
+++ myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/context/SwitchAjaxExceptionHandlerWrapperImpl.java Tue Sep 16 21:34:53 2014
@@ -21,6 +21,7 @@ package org.apache.myfaces.shared.contex
import javax.faces.context.ExceptionHandler;
import javax.faces.context.ExceptionHandlerWrapper;
import javax.faces.context.FacesContext;
+import javax.faces.context.PartialViewContext;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.ExceptionQueuedEvent;
import javax.faces.event.ExceptionQueuedEventContext;
@@ -31,9 +32,6 @@ import javax.faces.event.SystemEvent;
* normal exceptionHandler wrapping, because FacesContext is initialized after
* ExceptionHandler, so it is not safe to get it when
* ExceptionHandlerFactory.getExceptionHandler() is called.
- *
- * @author Leonardo Uribe
- *
*/
public class SwitchAjaxExceptionHandlerWrapperImpl extends ExceptionHandlerWrapper
{
@@ -85,7 +83,12 @@ public class SwitchAjaxExceptionHandlerW
if (_isAjaxRequest == null)
{
facesContext = (facesContext == null) ? FacesContext.getCurrentInstance() : facesContext;
- _isAjaxRequest = facesContext.getPartialViewContext().isAjaxRequest();
+ PartialViewContext pvc = facesContext.getPartialViewContext();
+ if (pvc == null)
+ {
+ return false;
+ }
+ _isAjaxRequest = pvc.isAjaxRequest();
}
return _isAjaxRequest;
}
@@ -95,7 +98,12 @@ public class SwitchAjaxExceptionHandlerW
if (_isAjaxRequest == null)
{
FacesContext facesContext = FacesContext.getCurrentInstance();
- _isAjaxRequest = facesContext.getPartialViewContext().isAjaxRequest();
+ PartialViewContext pvc = facesContext.getPartialViewContext();
+ if (pvc == null)
+ {
+ return false;
+ }
+ _isAjaxRequest = pvc.isAjaxRequest();
}
return _isAjaxRequest;
}
Modified: myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlJavaScriptUtils.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlJavaScriptUtils.java?rev=1625403&r1=1625402&r2=1625403&view=diff
==============================================================================
--- myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlJavaScriptUtils.java (original)
+++ myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlJavaScriptUtils.java Tue Sep 16 21:34:53 2014
@@ -156,9 +156,9 @@ public final class HtmlJavaScriptUtils
private static void prepareScript(FacesContext facesContext,
ScriptContext context, boolean autoScroll)
{
-
- final char separatorChar = UINamingContainer
- .getSeparatorChar(facesContext);
+ // MYFACES-3919 remember idcl separator char is special and always should be ':',
+ // because it should be hardcoded into the js file.
+ final char idclSeparatorChar = ':';
context.prettyLine();
//render a function to create a hidden input, if it doesn't exist
@@ -302,7 +302,7 @@ public final class HtmlJavaScriptUtils
context.prettyLine();
context.append(SET_HIDDEN_INPUT_FN_NAME);
- context.append("(formName,formName +'" + separatorChar + "'+'"
+ context.append("(formName,formName +'" + idclSeparatorChar + "'+'"
+ HtmlRendererUtils.HIDDEN_COMMANDLINK_FIELD_NAME
+ "',linkId);");
@@ -355,7 +355,7 @@ public final class HtmlJavaScriptUtils
context.prettyLine();
context.append(CLEAR_HIDDEN_INPUT_FN_NAME);
- context.append("(formName,formName +'" + separatorChar + "'+'"
+ context.append("(formName,formName +'" + idclSeparatorChar + "'+'"
+ HtmlRendererUtils.HIDDEN_COMMANDLINK_FIELD_NAME
+ "',linkId);");
Modified: myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java?rev=1625403&r1=1625402&r2=1625403&view=diff
==============================================================================
--- myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java (original)
+++ myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java Tue Sep 16 21:34:53 2014
@@ -1583,8 +1583,8 @@ public final class HtmlRendererUtils
{
return HIDDEN_COMMANDLINK_FIELD_NAME_TRINIDAD;
}
- return formInfo.getFormName() + UINamingContainer.getSeparatorChar(FacesContext
- .getCurrentInstance()) + HIDDEN_COMMANDLINK_FIELD_NAME;
+ return formInfo.getFormName() + ':'
+ + HIDDEN_COMMANDLINK_FIELD_NAME;
}
public static String getHiddenCommandLinkFieldName(
@@ -1594,7 +1594,7 @@ public final class HtmlRendererUtils
{
return HIDDEN_COMMANDLINK_FIELD_NAME_TRINIDAD;
}
- return formInfo.getFormName() + UINamingContainer.getSeparatorChar(facesContext)
+ return formInfo.getFormName() + ':'
+ HIDDEN_COMMANDLINK_FIELD_NAME;
}
@@ -1628,7 +1628,7 @@ public final class HtmlRendererUtils
public static String getHiddenCommandLinkFieldNameMyfacesOld(
FormInfo formInfo)
{
- return formInfo.getFormName() + UINamingContainer.getSeparatorChar(FacesContext.getCurrentInstance())
+ return formInfo.getFormName() + ':'
+ HIDDEN_COMMANDLINK_FIELD_NAME_MYFACES_OLD;
}