Johannes Textor wrote:

But if there was a way to use CForms in a service-call-like fashion,
(e.g. call form rendering service, which returns xhtml you can place in
a div - call validation service - call data update service which implies
validation service - and so on), as such somehow decoupling the form
object form interaction flow, this would still seem nice to me ...


How is that different from what CForms currently provide, with the
only changes that it is displayed in a div rather than the full page?

Sylvain

Currently, the only way I am aware of to validate user input against a
CForms definition is:

- Creating a forms object + calling showForm(), thus creating a
continuation
- Waiting for the user to input all data & submit the form
- Errors are then detected server-side by the CForms framework, and
error messages sent back to the client

Except when in Ajax mode (will be in 2.1.8) where the client receives updates on the fly and a special notification when the form is "finished", which leads to changing he current page (as would do normal interaction), but which could also be used to implement different behaviours.

How could you validate a single widget against a CForms definition, or
validate a whole form whithout creating a continuation object?

Having read the slides of your GT presentation (which I found really
impressive BTW) I guess I am thinking of something similar to what is
achieved achieved by the "cocoon-ajax" parameter (ignore non-updated
widgets, and so on). If I get your concept right, you are submitting the
data to the server and getting back browser update instructions.

Exactly.

Is there already a way to just retrieve XML error messages and handle
them client-side ? This would enable, for example, to have an AJAX
client programmed by somebody who doesn't need to know Cocoon & CForms
inside-out, as long as he adheres to a well-defined interface. (He'd
call CForms like he would call a webservice).

Interesting thoughts. Actually, this could be a special rendering of error messages in the styling xsl that would do some javascript callbacks in the client rather than updating the page. Is this what you meant?

Sylvain

--
Sylvain Wallez                        Anyware Technologies
http://people.apache.org/~sylvain     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to