You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by mi...@sonynetservices.com on 2002/07/05 15:34:29 UTC

XML Forms again

Hello,

   another issue concerning XML-forms:
   In the action  for the form processing, the method
filterRequestParameters(..) should be used for validation that
   exceeds Schematron validation.
   Could someone please provide an example, or give an explanation how to
use this method.
   I don´t understand if I am supposed to do the validation within this
method (but why then: "return false if the
   request parameter should not be filtered....), or if something happens
according to the value returned?
   What follows is then how to get error messages back?

   Still I am wondering, if I can use the bean used for the model, outside
of my FormAction or if it is only
  possible to use it in this action.

  Thanks again for any help!

   miHam



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: XML Forms again

Posted by Ivelin Ivanov <iv...@apache.org>.

----- Original Message -----
From: <mi...@sonynetservices.com>
To: <co...@xml.apache.org>
Sent: Friday, July 05, 2002 8:34 AM
Subject: XML Forms again


Hello,

>   another issue concerning XML-forms:
>   In the action  for the form processing, the method
>filterRequestParameters(..) should be used for validation that
>   exceeds Schematron validation.
>   Could someone please provide an example, or give an explanation how to
>use this method.
>   I don´t understand if I am supposed to do the validation within this
>method (but why then: "return false if the
>   request parameter should not be filtered....), or if something happens
>according to the value returned?
>   What follows is then how to get error messages back?

You will use this method to tell XMLForm to *ignore* certain request
parameters when going through the automatic population and validation.
In most cases you don't need to override this method.

What kind of validation do you need to do which a Schematron schema can't
provide.
You can do additional custom validation in your perform() method.


>   Still I am wondering, if I can use the bean used for the model, outside
> of my FormAction or if it is only
>  possible to use it in this action.

A form and its model are stored in the servlet session or request. You can
get it with Form.lookup( YourFormId )
The XMLFormTransformer accesses the same Form as the action.


Ivelin



  Thanks again for any help!

   miHam



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>