myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bom...@apache.org
Subject svn commit: r730704 - /myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/component/UICell.java
Date Fri, 02 Jan 2009 12:05:39 GMT
Author: bommel
Date: Fri Jan  2 04:05:39 2009
New Revision: 730704

URL: http://svn.apache.org/viewvc?rev=730704&view=rev
Log:
(TOBAGO-734) Properties of UICell should support ValueBinding

Modified:
    myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/component/UICell.java

Modified: myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/component/UICell.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/component/UICell.java?rev=730704&r1=730703&r2=730704&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/component/UICell.java
(original)
+++ myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/component/UICell.java
Fri Jan  2 04:05:39 2009
@@ -17,25 +17,31 @@
  * limitations under the License.
  */
 
+import org.apache.myfaces.tobago.TobagoConstants;
+
 import javax.faces.context.FacesContext;
 
 
-/*
-* Created by IntelliJ IDEA.
-* User: bommel
-* Date: 10.02.2006
-* Time: 21:20:10
-*/
 public class UICell extends UIPanelBase {
 
   public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Cell";
 
-  private Integer spanX = 1;
-  private Integer spanY = 1;
-  private String scrollbars = "false";
+  private Integer spanX;
+  private Integer spanY;
+  private String scrollbars;
 
   public Integer getSpanX() {
-    return spanX;
+    if (spanX != null) {
+      return spanX;
+    }
+    javax.faces.el.ValueBinding vb = getValueBinding(TobagoConstants.ATTR_SPAN_X);
+    if (vb != null) {
+      Number number = (Number) vb.getValue(getFacesContext());
+      if (number != null) {
+        return number.intValue();
+      }
+    }
+    return 1;
   }
 
   public void setSpanX(Integer spanX) {
@@ -43,7 +49,17 @@
   }
 
   public Integer getSpanY() {
-    return spanY;
+    if (spanY != null) {
+      return spanY;
+    }
+    javax.faces.el.ValueBinding vb = getValueBinding(TobagoConstants.ATTR_SPAN_Y);
+    if (vb != null) {
+      Number number = (Number) vb.getValue(getFacesContext());
+      if (number != null) {
+        return number.intValue();
+      }
+    }
+    return 1;
   }
 
   public void setSpanY(Integer spanY) {
@@ -51,7 +67,17 @@
   }
 
   public String getScrollbars() {
-    return scrollbars;
+    if (scrollbars != null) {
+      return scrollbars;
+    }
+    javax.faces.el.ValueBinding vb = getValueBinding(TobagoConstants.ATTR_SCROLLBARS);
+    if (vb != null) {
+      java.lang.String scrollbars = (java.lang.String) vb.getValue(getFacesContext());
+      if (scrollbars != null) {
+        return scrollbars;
+      }
+    }
+    return "false";
   }
 
   public void setScrollbars(String scrollbars) {



Mime
View raw message