[MOBY-guts] biomoby commit
Paul Gordon
gordonp at dev.open-bio.org
Tue Feb 12 05:35:24 UTC 2008
gordonp
Tue Feb 12 00:35:24 EST 2008
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util
In directory dev.open-bio.org:/tmp/cvs-serv11213/src/main/ca/ucalgary/services/util
Modified Files:
XHTMLForm.java
Log Message:
Fixed Javadoc warnings
moby-live/Java/src/main/ca/ucalgary/services/util XHTMLForm.java,1.4,1.5
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util/XHTMLForm.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util/XHTMLForm.java 2008/02/12 01:03:38 1.4
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util/XHTMLForm.java 2008/02/12 05:35:24 1.5
@@ -512,7 +512,7 @@
" parameter, but is being specified as a " +
"radio button name too");
}
-
+
// handle the case where a radio param is being hardcoded
// Note: for now, there is no way to specify a default value other
// than the HTML default without just fixing the radio value.
@@ -564,14 +564,32 @@
secondarySpecs.put(defaultSpec[0], specFields);
}
return;
- }
- else if(inputSpecs.containsKey(defaultSpec[0]) ||
+ }//end isRadio
+ else if(inputSpecs.containsKey(defaultSpec[0]) ||
secondarySpecs.containsKey(defaultSpec[0]) ||
fixed.containsKey(defaultSpec[0])){
- throw new Exception("The parameter name \""+defaultSpec[0]+
- "\" is used more than once in defining service \"" +
- serviceName + "\"");
- }
+ throw new Exception("The parameter name \"" + defaultSpec[0] +
+ "\" is used more than once in the form " +
+ "defining the service \"" + serviceName + "\"");
+ }
+ else if(secondarySpecs.containsKey(specFields[0])){
+ // Ensure that if a secondary with the same name is used more than once,
+ // the spec is exactly the same.
+ String[] existingSpec = secondarySpecs.get(defaultSpec[0]);
+ for(int i = 0; i < existingSpec.length; i++){
+ // Did the user specify a value for the spec,
+ // and is it different from the existing one?
+ if(!existingSpec[i].equals(specFields[i]) && !specFields[i].equals(defaultSpec[i])){
+ throw new Exception("The definition of " + defaultSpec[0] +
+ " redefines the moby secondary parameter " +
+ existingSpec[0] +
+ ". If you want to use a moby secondary for " +
+ "multiple form fields, the specs must concur, or " +
+ "spec fields after the first one in the form " +
+ "must be left blank.");
+ }
+ }
+ }
// By logic, a non-blank specFields[3] must match the form "[...]" if we got here
if(specFields[3] != null && specFields[3].length() > 0){
@@ -1101,7 +1119,7 @@
}
/**
- * @param action the value of the form's action attribute
+ * @param method the value of the form's method attribute (i.e. GET or POST)
*/
public void setFormMethod(String method){
formMethod.put(currentService, method);
More information about the MOBY-guts
mailing list