Implement "please wait" message using smallfaces.

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

Implement "please wait" message using smallfaces.

Timothy James Ziebart
Hi all.  I've built a fairly complex interface using SmallFaces
components.

9 listboxes,  4 buttons,  3 labels, 1 panel and two custom components
(subclasses of SFAbstractWidget -  search results and a map).  Selecting
an option in one listbox results in a chain of events being executed -
the contents of two other listboxes are updated, a search conducted on a
remote server and the results being displayed including label and button
statuses being updated.   There are no submit or search buttons -
selecting a listbox option starts the process (I will be adding the
functionality to include the search button should the user not have
javascript on).  There are no forms.  It works well - that is not the
problem.

The challenge I have is due to the delay in getting data from the remote
server I would like to implement a "please wait" message while the data
is being retrieved.  I am not having any success getting it to work.

I tried a SUPeriodical object reading a variable holding updated message
text but, it stops while the data is being retrieved and will display
the content only when the remaining components are updated -- too late.
   Is it possible to have an element update the content and display the
results before the remainder of the requests are processed? What would
that look like?  Does SUEvaluater/updater update content and render
before processing the next script?

I was looking at Ramon Leon's Ajax Polling and Concurrency articles
thinking I may have to head in that direction.   Is that the direction I
need to head in?  Any suggestions would be helpful.

As you can tell I am confused about the sequence when a element on a
page has it's content updated and when the browser displays the results
using ajax.

Thank you for the help.

Tim

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

RE: Implement "please wait" message using smallfaces.

Robert Sirois
Are you able to use an #onSuccess: type message is your system? (Ajax request.)

RS

> Date: Wed, 9 Dec 2009 16:19:47 -0800
> From: timothy@churchmilitant.org
> To: seaside@lists.squeakfoundation.org
> Subject: [Seaside] Implement "please wait" message using smallfaces.
>
> Hi all. I've built a fairly complex interface using SmallFaces
> components.
>
> 9 listboxes, 4 buttons, 3 labels, 1 panel and two custom components
> (subclasses of SFAbstractWidget - search results and a map). Selecting
> an option in one listbox results in a chain of events being executed -
> the contents of two other listboxes are updated, a search conducted on a
> remote server and the results being displayed including label and button
> statuses being updated. There are no submit or search buttons -
> selecting a listbox option starts the process (I will be adding the
> functionality to include the search button should the user not have
> javascript on). There are no forms. It works well - that is not the
> problem.
>
> The challenge I have is due to the delay in getting data from the remote
> server I would like to implement a "please wait" message while the data
> is being retrieved. I am not having any success getting it to work.
>
> I tried a SUPeriodical object reading a variable holding updated message
> text but, it stops while the data is being retrieved and will display
> the content only when the remaining components are updated -- too late.
> Is it possible to have an element update the content and display the
> results before the remainder of the requests are processed? What would
> that look like? Does SUEvaluater/updater update content and render
> before processing the next script?
>
> I was looking at Ramon Leon's Ajax Polling and Concurrency articles
> thinking I may have to head in that direction. Is that the direction I
> need to head in? Any suggestions would be helpful.
>
> As you can tell I am confused about the sequence when a element on a
> page has it's content updated and when the browser displays the results
> using ajax.
>
> Thank you for the help.
>
> Tim
>
>
> _______________________________________________
> seaside mailing list
> seaside@lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


Windows LiveT Hotmail is faster and more secure than ever. Learn more.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Implement "please wait" message using smallfaces.

Timothy James Ziebart
Thanks Robert I will give it a try - never used it before.

Robert Sirois wrote:

> Are you able to use an #onSuccess: type message is your system? (Ajax
> request.)
>
> RS
>
> > Date: Wed, 9 Dec 2009 16:19:47 -0800
> > From: [hidden email]
> > To: [hidden email]
> > Subject: [Seaside] Implement "please wait" message using smallfaces.
> >
> > Hi all. I've built a fairly complex interface using SmallFaces
> > components.
> >
> > 9 listboxes, 4 buttons, 3 labels, 1 panel and two custom components
> > (subclasses of SFAbstractWidget - search results and a map). Selecting
> > an option in one listbox results in a chain of events being executed -
> > the contents of two other listboxes are updated, a search conducted
> on a
> > remote server and the results being displayed including label and
> button
> > statuses being updated. There are no submit or search buttons -
> > selecting a listbox option starts the process (I will be adding the
> > functionality to include the search button should the user not have
> > javascript on). There are no forms. It works well - that is not the
> > problem.
> >
> > The challenge I have is due to the delay in getting data from the
> remote
> > server I would like to implement a "please wait" message while the data
> > is being retrieved. I am not having any success getting it to work.
> >
> > I tried a SUPeriodical object reading a variable holding updated
> message
> > text but, it stops while the data is being retrieved and will display
> > the content only when the remaining components are updated -- too late.
> > Is it possible to have an element update the content and display the
> > results before the remainder of the requests are processed? What would
> > that look like? Does SUEvaluater/updater update content and render
> > before processing the next script?
> >
> > I was looking at Ramon Leon's Ajax Polling and Concurrency articles
> > thinking I may have to head in that direction. Is that the direction I
> > need to head in? Any suggestions would be helpful.
> >
> > As you can tell I am confused about the sequence when a element on a
> > page has it's content updated and when the browser displays the results
> > using ajax.
> >
> > Thank you for the help.
> >
> > Tim
> >
> >
> > _______________________________________________
> > seaside mailing list
> > [hidden email]
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> ------------------------------------------------------------------------
> Windows LiveT Hotmail is faster and more secure than ever. Learn more.
> <http://www.microsoft.com/windows/windowslive/hotmail_bl1/hotmail_bl1.aspx?ocid=PID23879::T:WLMTAGL:ON:WL:en-ww:WM_IMHM_1:092009>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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: Implement "please wait" message using smallfaces.

Timothy James Ziebart
Ok now I know why it's doing it.  I have a collection of panes I need to
be refreshed (when: send: to: refresh:) and the message will be
refreshed during the processing of the collection.  What I need it to do is:

1. update the message to working status
2. on success refresh the remaining panes
3. when the panes are all refreshed (including the hit list)
4. update the message to a ready status.

Hmmm can this be done in SmallFaces using (when:send:to:refresh:)?  Or
do I just evaluate javascript (when: evaluateJavascript:)?

Timothy James Ziebart wrote:

> Thanks Robert I will give it a try - never used it before.
>
> Robert Sirois wrote:
>> Are you able to use an #onSuccess: type message is your system? (Ajax
>> request.)
>>
>> RS
>>
>> > Date: Wed, 9 Dec 2009 16:19:47 -0800
>> > From: [hidden email]
>> > To: [hidden email]
>> > Subject: [Seaside] Implement "please wait" message using smallfaces.
>> >
>> > Hi all. I've built a fairly complex interface using SmallFaces
>> > components.
>> >
>> > 9 listboxes, 4 buttons, 3 labels, 1 panel and two custom components
>> > (subclasses of SFAbstractWidget - search results and a map). Selecting
>> > an option in one listbox results in a chain of events being executed -
>> > the contents of two other listboxes are updated, a search conducted
>> on a
>> > remote server and the results being displayed including label and
>> button
>> > statuses being updated. There are no submit or search buttons -
>> > selecting a listbox option starts the process (I will be adding the
>> > functionality to include the search button should the user not have
>> > javascript on). There are no forms. It works well - that is not the
>> > problem.
>> >
>> > The challenge I have is due to the delay in getting data from the
>> remote
>> > server I would like to implement a "please wait" message while the
>> data
>> > is being retrieved. I am not having any success getting it to work.
>> >
>> > I tried a SUPeriodical object reading a variable holding updated
>> message
>> > text but, it stops while the data is being retrieved and will display
>> > the content only when the remaining components are updated -- too
>> late.
>> > Is it possible to have an element update the content and display the
>> > results before the remainder of the requests are processed? What would
>> > that look like? Does SUEvaluater/updater update content and render
>> > before processing the next script?
>> >
>> > I was looking at Ramon Leon's Ajax Polling and Concurrency articles
>> > thinking I may have to head in that direction. Is that the direction I
>> > need to head in? Any suggestions would be helpful.
>> >
>> > As you can tell I am confused about the sequence when a element on a
>> > page has it's content updated and when the browser displays the
>> results
>> > using ajax.
>> >
>> > Thank you for the help.
>> >
>> > Tim
>> >
>> >
>> > _______________________________________________
>> > seaside mailing list
>> > [hidden email]
>> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>> ------------------------------------------------------------------------
>> Windows LiveT Hotmail is faster and more secure than ever. Learn
>> more.
>> <http://www.microsoft.com/windows/windowslive/hotmail_bl1/hotmail_bl1.aspx?ocid=PID23879::T:WLMTAGL:ON:WL:en-ww:WM_IMHM_1:092009>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> 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: Implement "please wait" message using smallfaces.

Robert Sirois
I'm not at all familiar with SmallFaces, but maybe try something along these lines:

onSuccess: (
    updateComponentsWithJavaScript onComplete: (displayReady).
).

RS

> Date: Wed, 9 Dec 2009 20:21:52 -0800
> From: timothy@churchmilitant.org
> To: seaside@lists.squeakfoundation.org
> Subject: Re: [Seaside] Implement "please wait" message using smallfaces.
>
> Ok now I know why it's doing it. I have a collection of panes I need to
> be refreshed (when: send: to: refresh:) and the message will be
> refreshed during the processing of the collection. What I need it to do is:
>
> 1. update the message to working status
> 2. on success refresh the remaining panes
> 3. when the panes are all refreshed (including the hit list)
> 4. update the message to a ready status.
>
> Hmmm can this be done in SmallFaces using (when:send:to:refresh:)? Or
> do I just evaluate javascript (when: evaluateJavascript:)?
>
> Timothy James Ziebart wrote:
> > Thanks Robert I will give it a try - never used it before.
> >
> > Robert Sirois wrote:
> >> Are you able to use an #onSuccess: type message is your system? (Ajax
> >> request.)
> >>
> >> RS
> >>
> >> > Date: Wed, 9 Dec 2009 16:19:47 -0800
> >> > From: timothy@churchmilitant.org
> >> > To: seaside@lists.squeakfoundation.org
> >> > Subject: [Seaside] Implement "please wait" message using smallfaces.
> >> >
> >> > Hi all. I've built a fairly complex interface using SmallFaces
> >> > components.
> >> >
> >> > 9 listboxes, 4 buttons, 3 labels, 1 panel and two custom components
> >> > (subclasses of SFAbstractWidget - search results and a map). Selecting
> >> > an option in one listbox results in a chain of events being executed -
> >> > the contents of two other listboxes are updated, a search conducted
> >> on a
> >> > remote server and the results being displayed including label and
> >> button
> >> > statuses being updated. There are no submit or search buttons -
> >> > selecting a listbox option starts the process (I will be adding the
> >> > functionality to include the search button should the user not have
> >> > javascript on). There are no forms. It works well - that is not the
> >> > problem.
> >> >
> >> > The challenge I have is due to the delay in getting data from the
> >> remote
> >> > server I would like to implement a "please wait" message while the
> >> data
> >> > is being retrieved. I am not having any success getting it to work.
> >> >
> >> > I tried a SUPeriodical object reading a variable holding updated
> >> message
> >> > text but, it stops while the data is being retrieved and will display
> >> > the content only when the remaining components are updated -- too
> >> late.
> >> > Is it possible to have an element update the content and display the
> >> > results before the remainder of the requests are processed? What would
> >> > that look like? Does SUEvaluater/updater update content and render
> >> > before processing the next script?
> >> >
> >> > I was looking at Ramon Leon's Ajax Polling and Concurrency articles
> >> > thinking I may have to head in that direction. Is that the direction I
> >> > need to head in? Any suggestions would be helpful.
> >> >
> >> > As you can tell I am confused about the sequence when a element on a
> >> > page has it's content updated and when the browser displays the
> >> results
> >> > using ajax.
> >> >
> >> > Thank you for the help.
> >> >
> >> > Tim
> >> >
> >> >
> >> > _______________________________________________
> >> > seaside mailing list
> >> > seaside@lists.squeakfoundation.org
> >> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >>
> >> ------------------------------------------------------------------------
> >> Windows LiveT Hotmail is faster and more secure than ever. Learn
> >> more.
> >> <http://www.microsoft.com/windows/windowslive/hotmail_bl1/hotmail_bl1.aspx?ocid=PID23879::T:WLMTAGL:ON:WL:en-ww:WM_IMHM_1:092009>
> >>
> >> ------------------------------------------------------------------------
> >>
> >> _______________________________________________
> >> seaside mailing list
> >> seaside@lists.squeakfoundation.org
> >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >>
> >
> > _______________________________________________
> > seaside mailing list
> > seaside@lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
>
> _______________________________________________
> seaside mailing list
> seaside@lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


Chat with Messenger straight from your Hotmail inbox. Check it out
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Implement "please wait" message using smallfaces.

hernanmd
In reply to this post by Timothy James Ziebart
Hi Timothy,
  Please load the SFSpinner package in the SmallFaces repository and
try the WASpinnerExample component. It's somewhat outdated concerning
the latest SmallFaces protocol but it should work fine for your needs.
Let me know if it's what you're looking for.
Cheers,

Hernán

2009/12/9 Timothy James Ziebart <[hidden email]>:

> Hi all.  I've built a fairly complex interface using SmallFaces components.
> 9 listboxes,  4 buttons,  3 labels, 1 panel and two custom components
> (subclasses of SFAbstractWidget -  search results and a map).  Selecting an
> option in one listbox results in a chain of events being executed - the
> contents of two other listboxes are updated, a search conducted on a remote
> server and the results being displayed including label and button statuses
> being updated.   There are no submit or search buttons - selecting a listbox
> option starts the process (I will be adding the functionality to include the
> search button should the user not have javascript on).  There are no forms.
>  It works well - that is not the problem.
>
> The challenge I have is due to the delay in getting data from the remote
> server I would like to implement a "please wait" message while the data is
> being retrieved.  I am not having any success getting it to work.
> I tried a SUPeriodical object reading a variable holding updated message
> text but, it stops while the data is being retrieved and will display the
> content only when the remaining components are updated -- too late.  Is it
> possible to have an element update the content and display the results
> before the remainder of the requests are processed? What would that look
> like?  Does SUEvaluater/updater update content and render before processing
> the next script?
>
> I was looking at Ramon Leon's Ajax Polling and Concurrency articles thinking
> I may have to head in that direction.   Is that the direction I need to head
> in?  Any suggestions would be helpful.
>
> As you can tell I am confused about the sequence when a element on a page
> has it's content updated and when the browser displays the results using
> ajax.
>
> Thank you for the help.
>
> Tim
>
>
> _______________________________________________
> 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