[Seaside] flow

Jon Paynter kittle31 at gmail.com
Fri Jun 17 17:40:36 UTC 2011


This sound similar to a setup I did, except in reverse:   User uploads a
file, has it validated and then the application proceeds.

I suspect what you could do is to provide a download button or link _and_ an
'ok' or 'next' or some button that will proceed with your application flow.
Yes this presents 2 buttons, and allows the user to proceed w/o downloading
the pdf, but you can solve that but checking to see if they clicked the
download link before proceeding with the application flow.

The key is that #answer doesnt return the pdf download response.

Hopefully that makes sense?

On Fri, Jun 17, 2011 at 7:04 AM, Julian Fitzell <jfitzell at gmail.com> wrote:

> Right, so if you open a new window or embed inside on iframe or use JS to
> somehow fetch and embed the content, then that will work fine since a second
> request/response are involved. One callback returns the PDF and the other
> does the #answer.
>
> Julian
>
> On Fri, Jun 17, 2011 at 2:32 PM, Robert Sirois <watchlala at hotmail.com>wrote:
>
>>  Hehe yea. I was thinking the pdf could be embedded in whatever the
>> response page is, that way you could preserve the navigation. Am I getting
>> at what you're thinking Milan? Some sites open up new pages for printing
>> things, too.
>>
>> RS
>>
>> ------------------------------
>> From: jfitzell at gmail.com
>> Date: Fri, 17 Jun 2011 08:46:07 +0100
>>
>> Subject: Re: [Seaside] flow
>> To: seaside at lists.squeakfoundation.org
>>
>> Embed what? In the end you still have to return a response and you can
>> either return an HTML response or a PDF response... you can't return both.
>> If you return a PDF, there is no way for the user to proceed further down
>> that branch of the control flow (unless you were generating a PDF with
>> callback links inside it :) ). It is, effectively, a dead branch, so
>> #answering after returning a PDF doesn't make sense to me.
>>
>> I'm still struggling to understand the flow that Milan is envisioning...
>>
>> Julian
>>
>> On Thu, Jun 16, 2011 at 11:52 PM, Robert Sirois <watchlala at hotmail.com>wrote:
>>
>> Mayhaps embedding it? It would be easy enough for the user to download
>> then.
>>
>> RS
>>
>> ------------------------------
>> From: jfitzell at gmail.com
>> Date: Thu, 16 Jun 2011 23:43:31 +0100
>> Subject: Re: [Seaside] flow
>>
>> To: seaside at lists.squeakfoundation.org
>>
>> On Thu, Jun 16, 2011 at 4:50 PM, Milan Mimica <milan.mimica at gmail.com>wrote:
>>
>> Julian Fitzell wrote:
>>
>>  but I'd question why you were using #call:/#answer: at all.
>>
>> If the #answer is in response to a #show: or is triggering an #onAnswer:
>> block in an embedded component, it should work fine to #answer inside the
>> #respond: block.
>>
>>
>> Well, it's quite simple. I'm #call-ing a component which does a ticket
>> reservation. After the user fills the form, in the callback of the OK
>> button, I'm sending a PDF (the ticket) to the user and returning flow to the
>> calling component. That's how I imagined it anyway.
>>
>>
>> But how can the user both download a file *and* see an HTML page
>> displayed? You can only respond once to a request...
>>
>> Julian
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20110617/c7a92245/attachment.htm


More information about the seaside mailing list