click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r722148 - /incubator/click/trunk/click/framework/src/net/sf/click/control/Radio.java
Date Mon, 01 Dec 2008 17:52:06 GMT
Author: sabob
Date: Mon Dec  1 09:52:05 2008
New Revision: 722148

URL: http://svn.apache.org/viewvc?rev=722148&view=rev
Log:
Radio name is optional. CLK-473

Modified:
    incubator/click/trunk/click/framework/src/net/sf/click/control/Radio.java

Modified: incubator/click/trunk/click/framework/src/net/sf/click/control/Radio.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/net/sf/click/control/Radio.java?rev=722148&r1=722147&r2=722148&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/net/sf/click/control/Radio.java (original)
+++ incubator/click/trunk/click/framework/src/net/sf/click/control/Radio.java Mon Dec  1 09:52:05
2008
@@ -87,8 +87,6 @@
 
     /**
      * Create an Radio field with no name defined.
-     * <p/>
-     * <b>Please note</b> the control's name must be defined before it is valid.
      */
     public Radio() {
     }
@@ -164,6 +162,22 @@
     }
 
     /**
+     * Set the parent of the Field.
+     *
+     * @see net.sf.click.Control#setParent(Object)
+     *
+     * @param parent the parent of the Control
+     * @throws IllegalArgumentException if the given parent instance is
+     * referencing <tt>this</tt> object: <tt>if (parent == this)</tt>
+     */
+    public void setParent(Object parent) {
+        if (parent == this) {
+            throw new IllegalArgumentException("Cannot set parent to itself");
+        }
+        this.parent = parent;
+    }
+
+    /**
      * Return the field display label.
      * <p/>
      * If the label value is null, this method will attempt to find a



Mime
View raw message