Salome HOME
<jsp:param ... > parameters are removed from the title bar
authormka <mka@opencascade.com>
Fri, 26 Oct 2012 14:23:43 +0000 (14:23 +0000)
committermka <mka@opencascade.com>
Fri, 26 Oct 2012 14:23:43 +0000 (14:23 +0000)
31 files changed:
Workspace/Siman-Common/src/org/splat/dal/bo/som/ProgressState.java
Workspace/Siman/WebContent/jsp/titlebar.jsp
Workspace/Siman/WebContent/study/displayKnowledge.jsp
Workspace/Siman/WebContent/study/displayStudyProperties.jsp
Workspace/Siman/WebContent/study/displayStudyStep.jsp
Workspace/Siman/WebContent/study/editScenarioProperties.jsp
Workspace/Siman/WebContent/study/editStudyProperties.jsp
Workspace/Siman/WebContent/study/error.jsp
Workspace/Siman/WebContent/study/importDocument.jsp
Workspace/Siman/WebContent/study/importError.jsp
Workspace/Siman/WebContent/study/newScenario.jsp
Workspace/Siman/WebContent/study/upload.jsp
Workspace/Siman/WebContent/study/versionDocument.jsp
Workspace/Siman/src/org/splat/simer/Action.java
Workspace/Siman/src/org/splat/simer/DisplayKnowledgeAction.java
Workspace/Siman/src/org/splat/simer/DisplayStudyStepAction.java
Workspace/Siman/src/org/splat/simer/EditDocumentAction.java
Workspace/Siman/src/org/splat/simer/EditKnowledgeElementAction.java
Workspace/Siman/src/org/splat/simer/EditScenarioPropertiesAction.java
Workspace/Siman/src/org/splat/simer/EditSimulationContextAction.java
Workspace/Siman/src/org/splat/simer/EditStudyAction.java
Workspace/Siman/src/org/splat/simer/ImportDocumentAction.java
Workspace/Siman/src/org/splat/simer/MenuBarSettings.java
Workspace/Siman/src/org/splat/simer/NewScenarioAction.java
Workspace/Siman/src/org/splat/simer/NotYetImplementedAction.java
Workspace/Siman/src/org/splat/simer/StartAction.java
Workspace/Siman/src/org/splat/simer/StudyPropertiesAction.java
Workspace/Siman/src/org/splat/simer/TitleBarSettings.java [new file with mode: 0644]
Workspace/Siman/src/org/splat/simer/UploadAction.java
Workspace/Siman/src/org/splat/simer/VersionDocumentAction.java
Workspace/Siman/src/spring/applicationContext.xml

index a33ad5dd19c70826d1761f3e691aabd37d5fa038..78f131177547cfa2eb0faa66bd5cc61811f93409 100644 (file)
@@ -6,8 +6,20 @@ package org.splat.dal.bo.som;
  */
 
 public enum ProgressState {
-    inPROGRESS,                           // Represents inWORK, inDRAFT and inCHECK states for search purpose
-    inWORK, inDRAFT, inCHECK, APPROVED,
-    EXTERN,                               // Document-specific state representing documents produced outside studies
-    TEMPLATE                              // Study-specific state qualifying typical reference studies
+       /**
+        * Represents inWORK, inDRAFT and inCHECK states for search purpose.
+        */
+    inPROGRESS,
+    inWORK, 
+    inDRAFT, 
+    inCHECK, 
+    APPROVED,
+    /**
+     * Document-specific state representing documents produced outside studies.
+     */
+    EXTERN,
+    /**
+     * Study-specific state qualifying typical reference studies.
+     */
+    TEMPLATE;
 }
\ No newline at end of file
index bd5ed5e328d7cb803e31eca270d5325f55fbb5c6..a727de6391cf4af83d4cfc0737852b6a12be3447 100644 (file)
@@ -5,19 +5,14 @@
 <%@
     taglib prefix="s" uri="/struts-tags"
 %>
-<!-- Initialization of the context
-  -->
-<%  String     type     = request.getParameter("entity");                     // Study or Knowledge Element
-    String     disabled = request.getParameter("disable");                    // State of right buttons
-    OpenObject entity   = (OpenObject)session.getAttribute(type + ".open");   // Active entity (Proxy + getSelection())
-%>
-<s:set var="entitype"><%=type%></s:set>
-<s:set var="disabled"><%=disabled%></s:set>
-<s:set var="proxtate"><%=entity.getProgressState()%></s:set>
+
+<s:set var="entitype" value="titleBarSettings.entryType" />
+<s:set var="disabled" value="titleBarSettings.closeDisabledProperty" />
+<s:set var="proxtate" value="titleBarSettings.progressState" />
 
 <s:url id="close"   namespace="/study" action="close-%{#entitype}"></s:url>
 <s:url id="refresh" namespace="/study" action="open-%{#entitype}">
-  <s:param name="selection"><%=entity.getSelection()%></s:param>
+  <s:param name="selection" value="titleBarSettings.selectionState" />
 </s:url>
 
 <div id=title-bar>
@@ -35,8 +30,8 @@
           </s:a>
         </s:else>
       </td>
-      <td>
-        <b><%=entity.getType()%>:&nbsp;</b><%=entity.getTitle()%>&nbsp;&nbsp;
+      <td>   
+        <b><s:property value="titleBarSettings.entryType"/>:&nbsp;</b><s:property value="titleBarSettings.entryTitle"/>&nbsp;&nbsp;
       </td>
       <td align=right>
         <table border="0" cellpadding="0" cellspacing="0" class="text">
index 1f1331a362420a37176834db00975912351b0f0a..3f3b7b848297b6911a75bbb2a1584e2b8f8c6866 100644 (file)
@@ -21,9 +21,7 @@
 <!-- Title-bar
      =============================================================================================================================
   -->
-    <jsp:include page="/jsp/titlebar.jsp">
-      <jsp:param name="entity" value="knowledge" />
-    </jsp:include>
+    <jsp:include page="/jsp/titlebar.jsp" />
 
 <!-- Left pane
      =============================================================================================================================
index 6811face5e5cb02d92031373943c2580eb7ec1f3..08d47495b3c9bf09e0cee88095bfb80a55d0abef 100644 (file)
 <!-- Title-bar
      =============================================================================================================================
   -->
-    <jsp:include page="/jsp/titlebar.jsp">
-      <jsp:param name="entity"  value="study" />
-      <jsp:param name="disable" value="true" />
-    </jsp:include>
+    <jsp:include page="/jsp/titlebar.jsp" />
 
 <!-- Left pane
      =============================================================================================================================
index a6ffc547b83d8695ab32346b30f90ee5af5e138c..7ac24f221705bb48c9129c9e313e6b26d629041c 100644 (file)
 <!-- Title-bar
      =============================================================================================================================
   -->
-    <jsp:include page="/jsp/titlebar.jsp">
-      <jsp:param name="entity" value="study" />
-    </jsp:include>
+    <jsp:include page="/jsp/titlebar.jsp" />
 
 <!-- Left pane
      =============================================================================================================================
index a4d0495cd2e5704d522a16305e3a849b14d6265e..2eb4d12f6b4d442a8f91806457353374bb852de5 100644 (file)
 <!-- Title-bar
      =============================================================================================================================
   -->
-    <jsp:include page="/jsp/titlebar.jsp">
-      <jsp:param name="entity"  value="study" />
-      <jsp:param name="disable" value="true" />
-    </jsp:include>
+    <jsp:include page="/jsp/titlebar.jsp" />
 
 <!-- Left pane
      =============================================================================================================================
index aa58aee7441dcb2e761d57907b34aca0dc34fe4d..a516e77a2a1517bb4b77a8e7ef25caa31432bef7 100644 (file)
 <!-- Title-bar
      =============================================================================================================================
   -->
-    <jsp:include page="/jsp/titlebar.jsp">
-      <jsp:param name="entity"  value="study" />
-      <jsp:param name="disable" value="true" />
-    </jsp:include>
+    <jsp:include page="/jsp/titlebar.jsp" />
 
 <!-- Left pane
      =============================================================================================================================
index e894a61892f55e69759791013c2caa9728d4291c..466d157de7b79a4f685087b9c0445e8b95e1a3c2 100644 (file)
 <!-- Title-bar
      =============================================================================================================================
   -->
-    <jsp:include page="/jsp/titlebar.jsp">
-      <jsp:param name="entity" value="study" />
-      <jsp:param name="disable" value="true" />
-    </jsp:include>
+    <jsp:include page="/jsp/titlebar.jsp" />
 
 <!-- Left pane
      =============================================================================================================================
index bec63696a01bc8d92307beac80fd621eb4285343..3f793a1ca60def2f3e2bbd9275cc5835694df72c 100644 (file)
 <!-- Title-bar
      =============================================================================================================================
   -->
-    <jsp:include page="/jsp/titlebar.jsp">
-      <jsp:param name="entity"  value="study" />
-      <jsp:param name="disable" value="true" />
-    </jsp:include>
+    <jsp:include page="/jsp/titlebar.jsp" />
 
 <!-- Left pane
      =============================================================================================================================
index 7fc623821f9ba127f65501006223921f017094b8..a29f5eed34bd4eed0cce1dc014d2b8af2e5f5c1a 100644 (file)
 <!-- Title-bar
      =============================================================================================================================
   -->
-    <jsp:include page="/jsp/titlebar.jsp">
-      <jsp:param name="entity" value="study" />
-      <jsp:param name="disable" value="true" />
-    </jsp:include>
+    <jsp:include page="/jsp/titlebar.jsp" />
 
 <!-- Left pane
      =============================================================================================================================
index 197fa73c9f431de6986e5e982ad10bcc2d79bd87..a792bd58ed9472f6ba43a13c032de352ec846573 100644 (file)
 <!-- Title-bar
      =============================================================================================================================
   -->
-    <jsp:include page="/jsp/titlebar.jsp">
-      <jsp:param name="entity"  value="study" />
-      <jsp:param name="disable" value="true" />
-    </jsp:include>
-
+    <jsp:include page="/jsp/titlebar.jsp" />
 <!-- Left pane
      =============================================================================================================================
   -->
index c00df6a846b48e575fda0ea5771d13809f43f576..4180ff9ea639ab3f4ea2f1138e2b50f30e274182 100644 (file)
 <!-- Title-bar
      =============================================================================================================================
   -->
-    <jsp:include page="/jsp/titlebar.jsp">
-      <jsp:param name="entity"  value="study" />
-      <jsp:param name="disable" value="true" />
-    </jsp:include>
+    <jsp:include page="/jsp/titlebar.jsp" />
 
 <!-- Left pane
      =============================================================================================================================
index 2b70e374804a149ad52febc0c5bbd4551e649312..8a44fe78e90695938bf2db3c6e2e4e9b9826886c 100644 (file)
 <!-- Title-bar
      =============================================================================================================================
   -->
-    <jsp:include page="/jsp/titlebar.jsp">
-      <jsp:param name="entity"  value="study" />
-      <jsp:param name="disable" value="true" />
-    </jsp:include>
+    <jsp:include page="/jsp/titlebar.jsp" />
 
 <!-- Left pane
      =============================================================================================================================
index 57f84062a2f729a5732bc980673b966be85a1d37..000d511d70f36d410cd95f880f809e9f52d0333c 100644 (file)
@@ -29,8 +29,16 @@ public class Action extends ActionSupport implements ServletRequestAware, Sessio
        private OpenStudy _openStudy;
        private OpenKnowledge _openKnowledge;
        
+       /**
+        * MenuBarSettings bean.
+        */
        private MenuBarSettings _menuBarSettings;
        
+       /**
+        * TitleBarSettings bean.
+        */
+       private TitleBarSettings _titleBarSettings;
+
        private HttpServletRequest  request;
 
        /**
@@ -153,18 +161,14 @@ public class Action extends ActionSupport implements ServletRequestAware, Sessio
        
        if (session.get("study.open") == null) {
                getMenuBarSettings().setIsStudyNull(true);
-               logger.debug("MKA: setIsStudyNull = true");
        } else {
                getMenuBarSettings().setIsStudyNull(false);
-               logger.debug("MKA: setIsStudyNull = false");
        }
        
        if (session.get("knowledge.open") == null) {
                getMenuBarSettings().setIsKnowledgeNull(true);
-               logger.debug("MKA: setIsKnowledgeNull = true");
        } else {
                getMenuBarSettings().setIsKnowledgeNull(false);
-               logger.debug("MKA: setIsKnowledgeNull = false");
        }
        
        ApplicationRights userRights  = (ApplicationRights)session.get("user.rights");
@@ -183,14 +187,49 @@ public class Action extends ActionSupport implements ServletRequestAware, Sessio
        
     }
     
+    /**
+     * Initialization the Context for Menu Bar and Tool Bar.
+     * 
+     * @param titleProperty - The title of the open study/knowledge.
+     * @param editDisabledProperty - Property that indicates whether the current open study is editable or not.
+     */
+    public void initializationContext(final String titleProperty, final String editDisabledProperty) {
+       
+       initializationContext();
+       
+       OpenObject entity = (OpenObject)session.get(titleProperty + ".open");
+       
+       getTitleBarSettings().setProgressState(entity.getProgressState().toString());
+       getTitleBarSettings().setSelectionState(entity.getSelection());
+       getTitleBarSettings().setEntryType(entity.getType());
+       getTitleBarSettings().setEntryTitle(entity.getTitle());
+       getTitleBarSettings().setEditDisabledProperty(editDisabledProperty);
+    }
+    
     /**
         * Initialization of the screen context for menu bar.
+        * 
+        * @param menuProperty - the property of the menu bar.
         */
        public void initializationScreenContext(final String menuProperty) {
                
                initializationContext();
                getMenuBarSettings().intializeMenuBar(menuProperty);
        }
+       
+       /**
+        * Initialization of the screen context for menu bar and tool bar.
+        * 
+        * @param menuProperty - the property of the menu bar.
+        * @param titleProperty - The title of the open study/knowledge.
+     * @param editDisabledProperty - Property that indicates whether the current open study is editable or not.
+        */
+       public void initializationScreenContext(final String menuProperty, 
+                       final String titleProperty, final String editDisabledProperty) {
+               
+               initializationContext(titleProperty, editDisabledProperty);
+               getMenuBarSettings().intializeMenuBar(menuProperty);
+       }
 //  ==============================================================================================================================
 //  Getters and setters
 //  ==============================================================================================================================
@@ -236,4 +275,19 @@ public class Action extends ActionSupport implements ServletRequestAware, Sessio
        public void setMenuBarSettings(final MenuBarSettings menuBarSettings) {
                _menuBarSettings = menuBarSettings;
        }
+       
+       /**
+        * Get the _titleBarSettings.
+        * @return the _titleBarSettings
+        */
+       public TitleBarSettings getTitleBarSettings() {
+               return _titleBarSettings;
+       }
+       /**
+        * Set the titleBarSettings.
+        * @param titleBarSettings the titleBarSettings to set
+        */
+       public void setTitleBarSettings(TitleBarSettings titleBarSettings) {
+               _titleBarSettings = titleBarSettings;
+       }
 }
\ No newline at end of file
index d6c6c3d763589ffaa2054d6ade4eb432676f27e7..d15d903c2349a647b5670fd9753783bc8e0107b8 100644 (file)
@@ -28,6 +28,19 @@ public class DisplayKnowledgeAction extends DisplayBaseAction {
         * It can be: none, create, open, study, knowledge, sysadmin, help.
         */
        private String _menuProperty;
+       
+       /**
+        * Value of the title bar property. 
+        * It can be: study, knowledge.
+        */
+       private String _titleProperty;
+       
+       /**
+        * Property that indicates whether the current open study is editable or not.
+        * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+        * It is necessary for correct building the title bar.
+        */
+       private String _editDisabledProperty = "false";
 
        // ==============================================================================================================================
        // Action methods
@@ -59,7 +72,8 @@ public class DisplayKnowledgeAction extends DisplayBaseAction {
                getSession().put("menu.knowledge", myknelm.getMenu());
                
                setMenuProperty("knowledge");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("knowledge");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
 
                return SUCCESS;
        }
@@ -74,7 +88,8 @@ public class DisplayKnowledgeAction extends DisplayBaseAction {
                }
                
                setMenuProperty("knowledge");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("knowledge");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
                
                return SUCCESS;
        }
@@ -90,7 +105,8 @@ public class DisplayKnowledgeAction extends DisplayBaseAction {
                        myknelm.reduceDocument(myindex);
                
                setMenuProperty("knowledge");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("knowledge");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
                
                return SUCCESS;
        }
@@ -104,7 +120,8 @@ public class DisplayKnowledgeAction extends DisplayBaseAction {
                        myknelm.reduceKnowledge(myindex);
                
                setMenuProperty("knowledge");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("knowledge");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
                
                return SUCCESS;
        }
@@ -177,4 +194,38 @@ public class DisplayKnowledgeAction extends DisplayBaseAction {
        public void setMenuProperty(String menuProperty) {
                this._menuProperty = menuProperty;
        }
+       
+       /**
+        * Get the _titleProperty.
+        * @return the _titleProperty
+        */
+       public String getTitleProperty() {
+               return _titleProperty;
+       }
+
+       /**
+        * Set the _titleProperty.
+        * @param _titleProperty the titleProperty to set
+        */
+       public void setTitleProperty(String titleProperty) {
+               _titleProperty = titleProperty;
+       }
+
+       /**
+        * Get the _editDisabledProperty.
+        * @return the _editDisabledProperty
+        */
+       public final String getEditDisabledProperty() {
+               return _editDisabledProperty;
+       }
+
+       /**
+        * Set the _editDisabledProperty.
+        * @param _editDisabledProperty the _editDisabledProperty to set
+        */
+       public final void setEditDisabledProperty(String _editDisabledProperty) {
+               this._editDisabledProperty = _editDisabledProperty;
+       }
+
+       
 }
\ No newline at end of file
index 88603ff7cd3cb7f456311d68435e15b982070312..c90f0497684a23d12ac7b7c5118bb6ad4d88740f 100644 (file)
@@ -10,6 +10,11 @@ import org.splat.dal.bo.som.Study;
 import org.splat.wapp.PopupMenu;
 import org.splat.wapp.SimpleMenu;
 
+/**
+ * Presents the current open study information.
+ * @author Daniel Brunier-Coulin.
+ *
+ */
 public class DisplayStudyStepAction extends DisplayBaseAction {
 
        /**
@@ -32,6 +37,19 @@ public class DisplayStudyStepAction extends DisplayBaseAction {
         * It can be: none, create, open, study, knowledge, sysadmin, help.
         */
        private String _menuProperty;
+       
+       /**
+        * Value of the title bar property. 
+        * It can be: study, knowledge.
+        */
+       private String _titleProperty;
+       
+       /**
+        * Property that indicates whether the current open study is editable or not.
+        * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+        * It is necessary for correct building the title bar.
+        */
+       private String _editDisabledProperty = "false";
 
        // ==============================================================================================================================
        // Action methods
@@ -82,7 +100,8 @@ public class DisplayStudyStepAction extends DisplayBaseAction {
                getSession().put("menu.study", mystudy.getMenu());
                
                setMenuProperty("study");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("study");
+               initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
 
                return SUCCESS;
        }
@@ -107,7 +126,8 @@ public class DisplayStudyStepAction extends DisplayBaseAction {
                }
                
                setMenuProperty("study");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("study");
+               initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
                
                return SUCCESS;
        }
@@ -123,7 +143,8 @@ public class DisplayStudyStepAction extends DisplayBaseAction {
                        mystudy.reduceDocument(myindex);
                
                setMenuProperty("study");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("study");
+               initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
                
                return SUCCESS;
        }
@@ -137,7 +158,8 @@ public class DisplayStudyStepAction extends DisplayBaseAction {
                        mystudy.reduceKnowledge(myindex);
                
                setMenuProperty("study");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("study");
+               initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
                
                return SUCCESS;
        }
@@ -236,4 +258,37 @@ public class DisplayStudyStepAction extends DisplayBaseAction {
        public void setMenuProperty(String menuProperty) {
                this._menuProperty = menuProperty;
        }
+       
+       /**
+        * Get the _titleProperty.
+        * @return the _titleProperty
+        */
+       public String getTitleProperty() {
+               return _titleProperty;
+       }
+
+       /**
+        * Set the _titleProperty.
+        * @param _titleProperty the titleProperty to set
+        */
+       public void setTitleProperty(String titleProperty) {
+               _titleProperty = titleProperty;
+       }
+
+       /**
+        * Get the editDisabledProperty.
+        * @return the editDisabledProperty
+        */
+       public String getEditDisabledProperty() {
+               return _editDisabledProperty;
+       }
+
+       /**
+        * Set the editDisabledProperty.
+        * @param editDisabledProperty the editDisabledProperty to set
+        */
+       public void setEditDisabledProperty(String editDisabledProperty) {
+               _editDisabledProperty = editDisabledProperty;
+       }
+       
 }
\ No newline at end of file
index f9362046b932e5e366d8cbefeabcecd2e5712ec5..ba8a295fac3ebcb8df46a5831fa464320f55d152 100644 (file)
@@ -3,10 +3,10 @@ package org.splat.simer;
 import java.io.File;
 import java.util.Calendar;
 
-import org.splat.kernel.InvalidPropertyException;
 import org.splat.dal.bo.kernel.User;
-import org.splat.dal.bo.som.Publication;
 import org.splat.dal.bo.som.ConvertsRelation;
+import org.splat.dal.bo.som.Publication;
+import org.splat.kernel.InvalidPropertyException;
 import org.splat.service.PublicationService;
 import org.splat.service.StepService;
 import org.splat.service.technical.RepositoryService;
@@ -43,6 +43,19 @@ public class EditDocumentAction extends DisplayStudyStepAction {
         * It can be: none, create, open, study, knowledge, sysadmin, help.
         */
        private String _menuProperty;
+       
+       /**
+        * Value of the title bar property. 
+        * It can be: study, knowledge.
+        */
+       private String _titleProperty;
+       
+       /**
+        * Property that indicates whether the current open study is editable or not.
+        * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+        * It is necessary for correct building the title bar.
+        */
+       private String _editDisabledProperty = "false";
 
        /**
         * Operations enumeration.
@@ -64,7 +77,8 @@ public class EditDocumentAction extends DisplayStudyStepAction {
                mystudy = getOpenStudy();
                
                setMenuProperty("study");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("study");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
                
                return SUCCESS;
        }
@@ -72,7 +86,8 @@ public class EditDocumentAction extends DisplayStudyStepAction {
        public String doSetDocument() {
                
                setMenuProperty("study");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("study");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
                
                try {
                        mystudy = getOpenStudy();
@@ -122,7 +137,8 @@ public class EditDocumentAction extends DisplayStudyStepAction {
 //             Transaction transax = connex.beginTransaction();
                
                setMenuProperty("study");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("study");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
                
                try {
                        // Getting user inputs
@@ -153,7 +169,8 @@ public class EditDocumentAction extends DisplayStudyStepAction {
        public String doDeleteDocument() {
                
                setMenuProperty("study");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("study");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
                
                try {
                        mystudy = getOpenStudy();
@@ -259,4 +276,40 @@ public class EditDocumentAction extends DisplayStudyStepAction {
        public void setMenuProperty(String menuProperty) {
                this._menuProperty = menuProperty;
        }
+       
+       /**
+        * Get the _titleProperty.
+        * @return the _titleProperty
+        */
+       public String getTitleProperty() {
+               return _titleProperty;
+       }
+
+       /**
+        * Set the _titleProperty.
+        * @param _titleProperty the titleProperty to set
+        */
+       public void setTitleProperty(String titleProperty) {
+               _titleProperty = titleProperty;
+       }
+
+       /**
+        * Get the editDisabledProperty.
+        * @return the editDisabledProperty
+        */
+       public String getEditDisabledProperty() {
+               return _editDisabledProperty;
+       }
+
+       /**
+        * Set the editDisabledProperty.
+        * @param editDisabledProperty the editDisabledProperty to set
+        */
+       public void setEditDisabledProperty(String editDisabledProperty) {
+               _editDisabledProperty = editDisabledProperty;
+       }
+
+
+
+       
 }
\ No newline at end of file
index da4e7072fa9358857cc0f5c1d9df46acffd0d6ec..177f5b41defe59accd85f28e8ca37a19a532e819 100644 (file)
@@ -48,6 +48,19 @@ public class EditKnowledgeElementAction extends DisplayStudyStepAction {
         * Value of the menu property. It can be: none, create, open, study, knowledge, sysadmin, help.
         */
        private String _menuProperty;
+       
+       /**
+        * Value of the title bar property. 
+        * It can be: study, knowledge.
+        */
+       private String _titleProperty;
+       
+       /**
+        * Property that indicates whether the current open study is editable or not.
+        * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+        * It is necessary for correct building the title bar.
+        */
+       private String _editDisabledProperty = "false";
 
        // ==============================================================================================================================
        // Action methods
@@ -62,7 +75,8 @@ public class EditKnowledgeElementAction extends DisplayStudyStepAction {
                mystudy = getOpenStudy();
 
                setMenuProperty("study");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("study");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
 
                return SUCCESS;
        }
@@ -75,7 +89,8 @@ public class EditKnowledgeElementAction extends DisplayStudyStepAction {
        public String doSetKnowledge() {
 
                setMenuProperty("study");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("study");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
 
                try {
                        User user = getConnectedUser();
@@ -132,7 +147,8 @@ public class EditKnowledgeElementAction extends DisplayStudyStepAction {
                getMenu("study").selects(mystudy.getSelection()); // Updates the menu icon, in case of last removed document
 
                setMenuProperty("study");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("study");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
 
                return SUCCESS;
        }
@@ -271,4 +287,38 @@ public class EditKnowledgeElementAction extends DisplayStudyStepAction {
        public void setMenuProperty(String menuProperty) {
                this._menuProperty = menuProperty;
        }
+       
+       /**
+        * Get the _titleProperty.
+        * @return the _titleProperty
+        */
+       public String getTitleProperty() {
+               return _titleProperty;
+       }
+
+       /**
+        * Set the _titleProperty.
+        * @param _titleProperty the titleProperty to set
+        */
+       public void setTitleProperty(String titleProperty) {
+               _titleProperty = titleProperty;
+       }
+
+       /**
+        * Get the editDisabledProperty.
+        * @return the editDisabledProperty
+        */
+       public final String getEditDisabledProperty() {
+               return _editDisabledProperty;
+       }
+
+       /**
+        * Set the editDisabledProperty.
+        * @param editDisabledProperty the editDisabledProperty to set
+        */
+       public final void setEditDisabledProperty(String editDisabledProperty) {
+               _editDisabledProperty = editDisabledProperty;
+       }
+
+       
 }
\ No newline at end of file
index 311eb2a2816b719cf380ae0e08ee7d5821bbf41f..275468593497636bb87050cf45f04f0944f7a745 100644 (file)
@@ -23,6 +23,19 @@ public class EditScenarioPropertiesAction extends DisplayStudyStepAction {
         * It can be: none, create, open, study, knowledge, sysadmin, help.
         */
        private String _menuProperty;
+       
+       /**
+        * Value of the title bar property. 
+        * It can be: study, knowledge.
+        */
+       private String _titleProperty;
+       
+       /**
+        * Property that indicates whether the current open study is editable or not.
+        * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+        * It is necessary for correct building the title bar.
+        */
+       private String _editDisabledProperty = "false";
 
        /**
         * Serial version ID.
@@ -50,7 +63,9 @@ public class EditScenarioPropertiesAction extends DisplayStudyStepAction {
                subject = label.getString("label.study") + " " + mystudy.getTitle();
                
                setMenuProperty("study");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("study");
+               setEditDisabledProperty("true");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
 
                return SUCCESS;
        }
@@ -165,4 +180,38 @@ public class EditScenarioPropertiesAction extends DisplayStudyStepAction {
        public void setMenuProperty(String menuProperty) {
                this._menuProperty = menuProperty;
        }
+       
+       /**
+        * Get the _titleProperty.
+        * @return the _titleProperty
+        */
+       public String getTitleProperty() {
+               return _titleProperty;
+       }
+
+       /**
+        * Set the _titleProperty.
+        * @param _titleProperty the titleProperty to set
+        */
+       public void setTitleProperty(String titleProperty) {
+               _titleProperty = titleProperty;
+       }
+
+       /**
+        * Get the editDisabledProperty.
+        * @return the editDisabledProperty
+        */
+       public final String getEditDisabledProperty() {
+               return _editDisabledProperty;
+       }
+
+       /**
+        * Set the editDisabledProperty.
+        * @param editDisabledProperty the editDisabledProperty to set
+        */
+       public final void setEditDisabledProperty(String editDisabledProperty) {
+               _editDisabledProperty = editDisabledProperty;
+       }
+
+       
 }
\ No newline at end of file
index 939d5d1ba1d4d2929ee83facb038721f913382db..fdc5d6ed3e4b433a8bfba873484f2a3e0f44f0d9 100644 (file)
@@ -43,25 +43,19 @@ public class EditSimulationContextAction extends DisplayStudyStepAction {
         * It can be: none, create, open, study, knowledge, sysadmin, help.
         */
        private String _menuProperty;
-
+       
        /**
-        * Get the stepService.
-        * 
-        * @return the stepService
+        * Value of the title bar property. 
+        * It can be: study, knowledge.
         */
-       public StepService getStepService() {
-               return _stepService;
-       }
-
+       private String _titleProperty;
+       
        /**
-        * Set the stepService.
-        * 
-        * @param stepService
-        *            the stepService to set
+        * Property that indicates whether the current open study is editable or not.
+        * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+        * It is necessary for correct building the title bar.
         */
-       public void setStepService(StepService stepService) {
-               _stepService = stepService;
-       }
+       private String _editDisabledProperty = "false";
 
        private static final long serialVersionUID = -641719644024601042L;
 
@@ -75,7 +69,8 @@ public class EditSimulationContextAction extends DisplayStudyStepAction {
                contype = getInvolvedContexts();
                
                setMenuProperty("study");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("study");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
 
                if (contype.isEmpty())
                        return "create";
@@ -87,7 +82,8 @@ public class EditSimulationContextAction extends DisplayStudyStepAction {
                mystudy = getOpenStudy();
                
                setMenuProperty("study");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("study");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
                
                int typid = Integer.valueOf(selectype);
                if (typid == 0)
@@ -109,7 +105,8 @@ public class EditSimulationContextAction extends DisplayStudyStepAction {
                        mystudy = getOpenStudy();
                        
                        setMenuProperty("study");
-                       initializationScreenContext(_menuProperty);
+                       setTitleProperty("study");
+               initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
                        
                        if (newtype.length() == 0 || value.length() == 0)
                                return INPUT;
@@ -141,7 +138,8 @@ public class EditSimulationContextAction extends DisplayStudyStepAction {
        public String doDeleteContext() {
                
                setMenuProperty("study");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("study");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
                
                try {
                        mystudy = getOpenStudy();
@@ -171,7 +169,8 @@ public class EditSimulationContextAction extends DisplayStudyStepAction {
 //             Transaction transax = connex.beginTransaction();
                
                setMenuProperty("study");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("study");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
                
                try {
                        mystudy = getOpenStudy();
@@ -352,6 +351,25 @@ public class EditSimulationContextAction extends DisplayStudyStepAction {
                _simulationContextTypeService = simulationContextTypeService;
        }
        
+       /**
+        * Get the stepService.
+        * 
+        * @return the stepService
+        */
+       public StepService getStepService() {
+               return _stepService;
+       }
+
+       /**
+        * Set the stepService.
+        * 
+        * @param stepService
+        *            the stepService to set
+        */
+       public void setStepService(StepService stepService) {
+               _stepService = stepService;
+       }
+       
        /**
         * Get the menuProperty.
         * @return the menuProperty
@@ -367,4 +385,38 @@ public class EditSimulationContextAction extends DisplayStudyStepAction {
        public void setMenuProperty(String menuProperty) {
                this._menuProperty = menuProperty;
        }
+       
+       /**
+        * Get the _titleProperty.
+        * @return the _titleProperty
+        */
+       public String getTitleProperty() {
+               return _titleProperty;
+       }
+
+       /**
+        * Set the _titleProperty.
+        * @param _titleProperty the titleProperty to set
+        */
+       public void setTitleProperty(String titleProperty) {
+               _titleProperty = titleProperty;
+       }
+
+       /**
+        * Get the editDisabledProperty.
+        * @return the editDisabledProperty
+        */
+       public final String getEditDisabledProperty() {
+               return _editDisabledProperty;
+       }
+
+       /**
+        * Set the editDisabledProperty.
+        * @param editDisabledProperty the editDisabledProperty to set
+        */
+       public final void setEditDisabledProperty(String editDisabledProperty) {
+               _editDisabledProperty = editDisabledProperty;
+       }
+
+       
 }
\ No newline at end of file
index 3fce95321c9f620a95edd04b150512d0aa98e170..6a4f468dbf22752f1bdfc17945bfba4708bd83fb 100644 (file)
@@ -20,6 +20,19 @@ public class EditStudyAction extends DisplayStudyStepAction {
         * It can be: none, create, open, study, knowledge, sysadmin, help.
         */
        private String _menuProperty;
+       
+       /**
+        * Value of the title bar property. 
+        * It can be: study, knowledge.
+        */
+       private String _titleProperty;
+       
+       /**
+        * Property that indicates whether the current open study is editable or not.
+        * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+        * It is necessary for correct building the title bar.
+        */
+       private String _editDisabledProperty = "false";
 
 //  ==============================================================================================================================
 //  Action methods
@@ -37,7 +50,8 @@ public class EditStudyAction extends DisplayStudyStepAction {
         mystudy.getPopup().setContext("study", mystudy.getStudyRights());   // The context has changed
         
         setMenuProperty("study");
-               initializationScreenContext(_menuProperty);
+        setTitleProperty("study");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
 
         return SUCCESS;
          }
@@ -80,4 +94,35 @@ public class EditStudyAction extends DisplayStudyStepAction {
        public void setMenuProperty(String menuProperty) {
                this._menuProperty = menuProperty;
        }
+       
+       /**
+        * Get the _titleProperty.
+        * @return the _titleProperty
+        */
+       public String getTitleProperty() {
+               return _titleProperty;
+       }
+
+       /**
+        * Set the _titleProperty.
+        * @param _titleProperty the titleProperty to set
+        */
+       public void setTitleProperty(String titleProperty) {
+               _titleProperty = titleProperty;
+       }
+       /**
+        * Get the editDisabledProperty.
+        * @return the editDisabledProperty
+        */
+       public final String getEditDisabledProperty() {
+               return _editDisabledProperty;
+       }
+       /**
+        * Set the editDisabledProperty.
+        * @param editDisabledProperty the editDisabledProperty to set
+        */
+       public final void setEditDisabledProperty(String editDisabledProperty) {
+               _editDisabledProperty = editDisabledProperty;
+       }
+
 }
\ No newline at end of file
index 2af91578508cfb1417a4ab441dd8728d81a443dd..fa66edfc0b1f4fe72610324610298e322f35cc98 100644 (file)
@@ -70,6 +70,19 @@ public class ImportDocumentAction extends UploadBaseNextAction {
         * It can be: none, create, open, study, knowledge, sysadmin, help.
         */
        private String _menuProperty;
+       
+       /**
+        * Value of the title bar property. 
+        * It can be: study, knowledge.
+        */
+       private String _titleProperty;
+       
+       /**
+        * Property that indicates whether the current open study is editable or not.
+        * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+        * It is necessary for correct building the title bar.
+        */
+       private String _editDisabledProperty = "false";
 
        // ==============================================================================================================================
        // Action methods
@@ -82,7 +95,9 @@ public class ImportDocumentAction extends UploadBaseNextAction {
        public String doInitialize() {
                
                setMenuProperty("study");
-           initializationScreenContext(_menuProperty);
+               setTitleProperty("study");
+               setEditDisabledProperty("true");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
              
                User user = getConnectedUser();
                File updir = getRepositoryService().getDownloadDirectory(user);
@@ -182,7 +197,9 @@ public class ImportDocumentAction extends UploadBaseNextAction {
                // -------------------------
                
                setMenuProperty("study");
-           initializationScreenContext(_menuProperty);
+               setTitleProperty("study");
+               setEditDisabledProperty("true");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
            
                if (action == ToDo.cancel)
                        return "cancel";
@@ -471,4 +488,38 @@ public class ImportDocumentAction extends UploadBaseNextAction {
        public void setMenuProperty(String menuProperty) {
                this._menuProperty = menuProperty;
        }
+       
+       /**
+        * Get the _titleProperty.
+        * @return the _titleProperty
+        */
+       public String getTitleProperty() {
+               return _titleProperty;
+       }
+
+       /**
+        * Set the _titleProperty.
+        * @param _titleProperty the titleProperty to set
+        */
+       public void setTitleProperty(String titleProperty) {
+               _titleProperty = titleProperty;
+       }
+
+       /**
+        * Get the editDisabledProperty.
+        * @return the editDisabledProperty
+        */
+       public final String getEditDisabledProperty() {
+               return _editDisabledProperty;
+       }
+
+       /**
+        * Set the editDisabledProperty.
+        * @param editDisabledProperty the editDisabledProperty to set
+        */
+       public final void setEditDisabledProperty(String editDisabledProperty) {
+               _editDisabledProperty = editDisabledProperty;
+       }
+
+       
 }
\ No newline at end of file
index 22a9a658b0828972a3cbefab0058583df9ba039e..57c89b2979703485b0df15542995807f4e76522b 100644 (file)
@@ -95,54 +95,24 @@ public class MenuBarSettings {
      */
     public void intializeMenuBar (final String menuProperty) {
        
-       if ("none".equals(menuProperty)) {
-               setIsMenuCreate(false);
-               setIsMenuOpen(false);
-               setIsMenuStudy(false);
-               setIsMenuKnowledge(false);
-               setIsMenuSysAdmin(false);
-               setIsMenuHelp(false);
-       } else if ("create".equals(menuProperty)) {
+       setIsMenuCreate(false);
+               setIsMenuOpen(false);
+               setIsMenuStudy(false);
+               setIsMenuKnowledge(false);
+               setIsMenuSysAdmin(false);
+               setIsMenuHelp(false);
+       
+       if ("create".equals(menuProperty)) {
                setIsMenuCreate(true);
-               setIsMenuOpen(false);
-               setIsMenuStudy(false);
-               setIsMenuKnowledge(false);
-               setIsMenuSysAdmin(false);
-               setIsMenuHelp(false);
        } else if ("open".equals(menuProperty)) {
-               setIsMenuCreate(false);
                setIsMenuOpen(true);
-               setIsMenuStudy(false);
-               setIsMenuKnowledge(false);
-               setIsMenuSysAdmin(false);
-               setIsMenuHelp(false);
        } else if ("study".equals(menuProperty)) {
-               setIsMenuCreate(false);
-               setIsMenuOpen(false);
                setIsMenuStudy(true);
-               setIsMenuKnowledge(false);
-               setIsMenuSysAdmin(false);
-               setIsMenuHelp(false);
        } else if ("knowledge".equals(menuProperty)) {
-               setIsMenuCreate(false);
-               setIsMenuOpen(false);
-               setIsMenuStudy(false);
                setIsMenuKnowledge(true);
-               setIsMenuSysAdmin(false);
-               setIsMenuHelp(false);
        } else if ("sysadmin".equals(menuProperty)) {
-               setIsMenuCreate(false);
-               setIsMenuOpen(false);
-               setIsMenuStudy(false);
-               setIsMenuKnowledge(false);
                setIsMenuSysAdmin(true);
-               setIsMenuHelp(false);
        } else if ("help".equals(menuProperty)) {
-               setIsMenuCreate(false);
-               setIsMenuOpen(false);
-               setIsMenuStudy(false);
-               setIsMenuKnowledge(false);
-               setIsMenuSysAdmin(false);
                setIsMenuHelp(true);
        }       
     }
index 246cb50deeda25e1ef8ada88718534efde33779b..c30ff6d02ff790905ffc2490c555558f5d0bfec2 100644 (file)
@@ -42,6 +42,19 @@ public class NewScenarioAction extends Action {
         * It can be: none, create, open, study, knowledge, sysadmin, help.
         */
        private String _menuProperty;
+       
+       /**
+        * Value of the title bar property. 
+        * It can be: study, knowledge.
+        */
+       private String _titleProperty;
+       
+       /**
+        * Property that indicates whether the current open study is editable or not.
+        * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+        * It is necessary for correct building the title bar.
+        */
+       private String _editDisabledProperty = "false";
 
        /**
         * Serial version ID.
@@ -75,7 +88,9 @@ public class NewScenarioAction extends Action {
       getSession().put("menu.scenario", menu);
       
       setMenuProperty("study");
-         initializationScreenContext(_menuProperty);
+      setTitleProperty("study");
+      setEditDisabledProperty("true");
+      initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
                
       return SUCCESS;
     }
@@ -93,7 +108,9 @@ public class NewScenarioAction extends Action {
       getMenu("scenario").selects(selection);
       
       setMenuProperty("study");
-      initializationScreenContext(_menuProperty);
+      setTitleProperty("study");
+      setEditDisabledProperty("true");
+      initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
       
       return SUCCESS;
     }
@@ -141,7 +158,8 @@ public class NewScenarioAction extends Action {
         logger.error("Reason:", saverror);
         
         setMenuProperty("study");
-               initializationScreenContext(_menuProperty);
+        setTitleProperty("study");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
                
         return ERROR;
       }
@@ -267,4 +285,36 @@ public class NewScenarioAction extends Action {
        public void setMenuProperty(String menuProperty) {
                this._menuProperty = menuProperty;
        }
+       
+       /**
+        * Get the _titleProperty.
+        * @return the _titleProperty
+        */
+       public String getTitleProperty() {
+               return _titleProperty;
+       }
+
+       /**
+        * Set the _titleProperty.
+        * @param _titleProperty the titleProperty to set
+        */
+       public void setTitleProperty(String titleProperty) {
+               _titleProperty = titleProperty;
+       }
+
+       /**
+        * Get the _editDisabledProperty.
+        * @return the _editDisabledProperty
+        */
+       public String getEditDisabledProperty() {
+               return _editDisabledProperty;
+       }
+
+       /**
+        * Set the _editDisabledProperty.
+        * @param _editDisabledProperty the _editDisabledProperty to set
+        */
+       public void setEditDisabledProperty(String _editDisabledProperty) {
+               this._editDisabledProperty = _editDisabledProperty;
+       }
 }
\ No newline at end of file
index e6ecc09e91d7f3bfcdee084048c6c1fe07e33e9d..d174af43ec6b5e4fe3ed88237e624c6e7ce567c3 100644 (file)
@@ -13,6 +13,19 @@ public class NotYetImplementedAction extends Action {
         * It can be: none, create, open, study, knowledge, sysadmin, help.
         */
        private String _menuProperty;
+       
+       /**
+        * Value of the title bar property. 
+        * It can be: study, knowledge.
+        */
+       private String _titleProperty;
+       
+       /**
+        * Property that indicates whether the current open study is editable or not.
+        * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+        * It is necessary for correct building the title bar.
+        */
+       private String _editDisabledProperty = "false";
 
 //  ==============================================================================================================================
 //  Action methods
@@ -22,7 +35,9 @@ public class NotYetImplementedAction extends Action {
 //  -----------------------------   
        
        setMenuProperty("study");
-               initializationScreenContext(_menuProperty);
+       setTitleProperty("study");
+       setEditDisabledProperty("true");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
                
       return SUCCESS;
     }
@@ -42,4 +57,38 @@ public class NotYetImplementedAction extends Action {
        public void setMenuProperty(String menuProperty) {
                this._menuProperty = menuProperty;
        }
+       
+       /**
+        * Get the _titleProperty.
+        * @return the _titleProperty
+        */
+       public String getTitleProperty() {
+               return _titleProperty;
+       }
+
+       /**
+        * Set the _titleProperty.
+        * @param _titleProperty the titleProperty to set
+        */
+       public void setTitleProperty(String titleProperty) {
+               _titleProperty = titleProperty;
+       }
+
+       /**
+        * Get the editDisabledProperty.
+        * @return the editDisabledProperty
+        */
+       public final String getEditDisabledProperty() {
+               return _editDisabledProperty;
+       }
+
+       /**
+        * Set the editDisabledProperty.
+        * @param editDisabledProperty the editDisabledProperty to set
+        */
+       public final void setEditDisabledProperty(String editDisabledProperty) {
+               _editDisabledProperty = editDisabledProperty;
+       }
+
+       
 }
\ No newline at end of file
index 8e075b4ea35bd4a0ab6380ab16cd5d7939d81efb..f235f6fe2b2d47441a27cc18cbc2d003150bf472 100644 (file)
@@ -26,6 +26,19 @@ public class StartAction extends Action implements ServletRequestAware {
         * It can be: none, create, open, study, knowledge, sysadmin, help.
         */
        private String _menuProperty;
+       
+       /**
+        * Value of the title bar property. 
+        * It can be: study, knowledge.
+        */
+       private String _titleProperty;
+       
+       /**
+        * Property that indicates whether the current open study is editable or not.
+        * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+        * It is necessary for correct building the title bar.
+        */
+       private String _editDisabledProperty = "false";
 
        /**
         * Serial version ID.
@@ -73,7 +86,9 @@ public class StartAction extends Action implements ServletRequestAware {
         logger.fatal("Reason:", error);
         
         setMenuProperty("study");
-               initializationScreenContext(_menuProperty);
+        setTitleProperty("study");
+        setEditDisabledProperty("true");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
         
         return ERROR;
       }
@@ -135,4 +150,38 @@ public class StartAction extends Action implements ServletRequestAware {
        public void setMenuProperty(String menuProperty) {
                this._menuProperty = menuProperty;
        }
+       
+       /**
+        * Get the _titleProperty.
+        * @return the _titleProperty
+        */
+       public String getTitleProperty() {
+               return _titleProperty;
+       }
+
+       /**
+        * Set the _titleProperty.
+        * @param _titleProperty the titleProperty to set
+        */
+       public void setTitleProperty(String titleProperty) {
+               _titleProperty = titleProperty;
+       }
+
+       /**
+        * Get the editDisabledProperty.
+        * @return the editDisabledProperty
+        */
+       public final String getEditDisabledProperty() {
+               return _editDisabledProperty;
+       }
+
+       /**
+        * Set the editDisabledProperty.
+        * @param editDisabledProperty the editDisabledProperty to set
+        */
+       public final void setEditDisabledProperty(String editDisabledProperty) {
+               _editDisabledProperty = editDisabledProperty;
+       }
+
+       
 }
\ No newline at end of file
index 018497c9e5be133a852a04c7cf0827d00226a1de..7b855ae0a74f27f39042b79bc89f07999b172e02 100644 (file)
@@ -65,6 +65,19 @@ public class StudyPropertiesAction extends DisplayStudyStepAction {
         * It can be: none, create, open, study, knowledge, sysadmin, help.
         */
        private String _menuProperty;
+       
+       /**
+        * Value of the title bar property. 
+        * It can be: study, knowledge.
+        */
+       private String _titleProperty;
+       
+       /**
+        * Property that indicates whether the current open study is editable or not.
+        * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+        * It is necessary for correct building the title bar.
+        */
+       private String _editDisabledProperty = "false";
 
        /**
         * Save operation type enumeration pointing which section of properties has been edited.
@@ -119,7 +132,9 @@ public class StudyPropertiesAction extends DisplayStudyStepAction {
                validor = null;
                
                setMenuProperty("study");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("study");
+               setEditDisabledProperty("true");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
 
                if (mystudy.isOpenForWriting() && user.canEditProperties()) {                   
                        return "edit";
@@ -158,7 +173,9 @@ public class StudyPropertiesAction extends DisplayStudyStepAction {
 //             transax.commit();
                
                setMenuProperty("study");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("study");
+               setEditDisabledProperty("true");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
                
                return SUCCESS;
        }
@@ -199,7 +216,9 @@ public class StudyPropertiesAction extends DisplayStudyStepAction {
 //             transax.commit();
                
                setMenuProperty("study");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("study");
+               setEditDisabledProperty("true");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
                
                return SUCCESS;
        }
@@ -246,7 +265,9 @@ public class StudyPropertiesAction extends DisplayStudyStepAction {
 //             transax.commit();
                
                setMenuProperty("study");
-               initializationScreenContext(_menuProperty);
+               setTitleProperty("study");
+               setEditDisabledProperty("true");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
                
                return SUCCESS;
        }
@@ -326,6 +347,11 @@ public class StudyPropertiesAction extends DisplayStudyStepAction {
 
                doInitialize(); // Re-initialization following the above edition
                
+               setMenuProperty("study");
+               setTitleProperty("study");
+               setEditDisabledProperty("true");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
+               
                return SUCCESS;
        }
 
@@ -511,4 +537,38 @@ public class StudyPropertiesAction extends DisplayStudyStepAction {
        public void setMenuProperty(String menuProperty) {
                this._menuProperty = menuProperty;
        }
+       
+       /**
+        * Get the _titleProperty.
+        * @return the _titleProperty
+        */
+       public String getTitleProperty() {
+               return _titleProperty;
+       }
+
+       /**
+        * Set the _titleProperty.
+        * @param _titleProperty the titleProperty to set
+        */
+       public void setTitleProperty(String titleProperty) {
+               _titleProperty = titleProperty;
+       }
+
+       /**
+        * Get the editDisabledProperty.
+        * @return the editDisabledProperty
+        */
+       public final String getEditDisabledProperty() {
+               return _editDisabledProperty;
+       }
+
+       /**
+        * Set the editDisabledProperty.
+        * @param editDisabledProperty the editDisabledProperty to set
+        */
+       public final void setEditDisabledProperty(String editDisabledProperty) {
+               _editDisabledProperty = editDisabledProperty;
+       }
+
+       
 }
\ No newline at end of file
diff --git a/Workspace/Siman/src/org/splat/simer/TitleBarSettings.java b/Workspace/Siman/src/org/splat/simer/TitleBarSettings.java
new file mode 100644 (file)
index 0000000..a739b3e
--- /dev/null
@@ -0,0 +1,128 @@
+/*****************************************************************************
+ * Company         EURIWARE
+ * Application     SIMAN
+ * File            $Id$ 
+ * Creation date   25.10.2012
+ * @author         Author: Maria KRUCHININA
+ * @version        Revision: 
+ *****************************************************************************/
+
+package org.splat.simer; 
+
+/**
+ * Settings for title bar.
+ * @author Maria KRUCHININA
+ *
+ */
+public class TitleBarSettings {
+       
+       /**
+        * The progress state of the open study/knowledge.
+        */
+       private String progressState;
+       
+       /**
+        * The selection state of the open study/knowledge.
+        */
+       private String selectionState;
+       
+       /**
+        * The type of the open study/knowledge.
+        */
+       private String entryType;
+       
+       /**
+        * The title of the open study/knowledge.
+        */
+       private String entryTitle;
+       
+       /**
+        * Property that indicates whether the current open study is editable or not.
+        * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+        * It is necessary for correct building the title bar.
+        */
+       private String editDisabledProperty;
+
+       /**
+        * Get the progressState.
+        * @return the progressState
+        */
+       public String getProgressState() {
+               return progressState;
+       }
+
+       /**
+        * Set the progressState.
+        * @param progressState the progressState to set
+        */
+       public void setProgressState(final String progressState) {
+               this.progressState = progressState;
+       }
+       
+       /**
+        * Get the selectionState.
+        * @return the selectionState
+        */
+       public String getSelectionState() {
+               return selectionState;
+       }
+
+       /**
+        * Set the selectionState.
+        * @param selectionState the selectionState to set
+        */
+       public void setSelectionState(final String selectionState) {
+               this.selectionState = selectionState;
+       }
+       
+       /**
+        * Get the entryType.
+        * @return the entryType
+        */
+       public String getEntryType() {
+               return entryType;
+       }
+
+       /**
+        * Set the entryType.
+        * @param entryType the entryType to set
+        */
+       public void setEntryType(final String entryType) {
+               this.entryType = entryType;
+       }
+
+
+       /**
+        * Get the entryTitle.
+        * @return the entryTitle
+        */
+       public String getEntryTitle() {
+               return entryTitle;
+       }
+
+
+       /**
+        * Set the entryTitle.
+        * @param entryTitle the entryTitle to set
+        */
+       public void setEntryTitle(final String entryTitle) {
+               this.entryTitle = entryTitle;
+       }
+
+       /**
+        * Get the editDisabledProperty.
+        * @return the editDisabledProperty
+        */
+       public String getEditDisabledProperty() {
+               return editDisabledProperty;
+       }
+
+       /**
+        * Set the editDisabledProperty.
+        * @param editDisabledProperty the editDisabledProperty to set
+        */
+       public void setEditDisabledProperty(String editDisabledProperty) {
+               this.editDisabledProperty = editDisabledProperty;
+       }
+       
+}
index 4505ed2c653aab9bae282b19d27727b2ac22ef9a..0eb6ebbd18f01902d102ba3d055c7e58bcf2d17f 100644 (file)
@@ -26,6 +26,19 @@ public class UploadAction extends Action {
         * It can be: none, create, open, study, knowledge, sysadmin, help.
         */
        private String _menuProperty;
+       
+       /**
+        * Value of the title bar property. 
+        * It can be: study, knowledge.
+        */
+       private String _titleProperty;
+       
+       /**
+        * Property that indicates whether the current open study is editable or not.
+        * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+        * It is necessary for correct building the title bar.
+        */
+       private String _editDisabledProperty = "false";
 
        private static final long serialVersionUID = 6003880772275115923L;
 
@@ -46,7 +59,9 @@ public class UploadAction extends Action {
     public String doUpload () {
 //  -------------------------
       setMenuProperty("study");
-      initializationScreenContext(_menuProperty);
+      setTitleProperty("study");
+      setEditDisabledProperty("true");
+      initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
       
       if (action == ToDo.cancel) return "cancel";
       try {
@@ -68,7 +83,9 @@ public class UploadAction extends Action {
       catch (OutOfMemoryError error) {
          
        setMenuProperty("none");
-               initializationScreenContext(_menuProperty);
+       setTitleProperty("study");
+       setEditDisabledProperty("true");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
                
        return "outofmemory";
       }
@@ -154,4 +171,38 @@ public class UploadAction extends Action {
        public void setMenuProperty(String menuProperty) {
                this._menuProperty = menuProperty;
        }
+       
+       /**
+        * Get the _titleProperty.
+        * @return the _titleProperty
+        */
+       public String getTitleProperty() {
+               return _titleProperty;
+       }
+
+       /**
+        * Set the _titleProperty.
+        * @param _titleProperty the titleProperty to set
+        */
+       public void setTitleProperty(String titleProperty) {
+               _titleProperty = titleProperty;
+       }
+
+       /**
+        * Get the _editDisabledProperty.
+        * @return the _editDisabledProperty
+        */
+       public String getEditDisabledProperty() {
+               return _editDisabledProperty;
+       }
+
+       /**
+        * Set the _editDisabledProperty.
+        * @param _editDisabledProperty the _editDisabledProperty to set
+        */
+       public void setEditDisabledProperty(String _editDisabledProperty) {
+               this._editDisabledProperty = _editDisabledProperty;
+       }
+
+       
 }
\ No newline at end of file
index cd89a60733035822806e61d1a215001600ec8fd4..529d48aa84a351f007dd0819f2bff18ac769d3ff 100644 (file)
@@ -51,6 +51,19 @@ public class VersionDocumentAction extends UploadBaseNextAction {
         * It can be: none, create, open, study, knowledge, sysadmin, help.
         */
        private String _menuProperty;
+       
+       /**
+        * Value of the title bar property. 
+        * It can be: study, knowledge.
+        */
+       private String _titleProperty;
+       
+       /**
+        * Property that indicates whether the current open study is editable or not.
+        * On the screen it looks like pen on the status icon, pop-up menu also can be called.
+        * It is necessary for correct building the title bar.
+        */
+       private String _editDisabledProperty = "false";
 
        /**
         * Serial version ID.
@@ -65,7 +78,9 @@ public class VersionDocumentAction extends UploadBaseNextAction {
                // -----------------------------
                
                setMenuProperty("study");
-           initializationScreenContext(_menuProperty);
+               setTitleProperty("study");
+               setEditDisabledProperty("true");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
            
                Session connex = Database.getCurSession();
                Transaction transax = connex.beginTransaction();
@@ -144,7 +159,9 @@ public class VersionDocumentAction extends UploadBaseNextAction {
        public String doVersion() {
                // -------------------------
                setMenuProperty("study");
-           initializationScreenContext(_menuProperty);
+               setTitleProperty("study");
+               setEditDisabledProperty("true");
+        initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
            
                if (action == ToDo.cancel)
                        return "cancel";
@@ -398,4 +415,36 @@ public class VersionDocumentAction extends UploadBaseNextAction {
        public void setMenuProperty(String menuProperty) {
                this._menuProperty = menuProperty;
        }
+       
+       /**
+        * Get the _titleProperty.
+        * @return the _titleProperty
+        */
+       public String getTitleProperty() {
+               return _titleProperty;
+       }
+
+       /**
+        * Set the _titleProperty.
+        * @param _titleProperty the titleProperty to set
+        */
+       public void setTitleProperty(String titleProperty) {
+               _titleProperty = titleProperty;
+       }
+
+       /**
+        * Get the _editDisabledProperty.
+        * @return the _editDisabledProperty
+        */
+       public String getEditDisabledProperty() {
+               return _editDisabledProperty;
+       }
+
+       /**
+        * Set the _editDisabledProperty.
+        * @param _editDisabledProperty the _editDisabledProperty to set
+        */
+       public void setEditDisabledProperty(String _editDisabledProperty) {
+               this._editDisabledProperty = _editDisabledProperty;
+       }
 }
\ No newline at end of file
index 41894a0a159402873724c3342501e7e031b9db5b..c8092e2267548f38c2a16619a4e6fa8a247fde5a 100644 (file)
@@ -42,6 +42,10 @@ http://www.springframework.org/schema/context/spring-context-3.0.xsd">
        <bean id="menuBarSettings"
                class="org.splat.simer.MenuBarSettings" scope="session">
        </bean>
+       
+       <bean id="titleBarSettings"
+               class="org.splat.simer.TitleBarSettings" scope="session">
+       </bean>
 
        <bean id="slidMenu" scope="session" abstract="true">
                <property name="projectElementService"
@@ -86,6 +90,7 @@ http://www.springframework.org/schema/context/spring-context-3.0.xsd">
                <property name="openStudy" ref="openStudy" />
                <property name="openKnowledge" ref="openKnowledge" />
                <property name="menuBarSettings" ref="menuBarSettings" />
+               <property name="titleBarSettings" ref="titleBarSettings" />
        </bean>
 
        <!--========= Inherited from baseAction ========= -->