You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2006/02/21 19:12:47 UTC
svn commit: r379553 -
/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java
Author: weber
Date: Tue Feb 21 10:12:45 2006
New Revision: 379553
URL: http://svn.apache.org/viewcvs?rev=379553&view=rev
Log:
fix calculation of fixedHeight/fixedWidth for 'null' component
Modified:
incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java?rev=379553&r1=379552&r2=379553&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java Tue Feb 21 10:12:45 2006
@@ -216,10 +216,6 @@
}
public int getFixedSpace(FacesContext facesContext, UIComponent component, boolean width) {
- if (component == null) {
- return 0;
- }
-
int fixedSpace = 0;
if (component instanceof UICell) {
@@ -249,7 +245,10 @@
private int getFixedSpace(FacesContext facesContext, UIComponent component,
String attr, String attrFixed) {
int intSpace = -1;
- final String space = ComponentUtil.getStringAttribute(component, attr);
+ String space = null;
+ if (component != null) {
+ space = ComponentUtil.getStringAttribute(component, attr);
+ }
if (space != null) {
try {
intSpace = Integer.parseInt(space.replaceAll("\\D", ""));