issue 9495: Add combo reloads to menu Java action buttons
authorAsier Lostalé <asier.lostale@openbravo.com>
Thu, 18 Jun 2009 13:02:11 +0200
changeset 4041 d2d17cf554e9
parent 4040 959292373f4f
child 4042 5c2e482c554e
issue 9495: Add combo reloads to menu Java action buttons
src-wad/src/org/openbravo/wad/ActionButtonJava_Responser.javaxml
--- a/src-wad/src/org/openbravo/wad/ActionButtonJava_Responser.javaxml	Thu Jun 18 12:33:53 2009 +0200
+++ b/src-wad/src/org/openbravo/wad/ActionButtonJava_Responser.javaxml	Thu Jun 18 13:02:11 2009 +0200
@@ -55,7 +55,10 @@
       strProcessId = vars.getRequiredStringParameter("inpadProcessId");
     else if (command.startsWith("BUTTON"))
       strProcessId = command.substring("BUTTON".length());
-    else if (command.startsWith("SAVE_BUTTONActionButton"))
+    else if (command.startsWith("FRAMES")) {
+      strProcessId = command.substring("FRAMES".length());
+      printPageFrames(response, vars, strProcessId);
+    } else if (command.startsWith("SAVE_BUTTONActionButton"))
       strProcessId = command.substring("SAVE_BUTTONActionButton".length());
    
     if (!vars.commandIn("DEFAULT") &amp;&amp; !hasGeneralAccess(vars, "P", strProcessId)) {
@@ -92,6 +95,19 @@
 </FIELDS_TMP>
     } else pageErrorPopUp(response);
   }
+  
+  void printPageFrames(HttpServletResponse response, VariablesSecureApp vars, String strProcessId) throws IOException, ServletException {
+    log4j.debug("Output: Default");
+    response.setContentType("text/html; charset=UTF-8");
+    PrintWriter out = response.getWriter();
+    XmlDocument xmlDocument = xmlEngine.readXmlTemplate("org/openbravo/erpCommon/ad_actionButton/ActionButtonDefaultFrames").createXmlDocument();
+    xmlDocument.setParameter("processId", strProcessId);
+    xmlDocument.setParameter("trlFormType", "PROCESS");
+    xmlDocument.setParameter("type", "ActionButtonJava_Responser.html");
+    xmlDocument.setParameter("language", "defaultLang = \"" + vars.getLanguage() + "\";\n");
+    out.println(xmlDocument.print());
+    out.close();
+  }
 
   void printPageDefault(HttpServletResponse response, VariablesSecureApp vars, String strProcessId) throws IOException, ServletException {
     log4j.debug("Output: Default");