click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r754918 - /incubator/click/trunk/click/examples/src/org/apache/click/examples/control/ClientPanel.java
Date Mon, 16 Mar 2009 15:50:17 GMT
Author: sabob
Date: Mon Mar 16 15:50:17 2009
New Revision: 754918

URL: http://svn.apache.org/viewvc?rev=754918&view=rev
Log:
 super.onInit should be invoked after controls have been added

Modified:
    incubator/click/trunk/click/examples/src/org/apache/click/examples/control/ClientPanel.java

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/control/ClientPanel.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/control/ClientPanel.java?rev=754918&r1=754917&r2=754918&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/control/ClientPanel.java
(original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/control/ClientPanel.java
Mon Mar 16 15:50:17 2009
@@ -41,9 +41,6 @@
     }
 
     public void onInit() {
-        // Invoke super onInit implementation
-        super.onInit();
-
         form.add(new TextField("name")).setRequired(true);
         form.add(new DateField("dateJoined"));
         form.add(new DoubleField("holdings"));
@@ -52,6 +49,11 @@
         form.add(new Submit("cancel", this, "onCancel"));
 
         add(form);
+
+        // Invoke super onInit AFTER controls have been added to Panel, otherwise
+        // the controls will not be reachable from the Panel and their onInit
+        // event won't be invoked.
+        super.onInit();
     }
 
     public boolean onSubmit() {



Mime
View raw message