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/11/04 13:01:28 UTC
svn commit: r832712 - in /myfaces/tobago/trunk:
core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java
extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/GridLayoutRule.java
Author: lofwyr
Date: Wed Nov 4 12:01:27 2009
New Revision: 832712
URL: http://svn.apache.org/viewvc?rev=832712&view=rev
Log:
TOBAGO-606: Repair Measure type for (deprecated) cellspacing
Modified:
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java
myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/GridLayoutRule.java
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java?rev=832712&r1=832711&r2=832712&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java Wed Nov 4 12:01:27 2009
@@ -31,6 +31,7 @@
public static final String BODY_CONTENT = "bodyContent";
public static final String BORDER = "border";
public static final String CHARSET = "charset";
+ @Deprecated
public static final String CELLSPACING = "cellspacing";
public static final String CLIENT_PROPERTIES = "clientProperties";
public static final String COLUMN_SPAN = "columnSpan";
Modified: myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/GridLayoutRule.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/GridLayoutRule.java?rev=832712&r1=832711&r2=832712&view=diff
==============================================================================
--- myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/GridLayoutRule.java (original)
+++ myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/GridLayoutRule.java Wed Nov 4 12:01:27 2009
@@ -39,6 +39,9 @@
if (Attributes.ROW_SPACING.equals(name)) {
return new RowSpacingMapper(attribute);
}
+ if (Attributes.CELLSPACING.equals(name)) {
+ return new CellspacingMapper(attribute);
+ }
}
}
return null;
@@ -69,4 +72,17 @@
gridLayout.setRowSpacing(Measure.parse(attribute.getValue()));
}
}
+
+ static final class CellspacingMapper extends Metadata {
+ private final TagAttribute attribute;
+
+ CellspacingMapper(TagAttribute attribute) {
+ this.attribute = attribute;
+ }
+
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ UIGridLayout gridLayout = (UIGridLayout) instance;
+ gridLayout.setCellspacing(Measure.parse(attribute.getValue()));
+ }
+ }
}