%@ page import ="org.opencms.jsp.CmsJspActionElement, org.opencms.file.CmsObject, java.util.*, org.opencms.workplace.*, org.opencms.workplace.commons.*, org.opencms.workplace.editors.CmsDialogElements, org.opencms.workplace.tools.database.*, org.opencms.workplace.*, org.opencms.workplace.administration.*" %> <% // initialise Cms Action Element CmsJspActionElement cms = new CmsJspActionElement(pageContext, request, response); // Collect the objects required to access the OpenCms VFS from the request CmsObject cmsObject = cms.getCmsObject(); String uri = cmsObject.getRequestContext().getUri(); String errorMessage = ""; // initialize the workplace class CmsHtmlImportReport wp = new CmsHtmlImportReport(pageContext, request, response); // initialize the import class CmsHtmlImport imp = new CmsHtmlImport( cms, request); //////////////////// start of switch statement switch (wp.getAction()) { case CmsHtmlImportReport.ACTION_CANCEL: //////////////////// ACTION: cancel button pressed wp.actionCloseDialog(); break; case CmsDialog.ACTION_CONFIRMED: case CmsDialog.ACTION_REPORT_BEGIN: case CmsDialog.ACTION_REPORT_UPDATE: case CmsDialog.ACTION_REPORT_END: //////////////////// ACTION: clear history boolean isValid = true; if (wp.getAction() == CmsDialog.ACTION_CONFIRMED) { try { imp.checkParameters(); } catch (Exception e) { isValid = false; errorMessage = e.getMessage(); } } if (isValid) { wp.setHtmlImport(imp); wp.actionReport(); break; } //////////////////// ACTION: show start dialog case CmsDialog.ACTION_DEFAULT: default: wp.setParamAction(CmsDialog.DIALOG_CONFIRMED); %> <%= wp.htmlStart("administration/index.html") %> <%= wp.bodyStart("onunload='top.closeTreeWin();'") %> <%= wp.dialogStart() %> <%= wp.dialogContentStart(wp.getParamTitle()) %>
<%= wp.dialogEnd() %> <%= wp.bodyEnd() %> <%= wp.htmlEnd() %> <% } //////////////////// end of switch statement %>