cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r398210 - /cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/UnionDefinition.java
Date Sat, 29 Apr 2006 17:44:42 GMT
Author: antonio
Date: Sat Apr 29 10:44:41 2006
New Revision: 398210

URL: http://svn.apache.org/viewcvs?rev=398210&view=rev
Log:
Remove commented legacy code. It has been commented for more than 2 years.

Modified:
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/UnionDefinition.java

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/UnionDefinition.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/UnionDefinition.java?rev=398210&r1=398209&r2=398210&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/UnionDefinition.java
(original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/UnionDefinition.java
Sat Apr 29 10:44:41 2006
@@ -24,32 +24,6 @@
 public class UnionDefinition extends AbstractContainerDefinition {
     private String caseWidgetId;
 
-    /*
-    public void setDatatype(Datatype datatype) {
-        if (!String.class.isAssignableFrom(datatype.getTypeClass()))
-            throw new RuntimeException("Only datatype string is allowed for this widget at
" + getLocation() + ".");
-        super.setDatatype(datatype);
-    }
-
-    public void setDefault(Object value) throws Exception {
-        if (!(value == null || String.class.isAssignableFrom(value.getClass())))
-            throw new Exception("UnionDefinition: Default case must be supplied as a string
(" + getLocation() + ")");
-        if (value == null || value.equals("")) {
-            if (isRequired())
-                throw new Exception("UnionWidget: Union is marked required, but no default
case was supplied (" + getLocation() + ")");
-            this.defaultValue = "";
-        } else {
-            if (!hasWidget((String)value))
-                throw new Exception("UnionWidget: The default value \"" + value + "\" does
not match a union case (" + getLocation() + ")");
-            this.defaultValue = (String)value;
-        }
-    }
-
-    public Object getDefaultValue() {
-        return defaultValue;
-    }
-    */
-    
     /**
      * initialize this definition with the other, sort of like a copy constructor
      */
@@ -61,7 +35,7 @@
     		this.caseWidgetId = other.caseWidgetId;
     		
     	} else {
-    		throw new Exception("Definition to inherit from is not of the right type! (at "+getLocation()+")");
+    		throw new Exception("Definition to inherit from is not of the right type! (at "+ getLocation()+").");
     	}
     }
 
@@ -79,3 +53,4 @@
         return unionWidget;
     }
 }
+



Mime
View raw message