joerg 2004/05/18 08:32:27
Modified: src/blocks/forms/java/org/apache/cocoon/forms/flow/javascript
Form.js
Log:
fixed v1 Form.js:
- getChild(id) was missing
- lookupWidget(undefined) makes no sense (in contrary to the old
getWidget(name), where name could be undefined)
Revision Changes Path
1.13 +11 -10
cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/flow/javascript/Form.js
Index: Form.js
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/flow/javascript/Form.js,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- Form.js 11 May 2004 12:55:53 -0000 1.12
+++ Form.js 18 May 2004 15:32:27 -0000 1.13
@@ -65,16 +65,17 @@
}
/**
- * Get a Widget (the java object) from the form.
- * If <code>name</code> is undefined, the form widget itself is returned.
- * Otherwise, the form's child widget of name <code>name</code> is returned.
+ * Get a child Widget (the java object) from the form via its
<code>id</code>.
*/
-Form.prototype.lookupWidget = function(name) {
- if (name == undefined) {
- return this.form;
- } else {
- return this.form.lookupWidget(name);
- }
+Form.prototype.getChild = function(id) {
+ return this.form.getChild(id);
+}
+
+/**
+ * Get a Widget (the java object) from the form via its <code>path</code>.
+ */
+Form.prototype.lookupWidget = function(path) {
+ return this.form.lookupWidget(path);
}
/**