This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to replace LoginApplet with MainApplet  RSS feed

 
mohana konakanchi
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have written a LoginApplet which will do authentication of user. once authentication is done I need to show MainApplet(starting of Main Application) in the same place as LoginApplet displayed.
another thing is I need to pass user name to MainApplet from LoginApplet.
This can be done by putting MainApplet in HTML page and calling that page, But How can I pass userName to the MainApplet?
thanks in advance.
Mohana
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mohana,
I have done something similar but my approach, due to applet restrictions, was to have the MainApplet launch a LoginDialog that performs the authentication. If the auth failed then I could dispose of the MainApplet.
To get data from one to the other I created a LoginDialogBean that handles listeners. For example, MainApplet registers as listener of LoginDialogBean buttons. In that way I could easily control the MainApplet depending on which Login button was pressed.
Another approach could be to use a modal dialog and use a common class that gets set by the LoginDialog and read by the MainApplet (which waits for the dialog to be dismissed after show method call).
Regards,
Manfred.
 
mohana konakanchi
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much
I am working on it

regards,
Mohana
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!