@Component @Named(value="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
.
ACTION_PROGRESS, componentDescriptor, container, execution, handleRedirectObject, observation, waitForXWikiInitialization
Constructor and Description |
---|
PreviewAction()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
action(XWikiContext context) |
String |
render(XWikiContext context) |
getFormClass, prepareEditedDocument
answerJSON, cleanupComponents, csrfTokenCheck, csrfTokenCheck, execute, execute, getContextualAuthorizationManager, getCurrentMixedDocumentReferenceResolver, getCurrentScriptContext, getEntityNameValidationConfiguration, getEntityNameValidationManager, getLocalization, getLocalSerializer, getName, getProgress, getRealPath, getTranslatedDocument, handleRedirectObject, handleRevision, initializeContainerComponent, initializeXWikiContext, initializeXWikiContext, isEntityReferenceNameValid, localizePlainOrKey, readFromTemplate, resolveTemplate, sendGlobalRedirect, sendRedirect, setContentLength, writeAjaxErrorResponse
public boolean action(XWikiContext context) throws XWikiException
action
in class XWikiAction
XWikiException
public String render(XWikiContext context) throws XWikiException
render
in class EditAction
XWikiException
Copyright © 2004–2021 XWiki. All rights reserved.