|
||||||||||
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 String |
COMMAND_SAVE
|
protected static String |
COMMAND_SELECT_PARAGRAPH
|
protected static String |
COMMAND_SHOW_DIALOG
|
protected MultipartForm |
form
The posted multipart form. |
protected HierarchyManager |
hm
|
protected String |
locale
|
protected Messages |
msgs
|
protected String |
nodeName
the node containing the date for this dialog |
protected RequestFormUtil |
params
|
protected String |
path
Path to the node containing the data |
protected String |
repository
|
protected String |
richE
|
protected String |
richEPaste
|
protected Content |
storageNode
|
protected String |
treeBasePath
|
protected static String |
VIEW_CLOSE_WINDOW
|
protected static 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(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. |
String |
getCommand()
Returns the name of the command we want to execute. |
Content |
getConfigNode()
Returns the node with the dialog definition. |
Dialog |
getDialog()
|
String |
getItemType()
|
String |
getJsExecutedAfterSaving()
|
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 String |
onSaveFailed()
Called if the save failed. |
void |
removeSessionAttributes()
|
void |
renderHtml(String view)
Render the tree depending on the view name. |
String |
save()
Uses the SaveControl. |
void |
setDialog(Dialog dialog)
|
void |
setItemType(String itemType)
|
void |
setJsExecutedAfterSaving(String jsExecutedAfterSaving)
|
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 String COMMAND_SAVE
protected static final String COMMAND_SELECT_PARAGRAPH
protected static final String COMMAND_SHOW_DIALOG
protected static final String VIEW_CLOSE_WINDOW
protected static final String VIEW_SHOW_DIALOG
protected MultipartForm form
protected String path
protected String nodeName
protected String richE
protected String richEPaste
protected String repository
protected String locale
protected HierarchyManager hm
protected Messages msgs
protected RequestFormUtil params
protected Content storageNode
protected String treeBasePath
Constructor Detail |
---|
public DialogMVCHandler(String name, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
request
- response
- Method Detail |
---|
public String getCommand()
MVCServletHandler
getCommand
in interface MVCServletHandler
getCommand
in class MVCServletHandlerImpl
public String showDialog()
protected void configureDialog(Dialog dialog)
protected Dialog createDialog(Content configNode, Content storageNode) throws javax.jcr.RepositoryException
configNode
- storageNode
-
javax.jcr.RepositoryException
public String save()
protected boolean validate()
protected 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(String view) throws IOException
MVCServletHandler
IOException
MVCServletHandler.renderHtml(java.lang.String)
public String getRepository()
public void removeSessionAttributes()
public void setDialog(Dialog dialog)
dialog
- The dialog to set.public Dialog getDialog()
public String getJsExecutedAfterSaving()
public void setJsExecutedAfterSaving(String jsExecutedAfterSaving)
public String getItemType()
public void setItemType(String itemType)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |