Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/MainMenu.java @ 25:2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
flys-client/trunk@1411 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 07 Mar 2011 13:40:37 +0000 |
parents | e2b3966b40ca |
children | dfdb927b137d |
comparison
equal
deleted
inserted
replaced
24:8825ce0a537e | 25:2da6be38d8b6 |
---|---|
7 import com.smartgwt.client.widgets.Label; | 7 import com.smartgwt.client.widgets.Label; |
8 import com.smartgwt.client.widgets.events.ClickEvent; | 8 import com.smartgwt.client.widgets.events.ClickEvent; |
9 import com.smartgwt.client.widgets.events.ClickHandler; | 9 import com.smartgwt.client.widgets.events.ClickHandler; |
10 import com.smartgwt.client.widgets.layout.HLayout; | 10 import com.smartgwt.client.widgets.layout.HLayout; |
11 | 11 |
12 import de.intevation.artifacts.common.model.User; | |
13 | |
14 import de.intevation.flys.client.client.FLYS; | 12 import de.intevation.flys.client.client.FLYS; |
15 import de.intevation.flys.client.client.FLYSMessages; | 13 import de.intevation.flys.client.client.FLYSMessages; |
14 import de.intevation.flys.client.shared.model.User; | |
16 | 15 |
17 | 16 |
18 /** | 17 /** |
19 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 18 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
20 */ | 19 */ |
102 * Update the text field that shows the current user. If no user is | 101 * Update the text field that shows the current user. If no user is |
103 * currently logged in, the text will display {@link FLYSMessages.guest()}. | 102 * currently logged in, the text will display {@link FLYSMessages.guest()}. |
104 */ | 103 */ |
105 public void updateCurrentUser() { | 104 public void updateCurrentUser() { |
106 String name = currentUser != null | 105 String name = currentUser != null |
107 ? currentUser.getLastName() + ", " + currentUser.getFirstName() | 106 ? currentUser.getName() |
108 : messages.guest(); | 107 : messages.guest(); |
109 | 108 |
110 GWT.log("Update the current user: " + name); | 109 GWT.log("Update the current user: " + name); |
111 userText.setContents(messages.user(name)); | 110 userText.setContents(messages.user(name)); |
112 } | 111 } |