> > I started to look at the C2 framework, to see if it was finally getting
to
> > the state where I could start porting some of my existing webapps over
to
> > C2. And I'm a bit confused about the current state of the Action
> > framework...
> >
> <snip/>
> > So, to work around this problem, I would propose to inverse the
structure of
> > the sitemap in the case of form validation:
> >           <map:act type="check for form values">
> >             <!-- form values not ok, redirect back to form. error
> > information is passed in with the objectmodel -->
> >           </map:act>
> >           <!-- form values ok, save the data-->
> >
> > What do you think? Does this approach have any disadvantages?
> > If not, then I would propose to convert the current examples to this new
> > approach (I can help also, if needed).
> >
> actually we have previously came to another point. You are true that
validator
> actions now return nothing when validation fails, this will be changed so
that
> action will return special configurable param to the sitemap indicating
what
> the result of validation was and which parameters where wrong (this param
can
> later be used in param-selector), this way we
> just need to figure out how these wrong parameters propagate nicely back
to
> the form, an XSP solution would be great but how to pass action's Map
object
> to XSP efectively ??

Why not to use request attributes and place a HashMap with error messages
there?
My approach is this:

1. Form validator action validates posted data, creates some object (some
XML 'instance data' if it's not present yet) and places error messages (or
only error codes) there. Then that 'instance data' is added to the request
attributes.

2. A form navigator action checks the result (some error flag in the
objectModel) and depending on the result returns a 'nextpage' param.

3. Every form is processed by a FormTransformer which replaces special
output tags (e.g.: <output ref="errors/error[@id='password']'" />)  by the
error message from the 'instance data' according to the 'ref' attribute.

4. ??? Who must remove/clean instance data?

(Some ideas was taken from the W3C XForm Specification)

>
>
> > Neeme
>
> martin

Any comments on this approach?

Kot.


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

Reply via email to