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/05/07 16:47:19 UTC
svn commit: r942088 -
/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java
Author: jakobk
Date: Fri May 7 14:47:19 2010
New Revision: 942088
URL: http://svn.apache.org/viewvc?rev=942088&view=rev
Log:
MYFACES-2676 Include the whole component tree with all real values in the debug page (changed FacesContext.getCurrentInstance() to getFacesContext() and added a null check in getValueExpression())
Modified:
myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java?rev=942088&r1=942087&r2=942088&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java Fri May 7 14:47:19 2010
@@ -115,10 +115,10 @@ public class UIInput extends UIOutput im
@Override
public void setValue(Object value)
{
- if (FacesContext.getCurrentInstance().isProjectStage(ProjectStage.Development))
+ if (getFacesContext().isProjectStage(ProjectStage.Development))
{
// extended debug-info when in Development mode
- _createFieldDebugInfo(FacesContext.getCurrentInstance(), "localValue",
+ _createFieldDebugInfo(getFacesContext(), "localValue",
getLocalValue(), value, 1);
}
setLocalValueSet(true);
@@ -563,7 +563,8 @@ public class UIInput extends UIOutput im
// override this method to be able to install a _DebugValueExpressionWrapper
ValueExpression valueExpression = super.getValueExpression(name);
- if (FacesContext.getCurrentInstance().isProjectStage(ProjectStage.Development)
+ if (valueExpression != null
+ && getFacesContext().isProjectStage(ProjectStage.Development)
&& "value".equals(name))
{
// use a _DebugValueExpressionWrapper for debugging of the value-ValueExpression
@@ -571,7 +572,7 @@ public class UIInput extends UIOutput im
}
return valueExpression;
}
-
+
/**
* A boolean value that identifies the phase during which action events should fire.
* <p>
@@ -802,10 +803,10 @@ public class UIInput extends UIOutput im
public void setSubmittedValue(Object submittedValue)
{
- if (FacesContext.getCurrentInstance().isProjectStage(ProjectStage.Development))
+ if (getFacesContext().isProjectStage(ProjectStage.Development))
{
// extended debug-info when in Development mode
- _createFieldDebugInfo(FacesContext.getCurrentInstance(), "submittedValue",
+ _createFieldDebugInfo(getFacesContext(), "submittedValue",
getSubmittedValue(), submittedValue, 1);
}
getStateHelper().put(PropertyKeys.submittedValue, submittedValue );
@@ -951,7 +952,7 @@ public class UIInput extends UIOutput im
@SuppressWarnings("unchecked")
private Map<String, List<String>> _getDebugInfoMap()
{
- final Map<String, Object> requestMap = FacesContext.getCurrentInstance()
+ final Map<String, Object> requestMap = getFacesContext()
.getExternalContext().getRequestMap();
Map<String, List<String>> debugInfo = (Map<String, List<String>>)
requestMap.get(DEBUG_INFO_KEY + getClientId());
@@ -1171,4 +1172,5 @@ public class UIInput extends UIOutput im
}
}
+
}