You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Vasili Petrenko <va...@devintime.de> on 2013/11/27 15:52:24 UTC

switch Modal Box

Scenario:


Someone clicks on the actionlink and want to download a PDF. But if there is
no data, I want show a Modal Box and offer a further suggestion.  

If data exists then download the PDF file.

How can I do that?
I am new on Tepastry.

 


Re: AW: switch Modal Box

Posted by Lance Java <la...@googlemail.com>.
Create a page for your pdf that can return a StreamResponse from
onActivate(...).  If the pdf can't be rendered, you show an error.

You can either pagelink to the pdf page or return an instance of the pdf
page in onSuccess() from a form on another page.

 On 27 Nov 2013 18:53, "Vasili Petrenko" <va...@devintime.de>
wrote:

> I can not return a zone on submit event. To return a zone you need a ajax
> request. Or? (Maybe code example)
> By ajax submit you can not return a StreamResponse.
>
> And if it work how can i bring up the jquery modal box?
>
> -----Ursprüngliche Nachricht-----
> Von: Barry Books [mailto:trsvax@gmail.com]
> Gesendet: Mittwoch, 27. November 2013 16:41
> An: Tapestry users
> Betreff: Re: switch Modal Box
>
> I would use an event link. From the event handler you should be able to
> return a StreamResponse (which could be the PDF) or a Zone which would
> bring
> up the Modal.
>
>
> On Wed, Nov 27, 2013 at 8:52 AM, Vasili Petrenko <
> vasili.petrenko@devintime.de> wrote:
>
> > Scenario:
> >
> >
> > Someone clicks on the actionlink and want to download a PDF. But if
> > there is no data, I want show a Modal Box and offer a further
> > suggestion.
> >
> > If data exists then download the PDF file.
> >
> > How can I do that?
> > I am new on Tepastry.
> >
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

AW: switch Modal Box

Posted by Vasili Petrenko <va...@devintime.de>.
I can not return a zone on submit event. To return a zone you need a ajax
request. Or? (Maybe code example)
By ajax submit you can not return a StreamResponse. 

And if it work how can i bring up the jquery modal box?

-----Ursprüngliche Nachricht-----
Von: Barry Books [mailto:trsvax@gmail.com] 
Gesendet: Mittwoch, 27. November 2013 16:41
An: Tapestry users
Betreff: Re: switch Modal Box

I would use an event link. From the event handler you should be able to
return a StreamResponse (which could be the PDF) or a Zone which would bring
up the Modal.


On Wed, Nov 27, 2013 at 8:52 AM, Vasili Petrenko <
vasili.petrenko@devintime.de> wrote:

> Scenario:
>
>
> Someone clicks on the actionlink and want to download a PDF. But if 
> there is no data, I want show a Modal Box and offer a further 
> suggestion.
>
> If data exists then download the PDF file.
>
> How can I do that?
> I am new on Tepastry.
>
>
>
>



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


Re: switch Modal Box

Posted by Barry Books <tr...@gmail.com>.
I would use an event link. From the event handler you should be able to
return a StreamResponse (which could be the PDF) or a Zone which would
bring up the Modal.


On Wed, Nov 27, 2013 at 8:52 AM, Vasili Petrenko <
vasili.petrenko@devintime.de> wrote:

> Scenario:
>
>
> Someone clicks on the actionlink and want to download a PDF. But if there
> is
> no data, I want show a Modal Box and offer a further suggestion.
>
> If data exists then download the PDF file.
>
> How can I do that?
> I am new on Tepastry.
>
>
>
>