|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.magnolia.cms.gui.dialog.DialogControlImpl
info.magnolia.cms.gui.dialog.DialogBox
net.sourceforge.openutils.mgnlcontrols.dialog.ConfigurableFreemarkerDialog
public abstract class ConfigurableFreemarkerDialog
* A Magnolia dialog that renders by a freemarker template. There are two main properties for the dialog:
| path (required) | Path to freemarker template: will be loaded from classpath or from filesystem |
| multiple | true / false. This property gives support to multiple field values storage. |
| name | Dialog / field name |
| value | Field value (multiple = false) |
| values | field values (multiple = true) |
| request | current HttpServletRequest |
| configuration | Map of dialog configuration. This allows to pass to template complex dialog configuration. Eg.
-+ Dialog node
|-- property 1 = value 1
|-+ subnode1
| |-- property 11 = value 11
| |-- property 12 = value 12
| |-+ subnode 11
| |-- property 111 = value 111
|
|-- property 2 = value 2
The map will contain:
configuration = Map {
"property1" = "value1",
"subnode1" = Map {
"property11" = "value11",
"property12" = "value12",
"subnode11" = Map {
"property111" = "value111"
}
},
"property2" = "value2"
}
|
Similar to DialogFreemarker but with a fixed template, needed till MAGNOLIA-2175 is done
| Field Summary | |
|---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
configuration
Map of dialog configuration. |
protected org.slf4j.Logger |
log
Logger. |
protected java.lang.String |
uuid
Configuration node UUID. |
| Fields inherited from class info.magnolia.cms.gui.dialog.DialogBox |
|---|
BOXTYPE_1COL, BOXTYPE_2COLS |
| Fields inherited from class info.magnolia.cms.gui.dialog.DialogControlImpl |
|---|
DEFAULT_VALUE_PROPERTY, SESSION_ATTRIBUTENAME_DIALOGOBJECT, SESSION_ATTRIBUTENAME_DIALOGOBJECT_REMOVE, VALIDATION_PATTERN_PROPERTY, value |
| Constructor Summary | |
|---|---|
ConfigurableFreemarkerDialog()
|
|
| Method Summary | |
|---|---|
protected void |
addToParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
Can be implemented by subclasses in order to add parameters to the Map passed to freemarker. |
void |
drawHtml(java.io.Writer out)
|
protected abstract java.lang.String |
getPath()
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getSubNodes(info.magnolia.cms.core.Content node)
Get a recursive map view of a content node |
void |
init(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
info.magnolia.cms.core.Content websiteNode,
info.magnolia.cms.core.Content configNode)
|
| Methods inherited from class info.magnolia.cms.gui.dialog.DialogBox |
|---|
drawHtmlPost, drawHtmlPre, getBoxType, getHtmlDescription, setBoxType |
| Methods inherited from class info.magnolia.cms.gui.dialog.DialogControlImpl |
|---|
addOption, addSub, clearWebsiteNode, drawHtmlPostSubs, drawHtmlPreSubs, drawSubs, getConfigValue, getConfigValue, getDescription, getId, getLabel, getMessage, getMessage, getMessages, getName, getOptions, getParent, getRequest, getResponse, getStorageNode, getSub, getSubs, getTopParent, getValidationPattern, getValue, getValues, getWebsiteNode, isRequired, readValue, readValues, removeSessionAttribute, setConfig, setConfig, setConfig, setDescription, setLabel, setName, setOptions, setRequired, setSaveInfo, setSessionAttribute, setTopParent, setValidationMessage, setValue, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.slf4j.Logger log
protected java.util.Map<java.lang.String,java.lang.Object> configuration
protected java.lang.String uuid
| Constructor Detail |
|---|
public ConfigurableFreemarkerDialog()
| Method Detail |
|---|
protected java.util.Map<java.lang.String,java.lang.Object> getSubNodes(info.magnolia.cms.core.Content node)
throws javax.jcr.RepositoryException,
info.magnolia.cms.security.AccessDeniedException
node - content node
javax.jcr.RepositoryException - for any exception occurred while accessing the repository
info.magnolia.cms.security.AccessDeniedException - if the current user can't read the configuration subnodes
public void init(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
info.magnolia.cms.core.Content websiteNode,
info.magnolia.cms.core.Content configNode)
throws javax.jcr.RepositoryException
init in interface info.magnolia.cms.gui.dialog.DialogControlinit in class info.magnolia.cms.gui.dialog.DialogControlImpljavax.jcr.RepositoryException
public void drawHtml(java.io.Writer out)
throws java.io.IOException
drawHtml in interface info.magnolia.cms.gui.dialog.DialogControldrawHtml in class info.magnolia.cms.gui.dialog.DialogControlImpljava.io.IOExceptionprotected void addToParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
parameters - parameter mapprotected abstract java.lang.String getPath()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||