coliver 2003/07/06 22:59:19
Modified:
src/scratchpad/src/org/apache/cocoon/components/jxforms/flow/javascript
JXForm.java JXForm.js
Log:
Removed println's and fixed NPE
Revision Changes Path
1.2 +6 -8
cocoon-2.1/src/scratchpad/src/org/apache/cocoon/components/jxforms/flow/javascript/JXForm.java
Index: JXForm.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/scratchpad/src/org/apache/cocoon/components/jxforms/flow/javascript/JXForm.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- JXForm.java 6 Jul 2003 23:27:24 -0000 1.1
+++ JXForm.java 7 Jul 2003 05:59:17 -0000 1.2
@@ -121,8 +121,6 @@
context = JXPathContext.newContext(model);
form.setAutoValidate(false);
if (validatorNamespace != null && validatorDocument != null) {
- System.out.println("validatorNS="+validatorNamespace);
- System.out.println("validatorDoc="+validatorDocument);
SourceResolver resolver =
getCocoon().getEnvironment();
Source schemaSrc = resolver.resolveURI(validatorDocument);
@@ -154,12 +152,12 @@
(FOM_WebContinuation)unwrap(continuation);
String redUri = "cocoon://" +
cocoon.getEnvironment().getURIPrefix() + uri;
- cocoon.getInterpreter().forwardTo(getTopLevelScope(cocoon),
- cocoon,
- redUri,
- unwrap(bizData),
- fom_wk.getWebContinuation(),
- cocoon.getEnvironment());
+ cocoon.getInterpreter().forwardTo(getTopLevelScope(cocoon),
+ cocoon,
+ redUri,
+ unwrap(bizData),
+ fom_wk == null ? null:
fom_wk.getWebContinuation(),
+ cocoon.getEnvironment());
}
public void jsFunction_addViolation(String xpath, String message)
1.2 +4 -6
cocoon-2.1/src/scratchpad/src/org/apache/cocoon/components/jxforms/flow/javascript/JXForm.js
Index: JXForm.js
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/scratchpad/src/org/apache/cocoon/components/jxforms/flow/javascript/JXForm.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- JXForm.js 6 Jul 2003 23:27:24 -0000 1.1
+++ JXForm.js 7 Jul 2003 05:59:18 -0000 1.2
@@ -124,7 +124,7 @@
// will return right here: it is used to implement
// <xf:submit continuation="forward">
this.populateForm();
- var phase = cocoon.request.getAttribute("jxform-submit-phase");
+ var phase = cocoon.request.getAttribute("jxform-submit-phase");
if (validator != undefined) {
validator(this);
}
@@ -139,11 +139,9 @@
JXForm.prototype.finish = function(uri) {
if (uri != undefined) {
- this.form.remove(cocoon.environment.objectModel, this.id);
- this.form.save(cocoon.environment.objectModel, "request");
- this.forwardTo(uri,
- this.getModel(),
- null);
+ this.removeForm();
+ this.saveForm();
+ this.forwardTo(uri, this.getModel(), null);
}
if (this.rootContinuation != null) {
this.rootContinuation.invalidate();