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 2007/06/05 12:44:32 UTC
svn commit: r544443 -
/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java
Author: weber
Date: Tue Jun 5 03:44:29 2007
New Revision: 544443
URL: http://svn.apache.org/viewvc?view=rev&rev=544443
Log:
undo 'minor cleanup' revert to rev 541081
null is NOT instance of String
Modified:
myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java?view=diff&rev=544443&r1=544442&r2=544443
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java Tue Jun 5 03:44:29 2007
@@ -203,7 +203,7 @@
private boolean columnIsRendered(List<UIGridLayout.Row> rows, int column) {
for (UIGridLayout.Row row : rows) {
- Object object = row.getElements().get(column);
+ Object object = row.getElements().get(column);
if (object instanceof UIComponent) {
if (object instanceof UICell) {
UICell cell = (UICell) object;
@@ -450,14 +450,16 @@
private int getCellSpacing(FacesContext facesContext, UIComponent component) {
String cellspacing = (String) component.getAttributes().get(ATTR_CELLSPACING);
- try {
- return Integer.parseInt(cellspacing);
- } catch (NumberFormatException e) {
- if (LOG.isWarnEnabled()) {
- LOG.warn("Illegal value for cellspacing : " + cellspacing
- + " using default");
+ if (cellspacing instanceof String) {
+ try {
+ return Integer.parseInt(cellspacing);
+ } catch (NumberFormatException e) {
+ if (LOG.isWarnEnabled()) {
+ LOG.warn("Illegal value for cellspacing : " + cellspacing
+ + " using default");
+ }
+ // ignore and return defaut value
}
- // ignore and return defaut value
}
return getConfiguredValue(facesContext, component, "cellSpacing");
}