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 2012/01/19 10:34:35 UTC
svn commit: r1233261 -
/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java
Author: lofwyr
Date: Thu Jan 19 09:34:35 2012
New Revision: 1233261
URL: http://svn.apache.org/viewvc?rev=1233261&view=rev
Log:
TOBAGO-1078: Optimize auto layout for sheet
- avoid NPE
Modified:
myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java?rev=1233261&r1=1233260&r2=1233261&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java Thu Jan 19 09:34:35 2012
@@ -243,8 +243,12 @@ public class SheetRenderer extends Layou
bodyStyle.setHeight(null);
bodyStyle.setTop(null);
Style sheetBodyStyle = new Style(bodyStyle);
- if (sheet.getNeedVerticalScrollbar()) {
- tableBodyWidth = tableBodyWidth.subtractNotNegative(getVerticalScrollbarWeight(facesContext, sheet));
+ if (sheet.getNeedVerticalScrollbar() == null) {
+ LOG.warn("Value of needVerticalScrollbar undefined!"); // why this value isn't set by the layout manager?
+ } else {
+ if (sheet.getNeedVerticalScrollbar()) {
+ tableBodyWidth = tableBodyWidth.subtractNotNegative(getVerticalScrollbarWeight(facesContext, sheet));
+ }
}
sheetBodyStyle.setWidth(tableBodyWidth);