I'm trying to build a very simple woody/flow example, and have a question on how the woody/flow interaction works.
1) If I look at the "guess a number game" in the cocoon wiki, it doesn't use woody forms, just flow, and is pretty straightforward.
2) If I look at the woody/flow sample it uses the woody js function to start up the form. That starts up a form, loops it until it validates, and then shows an answer page. Pretty straightforward too.
Now, in my own exampe, I would like to jump between several different forms with the flow function.
I cant then initialize the forms with the woody function. Some wiki examples indicate that this isnt necessary either,
and I cant find the actual purpose of it either.
So I have tried making a woody form this way, and it behaves oddly:
A) If I use a "<input type=submit>" tag directly in the template, validation works, but it never leaves the validation loop.
The same form is just iterated all the time.
B) If I use a wd:submit tag (with validation=true) the validation loop isnt done, but its possible to see the value of the validation parameter:
cocoon.load("resource://org/apache/cocoon/woody/flow/javascript/woody2.js");
the little flow function looks like below.
function makereport() {
var form = new Form("forms/form1.xml");
print("before showform"); form.showForm("form1-display-pipeline");
print("after showform"); //never gets here in case A
//gets here immediately regardless of validation in case B
var model = form.getModel();
if (form.isValid) {
print("d1=" + model.startdate); print("d2=" + model.enddate); } else {
print("Form is not valid");
}
cocoon.sendPageAndWait("ok.html");
}
How is this supposed to be done? Must each form be initialized with the woody function?
Doesn't this limit the possibilities of the flowscript to use only one form?
Have I missed something?
(please reply also to me if possible) Regards, Joakim
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
