<%@ page import=" org.opencms.workplace.*, org.opencms.workplace.editors.*, org.opencms.workplace.help.*, org.opencms.jsp.*" %><% CmsJspActionElement cms = new CmsJspActionElement(pageContext, request, response); CmsSimpleEditor wp = new CmsSimpleEditor(cms); int buttonStyle = wp.getSettings().getUserSettings().getEditorButtonStyle(); //////////////////// start of switch statement switch (wp.getAction()) { case CmsEditor.ACTION_SHOW_ERRORMESSAGE: //////////////////// ACTION: display the common error dialog // do nothing here, only prevent editor content from being displayed! break; case CmsEditor.ACTION_EXIT: //////////////////// ACTION: exit the editor without saving wp.actionExit(); break; case CmsEditor.ACTION_SAVEEXIT: //////////////////// ACTION: save the modified content and exit the editor wp.actionSave(); wp.actionExit(); break; case CmsEditor.ACTION_SAVE: //////////////////// ACTION: save the modified content and show the editor again wp.actionSave(); if (wp.getAction() == CmsDialog.ACTION_CANCEL) { // an error occurred during save break; } case CmsDialog.ACTION_DEFAULT: default: //////////////////// ACTION: show editor frame (default) %> (<%= wp.getSettings().getUser().getName() %>) - <%= wp.getParamResource() %> "> <%= wp.button("javascript:confirmExit();", null, "exit", org.opencms.workplace.editors.Messages.GUI_BUTTON_CLOSE_0, buttonStyle) %> <%= wp.buttonBarSpacer(5) %> <%= wp.buttonBar(CmsWorkplace.HTML_END) %>
<%= wp.buttonBar(CmsWorkplace.HTML_START) %> <%= wp.buttonBarStartTab(0, 5) %> <%= wp.button("javascript:buttonAction(2);", null, "save_exit", org.opencms.workplace.editors.Messages.GUI_BUTTON_SAVECLOSE_0, buttonStyle) %> <%= wp.button("javascript:buttonAction(3);", null, "save", org.opencms.workplace.editors.Messages.GUI_BUTTON_SAVE_0, buttonStyle) %> <% if (wp.isHelpEnabled()) {%> <%= wp.buttonBarSeparator(5, 5) %> <%= wp.button("javascript:openOnlineHelp('/editors/simple');", null, "help.png", org.opencms.workplace.editors.Messages.GUI_BUTTON_HELP_0, buttonStyle) %><% } %>  
<% } %>