]> SALOME platform Git repositories - tools/siman.git/commitdiff
Salome HOME
Fix for disabling "show study" menu item after logout. JSP code is improved for dispa...
authorrkv <rkv@opencascade.com>
Mon, 15 Apr 2013 12:50:57 +0000 (12:50 +0000)
committerrkv <rkv@opencascade.com>
Mon, 15 Apr 2013 12:50:57 +0000 (12:50 +0000)
Workspace/Siman/WebContent/study/displayStudyProperties.jsp
Workspace/Siman/WebContent/study/editStudyProperties.jsp
Workspace/Siman/src/org/splat/simer/ConnectionAction.java

index ee2188ca00483e7ec86453c2262c974f87e7b97a..8607319c40fd4f2de3dd7b047d2dcbdeabac448d 100644 (file)
@@ -1,12 +1,5 @@
 <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
 <%@ taglib prefix="s" uri="/struts-tags"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-
-  <link href=<s:url value="/skin/default.css"/> rel="stylesheet" type="text/css">
-
-  <body>
-
 <!-- Properties form
      =============================================================================================================================
   -->
           </table>
         </div>
       </div>
-
-  </body>
-</html>
\ No newline at end of file
index b51afebae8e3e8ba6cb48b6999da07b38eb63eef..47d8917b644a5636b48298a4fcfd5349442a693e 100644 (file)
@@ -7,8 +7,6 @@
 <%@ page import="org.splat.simer.StudyPropertiesAction"%>
 <%@ page import="org.splat.dal.bo.kernel.User"%>
 <%@ taglib prefix="s" uri="/struts-tags"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-
 
 <s:if test="actionType == null">
        <s:set var="todo">display</s:set>
   <s:param name="cycle" value="%{'default'}"/>
 </s:url>
 <s:url id="undo"     namespace="/study" action="prop-study" />
-<html>
-
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-    <link href=<s:url value="/skin/default.css"/> rel="stylesheet" type="text/css">
-    <script language="JavaScript">
-
+<script language="JavaScript">
     function setType () {
-//  -------------------
       var type   = edit.documentType.value;
-//    if (type == "0") edit.saveCycle.disabled = true;
-//    else             edit.saveCycle.disabled = false;
     }
-    </script>
-  </head>
-
-  <body>
+</script>
 
 <!-- Properties form
      =============================================================================================================================
       StudyPropertiesAction  controler = (StudyPropertiesAction)stacktop;
 
       Iterator<User>         members   = controler.getContributors().iterator();
-      for (Iterator<User>    staff     = controler.getCandidates().iterator(); staff.hasNext(); ) {
-        out.print("<tr>");
-         if (members.hasNext()) {
-            User  user = members.next();
-            out.print("<td><input type=checkbox name=\"members\" value=\"" + String.valueOf(String.valueOf(user.getIndex())) + "\" checked/></td>");
-            out.print("<td>");
-              out.print(controler.getText(user.getDisplayName()));
-            out.print("</td>");
-         } else {
-            out.print("<td></td><td></td>");
-         }
+      for (Iterator<User>    staff     = controler.getCandidates().iterator(); staff.hasNext(); ) {%>
+        <tr>
+        <%if (members.hasNext()) {
+            User  user = members.next();%>
+            <td><input type="checkbox" name="members" value="<%=String.valueOf(user.getIndex())%>" checked/></td>
+            <td>
+            <%=controler.getText(user.getDisplayName())%>
+            </td>
+         <%} else {%>
+            <td></td><td></td>
+         <%}
          for (int j=0; j<3; j++) {
           if (staff.hasNext()) {
-                 User user = staff.next();
-            out.print("<td><input type=checkbox name=\"candidates\" value=\"" + String.valueOf(user.getIndex()) + "\" />&nbsp;");
-              out.print(controler.getText(user.getDisplayName()));
-            out.print("</td>");
-          } else {
-            out.print("<td></td>");
-          }
-         }
-        out.print("</tr>");
-      }
+                 User user = staff.next();%>
+            <td><input type="checkbox" name="candidates" value="<%=String.valueOf(user.getIndex())%>" />&nbsp;
+           <%=controler.getText(user.getDisplayName())%>
+            </td>
+          <%} else {%>
+            <td></td>
+          <%}
+         }%>
+        </tr>
+      <%}
       while (members.hasNext()) {
-        User  user = members.next();
-        out.print("<tr>");
-          out.print("<td><input type=checkbox name=\"members\" value=\"" + String.valueOf(user.getIndex()) + "\" checked/></td>");
-          out.print("<td>");
-            out.print(controler.getText(user.getDisplayName()));
-          out.print("</td>");
-        out.print("</tr>");
-      }%>
+        User  user = members.next();%>
+        <tr>
+          <td><input type="checkbox" name="members" value="<%=String.valueOf(user.getIndex())%>" checked/></td>
+          <td>
+           <%=controler.getText(user.getDisplayName())%>
+          </td>
+        </tr>
+      <%}%>
       </s:if>
          <s:else>
           <tr>
                   <s:iterator value="readers">
                     <tr>
                       <td>
-                        <s:checkbox name="readerIds" fieldValue="%{index}" theme="simple" checked="checked" /> &nbsp;
-                        <s:property value="%{getText(displayName)}"/>
+                        <s:checkbox name="readerIds" fieldValue="%{index}" theme="simple"  value="true" /> &nbsp;
+                          <s:property value="%{getText(displayName)}"/>
                       </td>
                     </tr>
                   </s:iterator>
           </s:form>
         </div>
       </div>
-
-  </body>
-</html>
\ No newline at end of file
index 2b4f6d3fe15dba1500197d58daa1cc21a941c44e..f2706f45bc70916522dfae72e49264dc24201378 100644 (file)
@@ -174,6 +174,7 @@ public class ConnectionAction extends Action {
 
                        this.disconnect(); // Updates the session context
 
+                       closeStudy();
                        initializationScreenContext(Constants.NONE);
 
                        res = _backmenu;
@@ -184,7 +185,6 @@ public class ConnectionAction extends Action {
                        LOG.error("Reason:", error);
                        res = ERROR;
                }
-               closeStudy();
                return res;
        }