You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Davide Vecchi <dv...@amc.dk> on 2014/09/16 13:27:02 UTC

Server-side validation without submit

Hello everybody,

I have a form and I would like to validate some of its fields server-side without waiting for the user to submit the form (so f.ex I would validate a field when it loses the focus, or something like that; this is not important).

I can manually code Ajax calls myself, to make the client pass the values to the server and have the server tell the client whether the value is valid, but before doing so I would like to figure out if Tapestry already has some such capability I could use to make the work easier (and more Tapestry-style in general).

JFI, the reason why I need to do this server-side validation without submitting the form is that I have to integrate into my Tapestry application a 3rd party JavaScript component that shows groups of input fields in different steps but uses only one big form to contain the fields for all the steps, and submits the form only after the last step, but I want to validate each step before allowing to proceed to the next step.
IMO this plugin's design is bad because it doesn't have built-in support for server-side validation of each step, but I am requested to try make it work with Tapestry anyway if that's possible.

Thanks in advance for any possible comment or suggestion :)

RE: Server-side validation without submit

Posted by Davide Vecchi <dv...@amc.dk>.
That is right, I just want to show validation errors. I do not need to add dynamic fields to the form.

-----Original Message-----
From: Lance Java [mailto:lance.java@googlemail.com] 
Sent: Tuesday, September 16, 2014 14:46
To: Tapestry users
Subject: Re: Server-side validation without submit

It's no different to a normal zone update (eg via EventLink)

I was assuming he was just wanting to show validation errors in zones. This shouldn't cause any problems. If he wants to add dynamic fields to the form, he'll need to use the FormInjector instead.
On 16 Sep 2014 13:40, "Geoff Callender" <ge...@gmail.com>
wrote:

> Lance, wouldn't that require updating zones within the Form. Doesn't 
> that cause problems?
>
>
> On 16 Sep 2014, at 10:09 pm, Lance Java <la...@googlemail.com> wrote:
>
> > You could use the observe mixin here:
> > http://tapestry-stitch.uklance.cloudbees.net/observedemo
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Server-side validation without submit

Posted by Lance Java <la...@googlemail.com>.
It's no different to a normal zone update (eg via EventLink)

I was assuming he was just wanting to show validation errors in zones. This
shouldn't cause any problems. If he wants to add dynamic fields to the
form, he'll need to use the FormInjector instead.
On 16 Sep 2014 13:40, "Geoff Callender" <ge...@gmail.com>
wrote:

> Lance, wouldn't that require updating zones within the Form. Doesn't that
> cause problems?
>
>
> On 16 Sep 2014, at 10:09 pm, Lance Java <la...@googlemail.com> wrote:
>
> > You could use the observe mixin here:
> > http://tapestry-stitch.uklance.cloudbees.net/observedemo
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Server-side validation without submit

Posted by Geoff Callender <ge...@gmail.com>.
Lance, wouldn't that require updating zones within the Form. Doesn't that cause problems?


On 16 Sep 2014, at 10:09 pm, Lance Java <la...@googlemail.com> wrote:

> You could use the observe mixin here:
> http://tapestry-stitch.uklance.cloudbees.net/observedemo


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: Server-side validation without submit

Posted by Davide Vecchi <dv...@amc.dk>.
> You could use the observe mixin here:
> http://tapestry-stitch.uklance.cloudbees.net/observedemo

Thanks a lot, it looks great, I'll definitely try to use it.

Cheers

Re: Server-side validation without submit

Posted by Lance Java <la...@googlemail.com>.
You could use the observe mixin here:
http://tapestry-stitch.uklance.cloudbees.net/observedemo