Well, I checked something. When I remove the window containing the error 
message opened after getting the response from the request everything seems to 
be ok. The request is closed and there's no timeout. Maybe the modal window 
somehow blockes finishing the request properly? 

I now added a status bar in my login window - the error message is displayed 
there and no second window for displaying the message is opened. Seems like 
this fixed the error but it'd be interesting for me if that behaviour is wanted 
or if it's just my fault?

Thanks for your help,
Daniel

-------- Original Message --------
Subject: [qooxdoo-devel] Re-2:  Remote.Request Problem (11-Aug-2009 8:00)
From:    Daniel Hirtzbruch <[email protected]>
To:      [email protected]

> Good Morning Jim & thanks for your reply.
> 
> The only value the backend script returns is json_encode(true) or json_
> encode(false) in PHP at this moment. I already reduced it to a minimum of 
> data to find the error. What I'm wondering about is how can the request 
> fire the "completed" event and afterwards fire a timeout? In my opinion the 
> request should be totally dead if it fires "completed".
> 
> The change of qx.util.Json.parse to parseQx didn't change anything. When I 
> make a qx.dev.Debug.debugObject on my request result, there's just "true" 
> or "false" as expected. 
> 
> Any idea what I'm wrong with?
> Thanks & regards,
> Daniel
> 
>          
> Subject: Re: [qooxdoo-devel] Remote.Request Problem (10-Aug-2009 22:08)
> From:    Jim Hunter <[email protected]>
> To:      [email protected]
> 
> 
> What often happens is, when your request gives you the data and you try to 
> do something with it, if you get an error while trying to manipulate the 
> returned data, no error is displayed and the function simply exits. This 
> caused the request to continue to wait for the function to finish properly 
> which it never does. That causes the timeout error. I found that the method 
> qx.util.Json.parse does not always work on the data I send back. I have 
> started using qx.util.Json.parseQx instead. If a slightly malformed JSON 
> comes back and isn't parsed correctly, this scenario can happen. So first 
> try parseQx to see if that clears up your problem. If not, take a very 
> close look at the returned JSON to make sure it is formed correctly.
> 
> Jim
> 
> 
> 
> On Mon, Aug 10, 2009 at 12:53 PM, Daniel Hirtzbruch <[email protected]> 
> wrote:
> 
> Hello Thomas,
> 
> thanks for your reply. Maybe I wasn't so clearly with my description, in 
> the meantime I cleared out some things.
> 
> I got a login window with username / password and a login button. That one 
> is executed when the user is trying to login. The POST request is only 
> started after validating the length of the given data.
> 
> When the user gives correct data, everything's ok by now. The request gives 
> the correct response and the login window is closed, my main Application is 
> loaded via the partloader.
> When the user fills in wrong data, the request is started once (only one 
> POST request in the firebug Net Tab), and the script returns the correct 
> failure notice. A message window is displayed and after some seconds 
> another window comes up with a timeout notice (I then see 2 timeout 
> messages in firebug although the script already returned a "false" response)
> :
> 
> 23938ms qx.io.remote.RequestQueue[3k]: Timeout: transport 3mNative.js (
> Zeile 51)
> 23942ms qx.io.remote.RequestQueue[3k]: 5017ms > 5000msNative.js (Zeile 51)
> 23945ms qx.io.remote.Exchange[3m]: Timeout: implementation 3nNative.js (
> Zeile 51)
> 24438ms qx.io.remote.RequestQueue[3k]: Timeout: transport 3mNative.js (
> Zeile 51)
> 24441ms qx.io.remote.RequestQueue[3k]: 5517ms > 5000msNative.js (Zeile 51)
> 24445ms qx.io.remote.Exchange[3m]: Timeout: implementation 3n
> 
> Thats my current code:
> 
> Security.js
> 
> qx.Class.define("pmaster.Security",
> {
> 
>  extend : qx.core.Object,
> 
>  /*
>  ***************************************************************************
> **
>     CONSTRUCTOR
>  ***************************************************************************
> **
>  */
> 
>  construct : function()
>  {
>    this.base(arguments);
>  },
> 
>  /*
>   **************************************************************************
> ***
>      EVENTS
>   **************************************************************************
> ***
>   */
> 
>  events : {
> 
>    /** Fired on initialization */
>    "visit" : "qx.event.type.Event",
> 
>    /** Fired on logout */
>    "loggedout" : "qx.event.type.Event",
> 
>    /** Fired after successfull login */
>    "loggedin" : "qx.event.type.Event",
> 
>    /** fired on error while logging in / out, eg. when a request times out *
> /
>    "error" : "qx.event.type.Event",
> 
>    /** fired on authentication error */
>    "autherror" : "qx.event.type.Event"
> 
>  },
> 
>  /*
>  ***************************************************************************
> **
>     PROPERTIES
>  ***************************************************************************
> **
>  */
>  properties :
>  {
> 
>    /** the users groups */
>    usergoups :
>    {
>      check : "qx.data.Array",
>      nullable: false
>    },
> 
>    /** the users name */
>    username :
>    {
>      check : "String",
>      nullable: false
>    },
> 
>    /** The current login state */
>    state :
>    {
>      check : ["visit", "loggedout", "loggedin", "error", "autherror"],
>      init : "visit",
>      event : "stateModified"
>    },
> 
>    message :
>    {
>        check : "String",
>        nullable : true,
>        event : "messageModified"
>    }
> 
>  },
> 
>  /*
>   **************************************************************************
> ***
>      MEMBERS
>   **************************************************************************
> ***
>   */
> 
>  members :
>  {
> 
>        /**
>         * Method to check user given login data via a
>         * JSON request against Database
>         *
>         * @param username {String} username
>         * @param password {String} password
>         *
>         * @return {void}
>         */
>        checkLogin : function(username,password) {
>          if(password.length<1 || username.length<1) {
>                  this.setState("autherror");
>          }
>          else {
> 
>                  var request = new qx.io.remote.Request("backend/login.php",
>  "POST", "text/plain");
> 
>                  request.setFormField("username", username);
>                  request.setFormField("password", password);
>                  request.addListener("completed",function(e) {
>                    var state = e.getContent();
>                    if(qx.util.Json.parse(state) != true) {
>                        this.setState("autherror");
> 
>                        this.setMessage("Authentication Error!");
>                    }
>                    else {
>                        this.setState("loggedin");
>                        this.setMessage("Login Successfull!");
> 
>                        this.setUsername(username);
>                    }
>                  },this);
>                  request.addListener("aborted",function(e) {
>                          this.setState("error");
> 
>                      this.setMessage("Transmission aborted!");
> 
>                  },this);
>                  request.addListener("failed",function(e) {
>                          this.setState("error");
> 
>                      this.setMessage("Transmission failed!");
> 
>                  },this);
>                  request.addListener("timeout",function(e) {
>                          this.setState("error");
> 
>                      this.setMessage("Transmission timed out!");
>                  },this);
>                  request.send();
>          }
> 
>        }
>  }
> });
> 
> 
> Application.js
> 
>            /* Button */
>            this.btLogin =  new qx.ui.form.Button("Login");
>            this.btLogin.addListener("execute",function(e) {
>              this.loggedin = new pmaster.Security();
>              this.loggedin.addListener("stateModified",function(e) {
>                  if(this.loggedin.getState()=="loggedin") {
>                          this.loginWindow.close();
>                          this.showMainApp();
>                  }
>                  else if(this.loggedin.getState()=="autherror") {
>                          this.logstatewin = this.displayMessageWindow(this,"
> error","Authentication Error","Please check your username / password.");
>                          this.htmlBody.add(this.logstatewin);
>                  }
>                  else if(this.loggedin.getState()=="error") {
>                          this.logstatewin = this.displayMessageWindow(this,"
> error","System Error","Currently we are not able to process your request.");
> 
>                          this.htmlBody.add(this.logstatewin);
>                  }
>              },this);
>              this.loggedin.addListener("messageModified",function(e) {
>                        this.debug(this.loggedin.getMessage());
>              },this);
>              this.loggedin.checkLogin(
>                this.inUserName.getValue(),
>                this.pwPassWord.getValue()
>              );
>            },this);
>            this.loginWindow.add(this.btLogin,{row : 3,column : 1});
> 
> So, when just trying to login with correct data the problem doesn't come up,
>  it only occures when wrong data is given. I now noticed, that the 
> messageModified-Listener is only fired after successfull login, it does not 
> get fired when wrong data is given. There must be something wrong with my 
> class?
> 
> Thanks in advance,
> Daniel
> 
> 
> 
> -------- Original Message --------
> Subject: Re: [qooxdoo-devel] Remote.Request Problem (10-Aug-2009 16:38)
> From:    thron7 <[email protected]>
> To:      [email protected]
> 
> >
> > > When the user now tries logging in, several requests are opened,
> >
> > how do you know?
> >
> > >  but although they should be closed when returning the requested data (
> > > false / true) or firing one of the above events they do not seem to be
> > > really closed. When I don't do anything after having tried to log in once,
> > > nothing happens. When I then execute the login button,
> >
> > So that means "executing the login button" is not the same as "trying to
> > log in", is that right?! So what is the login button for then? And how
> > do you "try to log in" *before* you hit the login button?
> >
> > That sounds strange to me...
> >
> > Have you tried loggin in by just doing everything in code (provide user
> > id, password, ...), without much interaction with the GUI, just firing
> > up a request with the data hard-coded? Did it work? What is the net tab
> > of firebug saying?
> >
> > T.
> >
> > >  I get several timeout messages in the firebug console  and my windows
> > > containing status messages are displayed again - as many as I tried 
> > > logging
> > > in before (the status windows are displayed on change of the login state 
> > > ->
> > > "error","autherror", etc.). All those messages are timed at about 5000 ms 
> > > (
> > > like req. timeout configuration).
> > >
> > > So, what am I wrong with? I can't imagine why QD should not close
> > > connections after having returned their request data.
> > >
> > > Thanks to all of you,
> > > Daniel
> > >
> > >
> > >
> > > ----------------------------------------------------------------------------
> > > 
> > > --
> > > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 
> > > 30-Day
> > >
> > > trial. Simplify your report design, integration and deployment - and focus
> > > on
> > > what you do best, core application coding. Discover what's new with
> > > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> > > _______________________________________________
> > > qooxdoo-devel mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> > >
> > >
> > >
> >
> > ----------------------------------------------------------------------------
> > 
> > --
> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> >
> > trial. Simplify your report design, integration and deployment - and focus
> > on
> > what you do best, core application coding. Discover what's new with
> > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> > _______________________________________________
> > qooxdoo-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
> 
> 
> ----------------------------------------------------------------------------
> --
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus 
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
> 
> 
> ----------------------------------------------------------------------------
> --
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> 
> trial. Simplify your report design, integration and deployment - and focus 
> on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to