%@ page import=" org.opencms.editors.editarea.*, org.opencms.workplace.*, org.opencms.workplace.editors.*, org.opencms.workplace.help.*, org.opencms.jsp.*" %><% CmsJspActionElement cms = new CmsJspActionElement(pageContext, request, response); CmsEditArea wp = new CmsEditArea(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 occured during save break; } case CmsDialog.ACTION_DEFAULT: default: //////////////////// ACTION: show editor frame (default) %>