com.xpn.xwiki.web
Class PreviewAction
java.lang.Object
Action
com.xpn.xwiki.web.XWikiAction
com.xpn.xwiki.web.PreviewAction
- Direct Known Subclasses:
- SaveAction
public class PreviewAction
- extends XWikiAction
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
.
Methods inherited from class com.xpn.xwiki.web.XWikiAction |
cleanupComponents, csrfTokenCheck, execute, execute, getRealPath, getTranslatedDocument, handleRevision, initializeContainerComponent, initializeXWikiContext, sendGlobalRedirect, sendRedirect |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PreviewAction
public PreviewAction()
action
public boolean action(XWikiContext context)
throws XWikiException
- Overrides:
action
in class XWikiAction
- Throws:
XWikiException
render
public String render(XWikiContext context)
throws XWikiException
- Overrides:
render
in class XWikiAction
- Throws:
XWikiException