You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ja...@apache.org on 2010/03/09 16:19:13 UTC
svn commit: r920919 -
/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewParameter.java
Author: jakobk
Date: Tue Mar 9 15:19:13 2010
New Revision: 920919
URL: http://svn.apache.org/viewvc?rev=920919&view=rev
Log:
MYFACES-2592 UIViewParameter.decode() should set the submitted value only if it is not null
Modified:
myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewParameter.java
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewParameter.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewParameter.java?rev=920919&r1=920918&r2=920919&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewParameter.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewParameter.java Tue Mar 9 15:19:13 2010
@@ -75,7 +75,14 @@ public class UIViewParameter extends UII
{
// Override behavior from superclass to pull a value from the incoming request parameter map under the
// name given by getName() and store it with a call to UIInput.setSubmittedValue(java.lang.Object).
- setSubmittedValue(context.getExternalContext().getRequestParameterMap().get(getName()));
+ String value = context.getExternalContext().getRequestParameterMap().get(getName());
+
+ // only apply the value if it is non-null (otherwise postbacks
+ // to a view with view parameters would not work correctly)
+ if (value != null)
+ {
+ setSubmittedValue(value);
+ }
}
@Override