On Thu, Mar 4, 2010 at 7:05 AM, Peter Karman <pe...@peknet.com> wrote:

>
> // make sure we are logged in before every xhr request
> Ext.Ajax.on('beforerequest', function(conn, opts) {
>    if (!AIR.Auth.isAuthenticated()) {
>        AIR.Auth.login();
>        return false;
>    }
>    return true;
> });
>

I thought about this, but in our case the ajax was checking for a specific
session because the server-side session had state info need for the ajax
request.  So, just allowing the user to log in again was not possible.

That's probably bad design on top of bad design.  In our case probably
better to rethink  then entire process and just make request that can be
independent and either work or fail in some graceful way.  making
assumptions about expected state is problem the root cause.



-- 
Bill Moseley
mose...@hank.org
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to