lightbox and please wait dialog

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

lightbox and please wait dialog

Marco D'Ambros
Hi,

in a seaside application I am writing, some operations take a long  
time to complete.
For this reason, I want to add a sort of "please wait" dialog to the  
page which automatically disappears after the operation is performed.

I tried something like this:

html submitButton
        onClick:
                (html request callback: [self lightbox: (WAFormDialog new  
addMessage: 'Please wait')]),
                (html request callback: [self rootApplication computeLongOperation]);
        text: ' compute long operation']

but it does not work. In particular I have to problems with that:
1 - the lightbox dialog is shown in the page only after the  
#computeLongOperation completed
2 - I dunno how to make the dialog disappear after the  
#computeLongOperation is completed.

any suggestions will be really appreciated :-)

thanks!
Marco
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: lightbox and please wait dialog

Sebastian Sastre-2
Hi Marco,

today I've finished solving exactly that.
I've used a periodical updater on a component which changes its state while
progressing.
The state of this component dictates which feedback will be rendered to the UI.
Its nice because you can even set there server side validation result when it
wont validate. If validates fine some kind of be patience message is displayed
until state changes to done and it end up with some feedback about process
complete.

Tip: you may be tempted to but manage yourself to don't use forks in callbacks

Cheers,

Sebastian Sastre


> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En nombre
> de Marco D'Ambros
> Enviado el: Martes, 04 de Noviembre de 2008 13:11
> Para: Seaside - general discussion
> Asunto: [Seaside] lightbox and please wait dialog
>
> Hi,
>
> in a seaside application I am writing, some operations take a long  
> time to complete.
> For this reason, I want to add a sort of "please wait" dialog to the  
> page which automatically disappears after the operation is performed.
>
> I tried something like this:
>
> html submitButton
> onClick:
> (html request callback: [self lightbox:
> (WAFormDialog new  
> addMessage: 'Please wait')]),
> (html request callback: [self rootApplication
> computeLongOperation]);
> text: ' compute long operation']
>
> but it does not work. In particular I have to problems with that:
> 1 - the lightbox dialog is shown in the page only after the  
> #computeLongOperation completed
> 2 - I dunno how to make the dialog disappear after the  
> #computeLongOperation is completed.
>
> any suggestions will be really appreciated :-)
>
> thanks!
> Marco
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: lightbox and please wait dialog

Boris Popov, DeepCove Labs (SNN)
In reply to this post by Marco D'Ambros
Re: [Seaside] lightbox and please wait dialog

You could use javascript to launch 'please wait' on the originator page followed by form post, the lightbox will then naturally disappear once callback completes and new page is rendered.

Cheers!

-Boris (via BlackBerry)

----- Original Message -----
From: [hidden email] <[hidden email]>
To: 'Seaside - general discussion' <[hidden email]>
Sent: Tue Nov 04 07:30:24 2008
Subject: RE: [Seaside] lightbox and please wait dialog

Hi Marco,

today I've finished solving exactly that.
I've used a periodical updater on a component which changes its state while
progressing.
The state of this component dictates which feedback will be rendered to the UI.
Its nice because you can even set there server side validation result when it
wont validate. If validates fine some kind of be patience message is displayed
until state changes to done and it end up with some feedback about process
complete.

Tip: you may be tempted to but manage yourself to don't use forks in callbacks

Cheers,

Sebastian Sastre


> -----Mensaje original-----
> De: [hidden email]
> [[hidden email]] En nombre
> de Marco D'Ambros
> Enviado el: Martes, 04 de Noviembre de 2008 13:11
> Para: Seaside - general discussion
> Asunto: [Seaside] lightbox and please wait dialog
>
> Hi,
>
> in a seaside application I am writing, some operations take a long 
> time to complete.
> For this reason, I want to add a sort of "please wait" dialog to the 
> page which automatically disappears after the operation is performed.
>
> I tried something like this:
>
> html submitButton
>       onClick:
>               (html request callback: [self lightbox:
> (WAFormDialog new 
> addMessage: 'Please wait')]),
>               (html request callback: [self rootApplication
> computeLongOperation]);
>       text: ' compute long operation']
>
> but it does not work. In particular I have to problems with that:
> 1 - the lightbox dialog is shown in the page only after the 
> #computeLongOperation completed
> 2 - I dunno how to make the dialog disappear after the 
> #computeLongOperation is completed.
>
> any suggestions will be really appreciated :-)
>
> thanks!
> Marco
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: lightbox and please wait dialog

Marco D'Ambros
In reply to this post by Sebastian Sastre-2
Thanks Sebastian,

how do you make the component disappears automatically when the state  
is "done"?

Cheers
Marco

On Nov 4, 2008, at 4:30 PM, Sebastian Sastre wrote:

> Hi Marco,
>
> today I've finished solving exactly that.
> I've used a periodical updater on a component which changes its  
> state while
> progressing.
> The state of this component dictates which feedback will be rendered  
> to the UI.
> Its nice because you can even set there server side validation  
> result when it
> wont validate. If validates fine some kind of be patience message is  
> displayed
> until state changes to done and it end up with some feedback about  
> process
> complete.
>
> Tip: you may be tempted to but manage yourself to don't use forks in  
> callbacks
>
> Cheers,
>
> Sebastian Sastre
>
>
>> -----Mensaje original-----
>> De: [hidden email]
>> [mailto:[hidden email]] En nombre
>> de Marco D'Ambros
>> Enviado el: Martes, 04 de Noviembre de 2008 13:11
>> Para: Seaside - general discussion
>> Asunto: [Seaside] lightbox and please wait dialog
>>
>> Hi,
>>
>> in a seaside application I am writing, some operations take a long
>> time to complete.
>> For this reason, I want to add a sort of "please wait" dialog to the
>> page which automatically disappears after the operation is performed.
>>
>> I tried something like this:
>>
>> html submitButton
>> onClick:
>> (html request callback: [self lightbox:
>> (WAFormDialog new
>> addMessage: 'Please wait')]),
>> (html request callback: [self rootApplication
>> computeLongOperation]);
>> text: ' compute long operation']
>>
>> but it does not work. In particular I have to problems with that:
>> 1 - the lightbox dialog is shown in the page only after the
>> #computeLongOperation completed
>> 2 - I dunno how to make the dialog disappear after the
>> #computeLongOperation is completed.
>>
>> any suggestions will be really appreciated :-)
>>
>> thanks!
>> Marco
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: lightbox and please wait dialog

Sebastian Sastre-2
One way is the one Boris described.
Other could be with some result feedback and a "continue" kind of button.
Other is in DOM itself but requires a bit of javascript to make the modal react
closing to an observed #click event on an anchor or somethig. This last one is
the more appealing to watch because you can make the dialog to collapse
elegantly instead of just instantly disapearing.
I use both lasts aproaches. Its convenience is dictated by usability.
Cheers,

Sebastian Sastre
 

> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En nombre
> de Marco D'Ambros
> Enviado el: Martes, 04 de Noviembre de 2008 13:44
> Para: Seaside - general discussion
> Asunto: Re: [Seaside] lightbox and please wait dialog
>
> Thanks Sebastian,
>
> how do you make the component disappears automatically when
> the state  
> is "done"?
>
> Cheers
> Marco
>
> On Nov 4, 2008, at 4:30 PM, Sebastian Sastre wrote:
>
> > Hi Marco,
> >
> > today I've finished solving exactly that.
> > I've used a periodical updater on a component which changes its  
> > state while
> > progressing.
> > The state of this component dictates which feedback will be
> rendered  
> > to the UI.
> > Its nice because you can even set there server side validation  
> > result when it
> > wont validate. If validates fine some kind of be patience
> message is  
> > displayed
> > until state changes to done and it end up with some feedback about  
> > process
> > complete.
> >
> > Tip: you may be tempted to but manage yourself to don't use
> forks in  
> > callbacks
> >
> > Cheers,
> >
> > Sebastian Sastre
> >
> >
> >> -----Mensaje original-----
> >> De: [hidden email]
> >> [mailto:[hidden email]] En nombre
> >> de Marco D'Ambros
> >> Enviado el: Martes, 04 de Noviembre de 2008 13:11
> >> Para: Seaside - general discussion
> >> Asunto: [Seaside] lightbox and please wait dialog
> >>
> >> Hi,
> >>
> >> in a seaside application I am writing, some operations take a long
> >> time to complete.
> >> For this reason, I want to add a sort of "please wait"
> dialog to the
> >> page which automatically disappears after the operation is
> performed.
> >>
> >> I tried something like this:
> >>
> >> html submitButton
> >> onClick:
> >> (html request callback: [self lightbox:
> >> (WAFormDialog new
> >> addMessage: 'Please wait')]),
> >> (html request callback: [self rootApplication
> >> computeLongOperation]);
> >> text: ' compute long operation']
> >>
> >> but it does not work. In particular I have to problems with that:
> >> 1 - the lightbox dialog is shown in the page only after the
> >> #computeLongOperation completed
> >> 2 - I dunno how to make the dialog disappear after the
> >> #computeLongOperation is completed.
> >>
> >> any suggestions will be really appreciated :-)
> >>
> >> thanks!
> >> Marco
> >> _______________________________________________
> >> seaside mailing list
> >> [hidden email]
> >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
> > _______________________________________________
> > seaside mailing list
> > [hidden email]
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside