You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by John <jo...@quivinco.com> on 2014/03/16 10:45:16 UTC

display zone, jquery dialog or message after onValidate success

Is there a way to display a message (zone or dialog) of some kind after a successful onValidate just before the onSuccess method is invoked?

The form is ajax style zone="^".

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

Re: display zone, jquery dialog or message after onValidate success

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Sun, 16 Mar 2014 15:53:48 -0300, John <jo...@quivinco.com> wrote:

> Would there be a way to reveal a zone/jquery dialog that calls the  
> form.submit after response rendering on the client?

Just use a normal zone update. Up to Tapestry 5.3.x, which you're probably  
using now, the HTML element which represents the zone triggers a  
Tapestry.ZONE_UPDATED_EVENT JavaScript event just after the zone is  
updated. The rest is ordinary JavaScript you'd write in the same way as if  
you weren't using Tapestry.

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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


Re: display zone, jquery dialog or message after onValidate success

Posted by John <jo...@quivinco.com>.
Would there be a way to reveal a zone/jquery dialog that calls the form.submit after response rendering on the client?

I see there is a trigger component but of course that triggers during the response rendering.
  ----- Original Message ----- 
  From: Thiago H de Paula Figueiredo 
  To: Tapestry users 
  Sent: Sunday, March 16, 2014 5:53 PM
  Subject: Re: display zone, jquery dialog or message after onValidate success


  On Sun, 16 Mar 2014 10:46:36 -0300, John <jo...@quivinco.com> wrote:

  > It's another approach to solving the click once issue on my form which  
  > invokes a long running server side response.

  Tapestry by itself doesn't support that.



---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

Re: display zone, jquery dialog or message after onValidate success

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Sun, 16 Mar 2014 10:46:36 -0300, John <jo...@quivinco.com> wrote:

> It's another approach to solving the click once issue on my form which  
> invokes a long running server side response.

Tapestry by itself doesn't support that.

>
> But rather than disabling all the inputs (and other event links) in the  
> form and rest of the dialog (makes the client side rather complex),  
> instead I want to display a modal dialog (that can't be closed) to  
> advise the user, and then submit the form. When the server response  
> returns the dialog with the form and advise will both be hidden by  
> rerendering the outer container.
>
> Imagine if the following was possible, that the dialog->open was  
> triggered only if the onValidate was successful and then the  
> form->submit triggered. Is there any way to get that result?
>
> <input t:type="submit" value="${message:button.submit}"  
> onclick="javascript:  
> $('#processingDialog').dialog('open');document.forms["myform"].submit()"  
> t:mixins="jquery/button"/>
>
> John
>   ----- Original Message -----
>   From: Thiago H de Paula Figueiredo
>   To: Tapestry users
>   Sent: Sunday, March 16, 2014 12:33 PM
>   Subject: Re: display zone, jquery dialog or message after onValidate  
> success
>
>
>   On Sun, 16 Mar 2014 06:45:16 -0300, John <jo...@quivinco.com> wrote:
>
>   > Is there a way to display a message (zone or dialog) of some kind  
> after
>   > a successful onValidate just before the onSuccess method is invoked?
>
>   I'm sorry, but that doesn't make much sense to me. It's almost like  
> asking
>   for a request having two different responses, which HTTP doesn't  
> support.
>   In a higher level of abstraction, what exactly are you trying to do?
>
>   --
>   Thiago H. de Paula Figueiredo
>   Tapestry, Java and Hibernate consultant and developer
>   http://machina.com.br
>
>   ---------------------------------------------------------------------
>   To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>   For additional commands, e-mail: users-help@tapestry.apache.org
>
>
> ---
> This email is free from viruses and malware because avast! Antivirus  
> protection is active.
> http://www.avast.com


-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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


Re: display zone, jquery dialog or message after onValidate success

Posted by John <jo...@quivinco.com>.
It's another approach to solving the click once issue on my form which invokes a long running server side response.

But rather than disabling all the inputs (and other event links) in the form and rest of the dialog (makes the client side rather complex), instead I want to display a modal dialog (that can't be closed) to advise the user, and then submit the form. When the server response returns the dialog with the form and advise will both be hidden by rerendering the outer container.

Imagine if the following was possible, that the dialog->open was triggered only if the onValidate was successful and then the form->submit triggered. Is there any way to get that result?

<input t:type="submit" value="${message:button.submit}" onclick="javascript: $('#processingDialog').dialog('open');document.forms["myform"].submit()" t:mixins="jquery/button"/>

John
  ----- Original Message ----- 
  From: Thiago H de Paula Figueiredo 
  To: Tapestry users 
  Sent: Sunday, March 16, 2014 12:33 PM
  Subject: Re: display zone, jquery dialog or message after onValidate success


  On Sun, 16 Mar 2014 06:45:16 -0300, John <jo...@quivinco.com> wrote:

  > Is there a way to display a message (zone or dialog) of some kind after  
  > a successful onValidate just before the onSuccess method is invoked?

  I'm sorry, but that doesn't make much sense to me. It's almost like asking  
  for a request having two different responses, which HTTP doesn't support.  
  In a higher level of abstraction, what exactly are you trying to do?

  -- 
  Thiago H. de Paula Figueiredo
  Tapestry, Java and Hibernate consultant and developer
  http://machina.com.br

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


---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

Re: display zone, jquery dialog or message after onValidate success

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Sun, 16 Mar 2014 06:45:16 -0300, John <jo...@quivinco.com> wrote:

> Is there a way to display a message (zone or dialog) of some kind after  
> a successful onValidate just before the onSuccess method is invoked?

I'm sorry, but that doesn't make much sense to me. It's almost like asking  
for a request having two different responses, which HTTP doesn't support.  
In a higher level of abstraction, what exactly are you trying to do?

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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