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...

As I understand from the examples, actions are usually used in the following
way (form validation):
          <map:act type="check for form values">
            <!-- form values ok, save the data-->
          </map:act>
          <!-- form values not ok, redirect back to form -->

In other words, when the action "succeeds", then the "sub-components" are
evaluated/executed, if it "fails" the "sub-components" are skipped and the
executing continues on the same level. Correct?

The example is about form validation and this is the area I'm currently
investigating. AFAICT, the current form validation action implementation has
one main deficiency: it does not allow the form validating code to return a
meaningful error message to the user.
All it does, is redirect back to the form, no error messages involved.
And with the sitemap structure that I presented above, the error message
passing is not even possible because the "failure" part of the sitemap does
not have any information passed in from the action.
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).

Neeme

<<attachment: winmail.dat>>

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

Reply via email to