Re: Accessing fields of a form

2007-09-13 Thread Francois Armand

Howard Lewis Ship wrote:

Performing cross-field validation can be a challenge. You might need to use
some techniques such as storing an environmental object as a "score board"
to identify the different fields related to the cross-field validation
Thank you for the answer, and I think that finally global messages will 
be great ;)


--
Francois Armand
Etudes & Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
---
InterLDAP - http://interldap.org 
FederID - http://www.federid.org/

Open Source identities management and federation


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



Re: Accessing fields of a form

2007-09-13 Thread Howard Lewis Ship
Because Tapestry dynamically assembles the fields in the form, there isn't a
way to do this.  Worse, because of Loops, Tapestry may use the same
component multiple times to handle different values from different objects.
That is why so much of the validation is tied to the components themselves,
threaded into the component's portion of the form submission process.

Performing cross-field validation can be a challenge. You might need to use
some techniques such as storing an environmental object as a "score board"
to identify the different fields related to the cross-field validation.

On 9/13/07, Francois Armand <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I have a form in a page, that is injected as a component in the java code.
> To validate the form before submission, I want to do something like that :
> 8<
> void onValidateFromForm() {
> try {
>   validate data consistancy
> } catch (Exception e) {
>form.recordError(fieldWitchCauseTheError, "a text");
> }
> 8<
>
> But I don't understand how I can find "fieldWitchCauseTheError", I don't
> see any method to access the list of field of the form (and I can't
> inject fields because they are generated at runtime, or enclosed in
> other components).
> anybody know how can I access the fields of a form ?
>
> Thanks,
>
> --
> Francois Armand
> Etudes & Développements J2EE
> Groupe Linagora - http://www.linagora.com
> Tél.: +33 (0)1 58 18 68 28
> ---
> InterLDAP - http://interldap.org
> FederID - http://www.federid.org/
> Open Source identities management and federation
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Howard M. Lewis Ship
Partner and Senior Architect at Feature50

Creator Apache Tapestry and Apache HiveMind


Accessing fields of a form

2007-09-13 Thread Francois Armand

Hello,

I have a form in a page, that is injected as a component in the java code.
To validate the form before submission, I want to do something like that :
8<
   void onValidateFromForm() {
   try {
 validate data consistancy
   } catch (Exception e) {
  form.recordError(fieldWitchCauseTheError, "a text");
   }
8<

But I don't understand how I can find "fieldWitchCauseTheError", I don't 
see any method to access the list of field of the form (and I can't 
inject fields because they are generated at runtime, or enclosed in 
other components).

anybody know how can I access the fields of a form ?

Thanks,

--
Francois Armand
Etudes & Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
---
InterLDAP - http://interldap.org 
FederID - http://www.federid.org/

Open Source identities management and federation


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