You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by David Rees <dr...@gmail.com> on 2012/01/26 22:05:39 UTC

Disable zone update for specific form submit

I've got a form in a zone with multiple submits.  If the user selects
one of them, I'd like to not do a zone update but instead do regular
form submit handling (want to download a file using
BinaryStreamResponse instead of render a zone update).  tml looks
something like this:

<t:zone t:id="formZone">
<t:form t:id="theForm t:zone="formZone">
<t:submit value="Submit Zone Update">
<t:submit value="Submit Regular Update">
</t:form>
</t:zone>

Suggestions?  Seems like it may be easiest to just eliminate zones
from the picture.

-Dave

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


Re: Disable zone update for specific form submit

Posted by David Rees <dr...@gmail.com>.
On Thu, Jan 26, 2012 at 1:28 PM, Thiago H. de Paula Figueiredo
<th...@gmail.com> wrote:
> On Thu, 26 Jan 2012 19:05:39 -0200, David Rees <dr...@gmail.com> wrote:
>> I've got a form in a zone with multiple submits.  If the user selects
>> one of them, I'd like to not do a zone update but instead do regular
>> form submit handling (want to download a file using
>> BinaryStreamResponse instead of render a zone update).
>
> Have you tried to return the StreamResponse in the event handler in an AJAX?
> If Tapestry doesn't support this yet, it should IMHO.

Yep, tried just returing the BinaryStreamResponse in my onSuccess
method but the browser doesn't do anything.  FWIW - still using
Tapestry 5.2.6, though, haven't tried 5.3 yet...

-Dave

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


Re: Disable zone update for specific form submit

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Thu, 26 Jan 2012 19:05:39 -0200, David Rees <dr...@gmail.com> wrote:

> I've got a form in a zone with multiple submits.  If the user selects
> one of them, I'd like to not do a zone update but instead do regular
> form submit handling (want to download a file using
> BinaryStreamResponse instead of render a zone update).

Have you tried to return the StreamResponse in the event handler in an  
AJAX? If Tapestry doesn't support this yet, it should IMHO.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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