]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman/src/org/splat/simer/ConnectionAction.java
Salome HOME
Menus are improved
[tools/siman.git] / Workspace / Siman / src / org / splat / simer / ConnectionAction.java
index e3114f734bc862bcd15283c5f3141e6a6adc0475..d588d946d119b5fbe0b70b6f35615acb49b57ad0 100644 (file)
@@ -18,6 +18,8 @@ public class ConnectionAction extends Action {
        private String username = null;
        private String password = null;
        private String backmenu = null;
+    
+    private String _menuProperty;
 
        /**
         * Serial version ID.
@@ -86,6 +88,10 @@ public class ConnectionAction extends Action {
                                        sfilter.put("author", String.valueOf(user.getIndex()));
                        }
                        this.connect(context, user); // Updates the session context
+                       
+                       setMenuProperty("none");
+                       initializationScreenContext(_menuProperty);
+                       
                        return backmenu;
                } catch (FailedLoginException error) {
                        setErrorCode("message.error.login." + error.getMessage());
@@ -96,6 +102,7 @@ public class ConnectionAction extends Action {
                }
        }
 
+
        @SuppressWarnings("unchecked")
        public String doLogout() {
                // -------------------------
@@ -115,6 +122,10 @@ public class ConnectionAction extends Action {
                        sfilter.put("author", "0");
 
                        this.disconnect(); // Updates the session context
+                       
+                       setMenuProperty("none");
+                       initializationScreenContext(_menuProperty);
+                       
                        return backmenu;
                } catch (Exception error) {
                        logger.error("Reason:", error);
@@ -122,32 +133,45 @@ public class ConnectionAction extends Action {
                }
        }
 
-       // ==============================================================================================================================
-       // Getters and setters
-       // ==============================================================================================================================
-
-       public String getUsername() {
-               // ----------------------------
-               return username;
-       }
-
-       public String getPassword() {
-               // ----------------------------
-               return password;
-       }
-
-       public void setUsername(String value) {
-               // --------------------------------------
-               this.username = value;
-       }
-
-       public void setPassword(String value) {
-               // --------------------------------------
-               this.password = value;
+//  ==============================================================================================================================
+//  Getters and setters
+//  ==============================================================================================================================
+       
+    public String getUsername () {
+//  ----------------------------       
+      return username;
+    }
+    public String getPassword () {
+//  ----------------------------
+      return password;
+    }
+
+    public void setUsername (String value) {
+//  --------------------------------------
+      this.username = value;
+    }
+    public void setPassword (String value) {
+//  --------------------------------------
+      this.password = value;
+    }
+    public void setBackMenu (String menu) {
+//  -------------------------------------
+      this.backmenu = menu;
+    }
+    
+    /**
+        * Get the menuProperty.
+        * @return the menuProperty
+        */
+       public String getMenuProperty() {
+               return _menuProperty;
        }
 
-       public void setBackMenu(String menu) {
-               // -------------------------------------
-               this.backmenu = menu;
+       /**
+        * Set the menuProperty.
+        * @param menuProperty the menuProperty to set
+        */
+       public void setMenuProperty(String menuProperty) {
+               this._menuProperty = menuProperty;
        }
 }
\ No newline at end of file