click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r764329 - /incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/FormTablePage.java
Date Sun, 12 Apr 2009 21:17:54 GMT
Author: sabob
Date: Sun Apr 12 21:17:53 2009
New Revision: 764329

URL: http://svn.apache.org/viewvc?rev=764329&view=rev
Log:
added clear method

Modified:
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/FormTablePage.java

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/FormTablePage.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/FormTablePage.java?rev=764329&r1=764328&r2=764329&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/FormTablePage.java
(original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/FormTablePage.java
Sun Apr 12 21:17:53 2009
@@ -119,14 +119,13 @@
 
             saveDataObject(dataObject);
 
-            onCancelClick();
+            clear();
         }
         return true;
     }
 
     public boolean onCancelClick() {
-        form.setDataObject(null);
-        form.clearErrors();
+        clear();
         return true;
     }
 
@@ -146,11 +145,16 @@
 
             deleteDataObject(dataObject);
 
-            onCancelClick();
+            clear();
         }
         return true;
     }
 
+    public void clear() {
+        form.setDataObject(null);
+        form.clearErrors();
+    }
+
     /**
      * @see org.apache.click.Page#onRender()
      */



Mime
View raw message