myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bom...@apache.org
Subject svn commit: r491797 - /myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java
Date Tue, 02 Jan 2007 14:32:22 GMT
Author: bommel
Date: Tue Jan  2 06:32:20 2007
New Revision: 491797

URL: http://svn.apache.org/viewvc?view=rev&rev=491797
Log:
(TOBAGO-107) tc:page should use a reasonable default width+height and state

Modified:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java?view=diff&rev=491797&r1=491796&r2=491797
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java
(original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java
Tue Jan  2 06:32:20 2007
@@ -384,4 +384,20 @@
   public void setHeight(Integer height) {
     this.height = height;
   }
+
+
+  public void restoreState(FacesContext context, Object state) {
+    Object[] values = (Object[]) state;
+    super.restoreState(context, values[0]);
+    this.width = (Integer) values[1];
+    this.height = (Integer) values[2];
+  }
+
+  public Object saveState(FacesContext context) {
+    Object[] values = new Object[3];
+    values[0] = super.saveState(context);
+    values[1] = width;
+    values[2] = height;
+    return values;
+  }
 }



Mime
View raw message