Class PreviewAction
- java.lang.Object
-
- com.xpn.xwiki.web.XWikiAction
-
- com.xpn.xwiki.web.EditAction
-
- com.xpn.xwiki.web.PreviewAction
-
- All Implemented Interfaces:
com.xpn.xwiki.internal.web.LegacyAction
@Component @Named("preview") @Singleton public class PreviewAction extends EditAction
Action for previewing document changes. It prepares a temporarily changed document which is placed in the context, without actually saving anything. The response is normally rendered by the
preview.vm
template.This action also works like a request dispatcher, an early work-around for the fact that in HTML a form can only have one destination URL. Thus, the form had to be submitted to one action which would further dispatch the request to other actions, based on the clicked form button. Since preview is the safest method of the possible form actions, it was chosen as the dispatcher. Currently this functionality is deprecated and maintained only for backwards compatibility with older skins, since a cleaner dispatcher was implemented in
ActionFilter
.- Version:
- $Id: 5d9f9bc8fdbfda6845d5ba1031b6b05c368e259c $
-
-
Field Summary
-
Fields inherited from class com.xpn.xwiki.web.XWikiAction
ACTION_PROGRESS, componentDescriptor, container, execution, observation, waitForXWikiInitialization
-
-
Constructor Summary
Constructors Constructor Description PreviewAction()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
action(XWikiContext context)
String
render(XWikiContext context)
-
Methods inherited from class com.xpn.xwiki.web.EditAction
getFormClass, prepareEditedDocument
-
Methods inherited from class com.xpn.xwiki.web.XWikiAction
answerJSON, cleanupComponents, csrfTokenCheck, csrfTokenCheck, execute, execute, getContextualAuthorizationManager, getCurrentMixedDocumentReferenceResolver, getCurrentScriptContext, getEntityNameValidationConfiguration, getEntityNameValidationManager, getLocalization, getLocalSerializer, getName, getProgress, getRealPath, getTranslatedDocument, handleRevision, initializeContainerComponent, initializeXWikiContext, initializeXWikiContext, isEntityReferenceNameValid, localizePlainOrKey, readFromTemplate, resolveTemplate, sendGlobalRedirect, sendRedirect, setContentLength, supportRedirections, writeAjaxErrorResponse
-
-
-
-
Method Detail
-
action
public boolean action(XWikiContext context) throws XWikiException
- Overrides:
action
in classXWikiAction
- Throws:
XWikiException
-
render
public String render(XWikiContext context) throws XWikiException
- Overrides:
render
in classEditAction
- Throws:
XWikiException
-
-