pageError(response);
}
private void printPage(HttpServletResponse response, VariablesSecureApp vars,
String strOrganization) throws IOException, ServletException {
ModuleReferenceDataOrgTree tree = new ModuleReferenceDataOrgTree(this, vars.getClient(),
strOrganization, true);
XmlDocument xmlDocument = null;
String[] discard = { "selEliminar" };
if (tree.getData() == null || tree.getData().length == 0)
xmlDocument = xmlEngine.readXmlTemplate(
"org/openbravo/erpCommon/ad_forms/UpdateReferenceData").createXmlDocument();
else
xmlDocument = xmlEngine.readXmlTemplate(
"org/openbravo/erpCommon/ad_forms/UpdateReferenceData", discard).createXmlDocument();
xmlDocument.setParameter("directory", "var baseDirectory = \"" + strReplaceWith + "/\";\n");
xmlDocument.setParameter("language", "defaultLang=\"" + vars.getLanguage() + "\";");
ToolBar toolbar = new ToolBar(this, vars.getLanguage(), "UpdateReferenceData", 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.UpdateReferenceData");
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(), "UpdateReferenceData.html",
classInfo.id, classInfo.type, strReplaceWith, tabs.breadcrumb());
xmlDocument.setParameter("navigationBar", nav.toString());
LeftTabsBar lBar = new LeftTabsBar(this, vars.getLanguage(), "UpdateReferenceData.html",
strReplaceWith);
xmlDocument.setParameter("leftTabs", lBar.manualTemplate());
} catch (Exception ex) {
throw new ServletException(ex);
}
{
vars.removeMessage("UpdateReferenceData");
OBError myMessage = vars.getMessage("UpdateReferenceData");
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.setParameter("organization", strOrganization);
xmlDocument.setData("reportAD_Org_ID", "liststructure", UpdateReferenceDataData
.selectOrganization(this, vars.getRole(), vars.getUserOrg()));
response.setContentType("text/html; charset=UTF-8");
PrintWriter out = response.getWriter();