<%@ page import="org.opencms.workplace.explorer.*" %><% // initialize the workplace class CmsNewResourceXmlPage wp = (CmsNewResourceXmlPage)CmsNewResource.getNewResourceHandler(org.opencms.file.types.CmsResourceTypeXmlPage.getStaticTypeName(), "org.opencms.workplace.explorer.CmsNewResourceXmlPage", pageContext, request, response); //////////////////// start of switch statement switch (wp.getAction()) { case CmsNewResourceXmlPage.ACTION_CANCEL: //////////////////// ACTION: cancel button pressed wp.actionCloseDialog(); break; case CmsNewResourceXmlPage.ACTION_OK: //////////////////// ACTION: resource name specified and form submitted wp.actionCreateResource(); if (wp.isResourceCreated()) { wp.actionEditProperties(); // redirects only if the edit properties option was checked } break; case CmsNewResourceXmlPage.ACTION_NEWFORM: case CmsNewResourceXmlPage.ACTION_DEFAULT: default: //////////////////// ACTION: show the form to specify the page name, edit properties option and template and body selection wp.setParamAction(wp.DIALOG_OK); %><%= wp.htmlStart("help.explorer.new.file") %> <%= wp.bodyStart("dialog") %> <%= wp.dialogStart() %> <%= wp.dialogContentStart(wp.getParamTitle()) %>
<%= wp.paramsAsHidden() %>
<%= wp.key(Messages.GUI_RESOURCE_NAME_0) %>
<%= wp.key(Messages.GUI_SELECT_TEMPLATE_0) %> <%= wp.buildSelectTemplates("name=\"" + wp.PARAM_TEMPLATE + "\" class=\"maxwidth noborder\"") %>
<%= wp.key(Messages.GUI_SELECT_DEFAULTBODY_0) %> <%= wp.buildSelectBodyFile("name=\"" + wp.PARAM_BODYFILE + "\" class=\"maxwidth noborder\"") %>
   <%= wp.key(Messages.GUI_NEWFILE_EDITPROPERTIES_0) %>
   <%= wp.key(Messages.GUI_NEWRESOURCE_APPENDSUFFIX_HTML_1, new String[] {wp.getSuffixHtml()}) %>
<%= wp.dialogContentEnd() %> <%= wp.dialogButtonsNextCancel("id=\"nextButton\" disabled=\"disabled\"", null) %>
<%= wp.dialogEnd() %> <%= wp.bodyEnd() %> <%= wp.htmlEnd() %> <% } //////////////////// end of switch statement %>