pageError(response);
}
private void printPage(HttpServletResponse response, VariablesSecureApp vars) throws IOException,
ServletException {
ModuleReferenceDataClientTree tree = new ModuleReferenceDataClientTree(this, true);
XmlDocument xmlDocument = null;
String[] discard = { "selEliminar" };
if (tree.getData() == null || tree.getData().length == 0)
xmlDocument = xmlEngine
.readXmlTemplate("org/openbravo/erpCommon/ad_forms/InitialClientSetup")
.createXmlDocument();
else
xmlDocument = xmlEngine.readXmlTemplate(
"org/openbravo/erpCommon/ad_forms/InitialClientSetup", discard).createXmlDocument();
xmlDocument.setParameter("directory", "var baseDirectory = \"" + strReplaceWith + "/\";\n");
xmlDocument.setParameter("language", "defaultLang=\"" + vars.getLanguage() + "\";");
ToolBar toolbar = new ToolBar(this, vars.getLanguage(), "InitialClientSetup", false, "", "",
"", false, "ad_forms", strReplaceWith, false, true);
toolbar.prepareSimpleToolBarTemplate();
xmlDocument.setParameter("toolbar", toolbar.toString());
try {
WindowTabs tabs = new WindowTabs(this, vars,
"org.openbravo.erpCommon.ad_forms.InitialClientSetup");
xmlDocument.setParameter("parentTabContainer", tabs.parentTabs());
xmlDocument.setParameter("mainTabContainer", tabs.mainTabs());
xmlDocument.setParameter("childTabContainer", tabs.childTabs());
xmlDocument.setParameter("theme", vars.getTheme());
NavigationBar nav = new NavigationBar(this, vars.getLanguage(), "InitialClientSetup.html",
classInfo.id, classInfo.type, strReplaceWith, tabs.breadcrumb());
xmlDocument.setParameter("navigationBar", nav.toString());
LeftTabsBar lBar = new LeftTabsBar(this, vars.getLanguage(), "InitialClientSetup.html",
strReplaceWith);
xmlDocument.setParameter("leftTabs", lBar.manualTemplate());
} catch (Exception ex) {
throw new ServletException(ex);
}
{
vars.removeMessage("InitialClientSetup");
OBError myMessage = vars.getMessage("InitialClientSetup");
if (myMessage != null) {
xmlDocument.setParameter("messageType", myMessage.getType());
xmlDocument.setParameter("messageTitle", myMessage.getTitle());
xmlDocument.setParameter("messageMessage", myMessage.getMessage());
}
xmlDocument.setParameter("moduleTree", tree.toHtml());
xmlDocument.setParameter("moduleTreeDescription", tree.descriptionToHtml());
xmlDocument.setData("reportCurrency", "liststructure", MonedaComboData.select(this));
response.setContentType("text/html; charset=UTF-8");
PrintWriter out = response.getWriter();
out.println(xmlDocument.print());