%@ page import="org.opencms.workplace.explorer.*" %><% // initialize the workplace class CmsNewCsvFile wp = new CmsNewCsvFile(pageContext, request, response); //////////////////// start of switch statement switch (wp.getAction()) { case CmsNewResourceUpload.ACTION_CANCEL: //////////////////// ACTION: cancel button pressed wp.actionCloseDialog(); break; case CmsNewResourceUpload.ACTION_OK: //////////////////// ACTION: ok button pressed wp.actionSelect(); break; case CmsNewResourceUpload.ACTION_SUBMITFORM2: //////////////////// ACTION: upload name specified and form submitted wp.actionUpdateFile(); wp.actionEditProperties(); // redirects only if the edit properties option was checked break; case CmsNewResourceUpload.ACTION_SUBMITFORM: //////////////////// ACTION: upload name specified and form submitted wp.actionUpload(); if (wp.getAction() == CmsNewResourceUpload.ACTION_SHOWERROR) { // in case of an upload error, interrupt here break; } case CmsNewResourceUpload.ACTION_NEWFORM2: //////////////////// ACTION: show the form to specify the resource name and the edit properties checkbox wp.setParamAction(wp.DIALOG_SUBMITFORM2); %><%= wp.htmlStart() %> <%= wp.bodyStart("dialog","onload=\"checkValue();\"") %> <%= wp.dialogStart() %> <%= wp.dialogContentStart(wp.getParamTitle()) %>
<%= wp.dialogEnd() %> <%= wp.bodyEnd() %> <%= wp.htmlEnd() %> <% break; case CmsNewResourceUpload.ACTION_APPLET: case CmsNewResourceUpload.ACTION_NEWFORM: case CmsNewResourceUpload.ACTION_DEFAULT: default: //////////////////// ACTION: show the form to specify the upload file and the unzip option wp.setParamAction(wp.DIALOG_SUBMITFORM); wp.setParamTitle(wp.key(Messages.GUI_NEWRESOURCE_TABLE_0)); %><%= wp.htmlStart() %> <%= wp.bodyStart("dialog") %> <%= wp.dialogStart() %> <%= wp.dialogEnd() %> <%= wp.bodyEnd() %> <%= wp.htmlEnd() %> <% } //////////////////// end of switch statement %>