How to force a page refresh after Ajax call

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

How to force a page refresh after Ajax call

Scott McWilliams
All,

What is the proper way to force a page refresh after an Ajax call?  I have button which displays a popup dialog that asks the user to confirm an action (save, logout, etc) and then (possibly) redirect based on their choice.

If the button is configured to use #ajaxSubmit, the popup confirmation appears correctly and the above code does redirect to the correct view if the user so chooses, but it does not force a refresh of the page and displays the contents of the redirected view above the contents of the current view (i.e does not clear the contents of the current browser window).  If I manually refresh the browser, the view is displayed correctly.

If the button is not configured to use #ajaxSubmit, the contents of the current view disappear altogether and the popup confirmation does not appear at all.

Both views are configured with #aidaDontCache = true.

If it makes a difference, I am using the Dolphin port.

Any and all ideas welcomed.

Thanks,
Scott

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: How to force a page refresh after Ajax call

Scott McWilliams
Anyone have any ideas on this?

Thanks,
Scott


From: [hidden email]
To: [hidden email]
Date: Fri, 30 Sep 2011 10:19:02 -0500
Subject: [aida] How to force a page refresh after Ajax call

All,

What is the proper way to force a page refresh after an Ajax call?  I have button which displays a popup dialog that asks the user to confirm an action (save, logout, etc) and then (possibly) redirect based on their choice.

If the button is configured to use #ajaxSubmit, the popup confirmation appears correctly and the above code does redirect to the correct view if the user so chooses, but it does not force a refresh of the page and displays the contents of the redirected view above the contents of the current view (i.e does not clear the contents of the current browser window).  If I manually refresh the browser, the view is displayed correctly.

If the button is not configured to use #ajaxSubmit, the contents of the current view disappear altogether and the popup confirmation does not appear at all.

Both views are configured with #aidaDontCache = true.

If it makes a difference, I am using the Dolphin port.

Any and all ideas welcomed.

Thanks,
Scott

_______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: How to force a page refresh after Ajax call

Janko Mivšek
Hi Scott,

Sorry for late answer. Page refresh from Ajax call is possible in Aida
6.3, which is not yet ported to Dolphin.

In 6.3 you can do something like:

  (e addButtonText: 'Refresh')
      onSubmitDo: [self page redirectTo: self observee]

This will Ajax submit the form, then reload the same page by redirecting
to it.

Best regards
Janko


S, Scott McWilliams piše:

> Anyone have any ideas on this?
>
> Thanks,
> Scott
>
> ------------------------------------------------------------------------
> From: [hidden email]
> To: [hidden email]
> Date: Fri, 30 Sep 2011 10:19:02 -0500
> Subject: [aida] How to force a page refresh after Ajax call
>
> All,
>
> What is the proper way to force a page refresh after an Ajax call?  I
> have button which displays a popup dialog that asks the user to confirm
> an action (save, logout, etc) and then (possibly) redirect based on
> their choice.
>
> If the button is configured to use #ajaxSubmit, the popup confirmation
> appears correctly and the above code does redirect to the correct view
> if the user so chooses, but it does not force a refresh of the page and
> displays the contents of the redirected view above the contents of the
> current view (i.e does not clear the contents of the current browser
> window).  If I manually refresh the browser, the view is displayed
> correctly.
>
> If the button is not configured to use #ajaxSubmit, the contents of the
> current view disappear altogether and the popup confirmation does not
> appear at all.
>
> Both views are configured with #aidaDontCache = true.
>
> If it makes a difference, I am using the Dolphin port.
>
> Any and all ideas welcomed.
>
> Thanks,
> Scott
>
> _______________________________________________ Aida mailing list
> [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida
>
>
>
> _______________________________________________
> Aida mailing list
> [hidden email]
> http://lists.aidaweb.si/mailman/listinfo/aida

--
Janko Mivšek
Aida/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida