Yes, a save dialog. 
Just a normal standard download but, as there is some time consuming
processing related to the download, I want some busy icon to tell the user
that something is happening.  There not all so good to see the browser
status bar and they click again and again until the save dialog box finally
pop up. 
Maybe a normal link with some ajax events to control the link icon could do
it. Chang to busy icon when "onclik" and change it back when "onload" .
Could that do it ? 
Javascript and ajax is not my strong side, any suggestion appreciated. 
Thanks.


Johan Compagner wrote:
> 
> what do you want to do with that picture?
> what should happen?
> a save dialog? (attachement?)
> 
> if that is the case then the best thing i guess to do is use a normal link
> or use an ajax link that sets the window.location.href = xxx in a piece of
> javascript.
> (maybe inside a iframe?)
> 
> johan
> 
> 
> On Mon, May 19, 2008 at 3:42 PM, renaud.houver <[EMAIL PROTECTED]>
> wrote:
> 
>>
>> I have a download picture link which take a bit of time. Result is that
>> the
>> user is impatiently clicking several time. I would like to have a kind of
>> timer showing process and I tried to use IndicatingAjaxLink which does
>> the
>> job. But I cant find out to stream to the outputstream with an ajax link.
>>
>> I tried both to get outputStream from ajax target.
>>
>> public void onClick(AjaxRequestTarget target) {
>>  target.getHeaderResponse().getResponse().getOutputStream();
>> ...
>>
>> or from a new target on requestCycle from page
>>
>> public void onClick(AjaxRequestTarget target) {
>>
>> public void onClick(AjaxRequestTarget target) {
>>               
>> target.getHeaderResponse().getResponse().getOutputStream();
>>                target.getPage().getRequestCycle().setRequestTarget(new
>> IRequestTarget(){
>>                        public void respond(RequestCycle requestCycle) {
>>
>>  ((WebResponse)requestCycle.getResponse()).getOutputStream();
>> ...
>> None works ... Any advice ? Something with resources maybe ?
>>
>> Here is the onClick method with a normal link.That works fine.
>>
>> public void onClick()
>>        {
>>                final byte[] bytes = getDirectDownloadBytes(phot);
>>                if(bytes != null && bytes.length > 0) {
>>                        getRequestCycle().setRequestTarget(new
>> IRequestTarget()
>>                        {
>>
>>                                public void respond(RequestCycle
>> requestCycle) {
>>                                        WebResponse r =
>> (WebResponse)requestCycle.getResponse();
>>                                        r.setAttachmentHeader(fileName);
>>
>>                                        try {
>>
>>  r.getOutputStream().write(bytes);
>>                                        } catch (IOException e) {
>>                                                throw new
>> RuntimeException(e);
>>                                        } finally {     }
>>                                }
>>                        });
>>                }
>>        }
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/stream-content-with-an-IndicatingAjaxLink-tp17316702p17316702.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/stream-content-with-an-IndicatingAjaxLink-tp17316702p17350702.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to