Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Login UI issue
Login UI issue [message #78027] Wed, 12 March 2008 03:10 Go to next message
Eclipse UserFriend
Originally posted by: dnise.hotmail.com

Hi all:
I have created a login UI interface before entrying my application. I have
created a shell which included userName and password controls in
createUI method. so I can display a Login UI interface before launching
whole system.it would cut down some resource consumption.if someone
inputed correct username and password,he can pass into system. I have
implemented these too. but there was a problem that how could I return to
login interface when i logout the system? how could i return to these
shell?
can i implement this in RAP??
is there anyone can give me some advice?

Thanks in advance

best regards
dnise
Re: Login UI issue [message #78044 is a reply to message #78027] Wed, 12 March 2008 03:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

does logout close your workbench? If so you could create a while loop in
your IEntryPoint#createUI() implementation:

display creation
while( !exit )
loginShell
createWorkbench


Ciao
Frank

-----Ursprüngliche Nachricht-----
Von: dnise [mailto:dnise@hotmail.com]
Bereitgestellt: Mittwoch, 12. März 2008 08:11
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: Login UI issue
Betreff: Login UI issue


Hi all:
I have created a login UI interface before entrying my application. I
have created a shell which included userName and password controls in
createUI method. so I can display a Login UI interface before launching
whole system.it would cut down some resource consumption.if someone
inputed correct username and password,he can pass into system. I have
implemented these too. but there was a problem that how could I return
to login interface when i logout the system? how could i return to these
shell?
can i implement this in RAP??
is there anyone can give me some advice?

Thanks in advance

best regards
dnise
Re: Login UI issue [message #78074 is a reply to message #78044] Wed, 12 March 2008 03:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dnise.hotmail.com

Frank Appel wrote:

> Hi,
>
> does logout close your workbench? If so you could create a while loop in
> your IEntryPoint#createUI() implementation:
>
> display creation
> while( !exit )
> loginShell
> createWorkbench
>
>
> Ciao
> Frank
>
> -----Ursprüngliche Nachricht-----
> Von: dnise [mailto:dnise@hotmail.com]
> Bereitgestellt: Mittwoch, 12. März 2008 08:11
> Bereitgestellt in: eclipse.technology.rap
> Unterhaltung: Login UI issue
> Betreff: Login UI issue
>
>
> Hi all:
> I have created a login UI interface before entrying my application. I
> have created a shell which included userName and password controls in
> createUI method. so I can display a Login UI interface before launching
> whole system.it would cut down some resource consumption.if someone
> inputed correct username and password,he can pass into system. I have
> implemented these too. but there was a problem that how could I return
> to login interface when i logout the system? how could i return to these
> shell?
> can i implement this in RAP??
> is there anyone can give me some advice?
>
> Thanks in advance
>
> best regards
> dnise

HI Franks:
Thanks for the first. Assume my application includes more than one
perspective . It will close all the perspectives, release all the resource
which application take up when logout system. it won't close workbench. my
code as follows:
Shell shell =new Shell(display);
...
add some control codes.
...

while (!shell.isDisposed()) {
if (login) { // if username and password are correct,we entry into system
break;
}
if (!display.readAndDispatch()) {
display.sleep();
}
}

return PlatformUI.createAndRunWorkbench(display, advisor);

I wrote all the code which logout system in a action. My object is how to
return the shell ??
Re: Login UI issue [message #78147 is a reply to message #78044] Wed, 12 March 2008 22:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dnise.hotmail.com

Hi Frank:
maybe I haven't described the problem clearly.The createUI method
is a entrance of application.In order to avoid a long startup time
and preserve resources, so I have created a shell and filled some controls
on it before "return PlatformUI.createAndRunWorkbench(display, advisor)",
it can entry into application while inputing correct username and password.
there is a logout button in system of each "ViewPart". i wanna to display
the shell which was create firstly. I don't know how to return to this
shell, I think the workbench has been closed, because it haven't created
workbench as shell generated. my codes as follows:

public int createUI() {
Display display = PlatformUI.createDisplay();
WorkbenchAdvisor advisor = new ApplicationWorkbenchAdvisor();
int i = 0;
shell = new Shell(display, SWT.NO_TRIM);
shell.setLayout(new GridLayout(2, false));
Label lbl1 = new Label(shell, SWT.NONE);
lbl1.setText("UserName:");
lbl1.setSize(40, 30);
txtUserName = new Text(shell, SWT.BORDER);
txtUserName.setSize(90, 30);
Label lbl2 = new Label(shell, SWT.NONE);
lbl2.setText("Password:");
lbl2.setSize(40, 30);
txtPassword = new Text(shell, SWT.BORDER);
txtPassword.setSize(90, 30);
Button btn = new Button(shell, SWT.PUSH);
btn.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
login = validata_Login(txtUserName.getText(), txtPassword
.getText());
System.out.println(login);

}

});
btn.setText("submit");
btn.setSize(50, 30);

shell.setSize(400, 300);
shell.setMaximized(false);
shell.open();
shell.layout();

while (!shell.isDisposed()) {
if (login) {
break;
}
if (!display.readAndDispatch()) {
display.sleep();
}
}

return PlatformUI.createAndRunWorkbench(display, advisor);
}


Thanks & regards

Dnise

2008-03-13
Re: Login UI issue [message #78162 is a reply to message #78147] Wed, 12 March 2008 23:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: anupgokhale.rediffmail.com

dnise wrote:
> Hi Frank:
> maybe I haven't described the problem clearly.The createUI method
> is a entrance of application.In order to avoid a long startup time
> and preserve resources, so I have created a shell and filled some controls
> on it before "return PlatformUI.createAndRunWorkbench(display, advisor)",
> it can entry into application while inputing correct username and password.
> there is a logout button in system of each "ViewPart". i wanna to display
> the shell which was create firstly. I don't know how to return to this
> shell, I think the workbench has been closed, because it haven't created
> workbench as shell generated. my codes as follows:

I think your are unnecessarily over complicating the problem. I can
suggest two simple solutions:

1. Each of your views as a "Log-Out" menu/toolbar. When user clicks on
this menu, you can perform all clean up operations, and close all th
eopen editors and views. In this case you workbench will remain open.
You can then display the "Log-In" shell/dialog. In this shell, after
user credentials have been validated, you can decide whether the shell
has been loaded for the in which case you can run
PlatformUI.createAndRunWorkbench. If the log-in shell has been displayed
due to a log-off action, then the work bench has already been created
and you only need to load the required editors/views.

2. In the second option, whenever th euser logs off you can simply
redirect the browser to your original startup entry point.

Regards,
Anup
Re: Login UI issue [message #97844 is a reply to message #78044] Sat, 12 July 2008 19:39 Go to previous messageGo to next message
Eclipse UserFriend
Frank Appel schrieb:
> Hi,
>
> does logout close your workbench? If so you could create a while loop in
> your IEntryPoint#createUI() implementation:
>
> display creation
> while( !exit )
> loginShell
> createWorkbench

Hi Frank, that's exactly the idea I was looking for. However,
createworkbench works only once. When the loop is executed a second
time, the workbench does not start, bug 201545.

Do you know a workaround?

Frank.
Re: Login UI issue [message #98841 is a reply to message #97844] Fri, 18 July 2008 05:07 Go to previous message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

The only workaround I could think of at the moment is to cleanup the
session completle. Somewhere on this list I described how to do this by
an URL "redirect" using the browser widget. Not nice but it worked...


Ciao
Frank

-----Ursprüngliche Nachricht-----
Von: Frank Gerhardt [mailto:fg@frankgerhardt.com]
Bereitgestellt: Sonntag, 13. Juli 2008 01:40
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: Login UI issue
Betreff: Re: Login UI issue

Frank Appel schrieb:
> Hi,
>
> does logout close your workbench? If so you could create a while loop
in
> your IEntryPoint#createUI() implementation:
>
> display creation
> while( !exit )
> loginShell
> createWorkbench

Hi Frank, that's exactly the idea I was looking for. However,
createworkbench works only once. When the loop is executed a second
time, the workbench does not start, bug 201545.

Do you know a workaround?

Frank.
Previous Topic:SWT graphics classes are internal in RWT (org.eclipse.swt.internal.graphics)
Next Topic:Update image for already redistered path
Goto Forum:
  


Current Time: Fri May 09 06:41:01 EDT 2025

Powered by FUDForum. Page generated in 0.04267 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top