cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <>
Subject Re: XMLForm/Flow Integration
Date Wed, 19 Feb 2003 00:07:42 GMT
Christopher Oliver wrote:
> Attached is a first try at integrating XMLForm with the Cocoon Flow 
> layer. Since I'm not an expert on XMLForm or XForms  (or Cocoon for that 
> matter!) it's likely to have limitations or defects so keep that in mind.

Congratulations! I was trying to extract some snippets from my 
application to send you, but from what I can see, there's nothing I have 
done that you haven't done better.

I didn't try the sample, since it's 1AM and I'm going to bed, but just 
by looking at the code, I have a couple of observations:

>              XForm.sendView(view, uri)  // Sends "view" to the 
> presentation pipeline and waits for the form to be submitted (and 
> automatically resends it if validation fails)

Sometimes, the validation you can perform with Schematron is not enough. 
  In my application, I have a form for user registration and, besides 
checking that the username is present, email address is valid and 
passwords match, I need to check that the username is not already 
registered. To do this, I need to query the database and, if a duplicate 
is found, create a new violation object and attach it to the form. How 
can I do that if the validation logic is hidden inside XForm.sendView?

>            <map:parameter name="xml-form-scope" value="session"/>

Is this parameter really necessary? I see from the Javascript code that 
you're always attaching the model to the request (just like I do) and 
never to the session.

Apart from these two minor points, it seems like you've done an awful 
job! This is going to be *extremely* useful and is going to be THE way 
to do web applications with Cocoon (IMHO at least), driving up the 
acceptance of both the Flow and XMLForms.


Ugo Cei -

To unsubscribe, e-mail:
For additional commands, email:

View raw message