You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Julien HENRY <he...@yahoo.fr> on 2007/10/04 10:56:27 UTC
RE : Re: [T5] Annotations are too static
It's not really client-side validation. Is the
onValidate called by an AJAX request?
IMHO checking if a field is filled when a checkbox is
checked should not require a full page refresh.
--- Robin Helgelin <lo...@gmail.com> a écrit :
> On 10/4/07, Julien HENRY <he...@yahoo.fr> wrote:
> > I have a page with a big form allowing user to
> > create/update a card. The form has 2 submit
> buttons.
> > One for creating/updating the card as draft (only
> card
> > name input field is required), and one for
> validating
> > the card. The validation create/update the card
> with
> > many additional input fields required.
> >
> > How can I handle such a case with T5? If I put
> > @Required on a field, can I change this at runtime
> > depending on the context? Ever better: can I mark
> some
> > fields as required depending on the submit button
> that
> > was pushed?
> >
> > Another common issue: how can I declare a field as
> > required when another contains a specific value
> (say
> > when a checkbox is checked)...
>
> You can always do your own checking/validation.
> Tapestry calls the
> event validate, i.e. after the regular @Validate
> have been validated,
> it calls the event validate to see if there are more
> problems found.
>
> public String onValidate() {
> // my own checks
>
> if (form.getHasErrors()) {
> return null; // return same page
> } else {
> return "success"; // return page success
> }
> }
>
> --
> regards,
> Robin
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail:
> users-help@tapestry.apache.org
>
>
_____________________________________________________________________________
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org