|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.servlets.MVCServletHandlerImpl info.magnolia.module.admininterface.DialogMVCHandler
public class DialogMVCHandler
This is the MVCHandler for dialogs. You can make a subclass to take influence on creation or saving.
Field Summary | |
---|---|
protected static java.lang.String |
COMMAND_SAVE
|
protected static java.lang.String |
COMMAND_SELECT_PARAGRAPH
|
protected static java.lang.String |
COMMAND_SHOW_DIALOG
|
protected MultipartForm |
form
The posted multipart form. |
protected HierarchyManager |
hm
|
protected java.lang.String |
locale
|
protected Messages |
msgs
|
protected java.lang.String |
nodeName
the node containing the date for this dialog |
protected RequestFormUtil |
params
|
protected java.lang.String |
path
Path to the node containing the data |
protected java.lang.String |
repository
|
protected java.lang.String |
richE
|
protected java.lang.String |
richEPaste
|
protected Content |
storageNode
|
protected static java.lang.String |
VIEW_CLOSE_WINDOW
|
protected static java.lang.String |
VIEW_SHOW_DIALOG
|
Fields inherited from class info.magnolia.cms.servlets.MVCServletHandlerImpl |
---|
exception, request, response, VIEW_ERROR, VIEW_SUCCESS |
Fields inherited from interface info.magnolia.cms.servlets.MVCServletHandler |
---|
VIEW_NOTHING |
Constructor Summary | |
---|---|
DialogMVCHandler(java.lang.String name,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Initialize the used parameters: path, nodeCollectionName, nodeName, .. |
Method Summary | |
---|---|
protected void |
configureDialog(Dialog dialog)
|
protected void |
configureSaveHandler(SaveHandler saveHandler)
Configure the save control |
protected Dialog |
createDialog(Content configNode,
Content storageNode)
Is called during showDialog(). |
protected void |
createSaveHandler()
If there is the property saveHandler defined in the config it instantiates the configured save handler. |
java.lang.String |
getCommand()
Returns the name of the command we want to execute. |
Content |
getConfigNode()
Returns the node with the dialog definition. |
Dialog |
getDialog()
|
java.lang.String |
getItemType()
|
java.lang.String |
getJsExecutedAfterSaving()
|
java.lang.String |
getRepository()
|
protected SaveHandler |
getSaveHandler()
Returns the save handler used by this dialog handler. |
Content |
getStorageNode()
Defines the node/page containing the data editing in this dialog. |
protected boolean |
onPostSave(SaveHandler control)
|
protected boolean |
onPreSave(SaveHandler control)
|
protected boolean |
onSave(SaveHandler control)
|
protected java.lang.String |
onSaveFailed()
Called if the save failed. |
void |
removeSessionAttributes()
|
void |
renderHtml(java.lang.String view)
Render the tree depending on the view name. |
java.lang.String |
save()
Uses the SaveControl. |
void |
setDialog(Dialog dialog)
|
void |
setItemType(java.lang.String itemType)
|
void |
setJsExecutedAfterSaving(java.lang.String jsExecutedAfterSaving)
|
java.lang.String |
showDialog()
Calls createDialog and sets the common parameters on the dialog |
protected boolean |
validate()
|
Methods inherited from class info.magnolia.cms.servlets.MVCServletHandlerImpl |
---|
execute, getException, getExceptionStackTrace, getName, getRequest, getResponse, init, populateFromRequest, setCommand, setRequest, setResponse |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String COMMAND_SAVE
protected static final java.lang.String COMMAND_SELECT_PARAGRAPH
protected static final java.lang.String COMMAND_SHOW_DIALOG
protected static final java.lang.String VIEW_CLOSE_WINDOW
protected static final java.lang.String VIEW_SHOW_DIALOG
protected MultipartForm form
protected java.lang.String path
protected java.lang.String nodeName
protected java.lang.String richE
protected java.lang.String richEPaste
protected java.lang.String repository
protected java.lang.String locale
protected HierarchyManager hm
protected Messages msgs
protected RequestFormUtil params
protected Content storageNode
Constructor Detail |
---|
public DialogMVCHandler(java.lang.String name, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
request
- response
- Method Detail |
---|
public java.lang.String getCommand()
MVCServletHandler
getCommand
in interface MVCServletHandler
getCommand
in class MVCServletHandlerImpl
public java.lang.String showDialog()
protected void configureDialog(Dialog dialog)
protected Dialog createDialog(Content configNode, Content storageNode) throws javax.jcr.RepositoryException
configNode
- storageNode
-
javax.jcr.RepositoryException
public java.lang.String save()
protected boolean validate()
protected java.lang.String onSaveFailed()
protected SaveHandler getSaveHandler()
protected void createSaveHandler()
protected void configureSaveHandler(SaveHandler saveHandler)
protected boolean onPreSave(SaveHandler control)
protected boolean onSave(SaveHandler control)
protected boolean onPostSave(SaveHandler control)
public Content getStorageNode()
public Content getConfigNode()
public void renderHtml(java.lang.String view) throws java.io.IOException
MVCServletHandler
java.io.IOException
MVCServletHandler.renderHtml(java.lang.String)
public java.lang.String getRepository()
public void removeSessionAttributes()
public void setDialog(Dialog dialog)
dialog
- The dialog to set.public Dialog getDialog()
public java.lang.String getJsExecutedAfterSaving()
public void setJsExecutedAfterSaving(java.lang.String jsExecutedAfterSaving)
public java.lang.String getItemType()
public void setItemType(java.lang.String itemType)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |