You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2009/08/14 17:06:10 UTC
svn commit: r804252 -
/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/AbstractEquation.java
Author: lofwyr
Date: Fri Aug 14 15:06:10 2009
New Revision: 804252
URL: http://svn.apache.org/viewvc?rev=804252&view=rev
Log:
TOBAGO-606: Layout-Manager
- prevent NPE in unit tests
Modified:
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/AbstractEquation.java
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/AbstractEquation.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/AbstractEquation.java?rev=804252&r1=804251&r2=804252&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/AbstractEquation.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/AbstractEquation.java Fri Aug 14 15:06:10 2009
@@ -33,8 +33,11 @@
UIComponent component = (UIComponent) debug;
builder.append(" (");
builder.append(component.getClass().getSimpleName());
- builder.append(", id=");
- builder.append(component.getClientId(FacesContext.getCurrentInstance()));
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ if (facesContext != null) {
+ builder.append(", id=");
+ builder.append(component.getClientId(facesContext));
+ }
builder.append(")");
} else {
builder.append(" (");