Author Topic: Automatic login issue  (Read 6688 times)

jsimmons

  • Customer
  • Newbie
  • *
  • Posts: 2
    • View Profile
Automatic login issue
« on: November 11, 2009, 11:00:57 AM »
I'm trying to create an auto-login mechanism, where we can pass in some parameters to the application on the URL when it is first accessed, and the console application will then automatically log in.  The code works when I run the console as a standalone application, but there's something odd going on when I run it through AjaxSwing.

Apparently AjaxSwing displays the login page (or a blank page if I change the code that way), and then the Java execution stops until the user interacts with some UI control (i.e. click any button).  Once that happens, the auto-login proceeds just like it should.  Can you explain why AjaxSwing causes this behavior?  And do you have any other suggestions for working around it?

Dev Team

  • Customer
  • Hero Member
  • *
  • Posts: 593
    • View Profile
Re: Automatic login issue
« Reply #1 on: November 11, 2009, 11:27:09 AM »
Is it working correct if you click "refresh" in browser when you see login page?

What do you mean by "Java execution stops"? It stops in some places in java or it executes whole code, but does not update browser?

It sounds like an asynchronous update issue, take a look at http://creamtec.com/forums/index.php?action=post;topic=285.0;num_replies=0. You can try calling beginOperation when application starts and endOperation after auto-login process finished.

jsimmons

  • Customer
  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Automatic login issue
« Reply #2 on: November 11, 2009, 11:59:40 AM »
Okay, it looks like it was just a refresh issue.  I got it to refresh by adding a block of code that does beginOperation, setUpdateBrowser, setUpdateBrowserInterval, endOperation.

The link you tried to post is broken, can you try it again?  It sounds like it might be useful for me to read.


Dev Team

  • Customer
  • Hero Member
  • *
  • Posts: 593
    • View Profile
Re: Automatic login issue
« Reply #3 on: November 11, 2009, 12:03:14 PM »
Sorry, the link was http://creamtec.com/products/ajaxswing/doc/multithreading.html , but you probably already seen that documentation.

Glad that you solved your problem.