You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shale.apache.org by a k <st...@gmail.com> on 2006/10/05 23:00:01 UTC

Order of validating the components

Hi,

I was looking at the source for Token and I saw this comment in there:

        // WARNING - for this test to be successful, the token component
must
        // be the last input component child of the parent form to be
        // processed

I understand why the control needs to be validated after all the other
controls are validated but I am not sure where you specify to validate this
control at the end. Can we specify the order and if so where?

Thanks in advance!

Re: Order of validating the components

Posted by Craig McClanahan <cr...@apache.org>.
On 10/5/06, a k <st...@gmail.com> wrote:
>
> Hi,
>
> I was looking at the source for Token and I saw this comment in there:
>
>         // WARNING - for this test to be successful, the token component
> must
>         // be the last input component child of the parent form to be
>         // processed
>
> I understand why the control needs to be validated after all the other
> controls are validated but I am not sure where you specify to validate
> this
> control at the end. Can we specify the order and if so where?


At any given level of the component tree, validations occur in the order
that the parent component's getChildren() method returns them.  In turn,
that is based on the order they are specified in the source code.  Thus, for
the purposes of making sure the token component is validated last, simply
make it the last component (or at least the last input component) inside the
containing form component.

Thanks in advance!
>
>
Craig