|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.gui.dialog.DialogControlImpl info.magnolia.cms.gui.dialog.DialogBox info.magnolia.cms.gui.dialog.DialogFreemarker
public class DialogFreemarker
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" } |
Field Summary |
---|
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 | |
---|---|
DialogFreemarker()
|
Method Summary | |
---|---|
void |
drawHtml(java.io.Writer out)
Actually draw the dialog content. |
protected void |
drawHtml(java.io.Writer out,
java.lang.String freemarkerTemplate)
|
java.util.Map |
getConfiguration()
Returns the configuration. |
java.lang.String |
getPath()
Returns the path. |
protected java.util.Map |
getSubNodes(Content node)
Get a recursive map view of a content node |
void |
init(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Content websiteNode,
Content configNode)
Initialize a Dialog. |
protected java.util.List |
readValues()
|
void |
setPath(java.lang.String path)
Sets the path. |
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, 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 |
Constructor Detail |
---|
public DialogFreemarker()
Method Detail |
---|
public void setPath(java.lang.String path)
path
- the path to setpublic java.util.Map getConfiguration()
public java.lang.String getPath()
protected java.util.List readValues()
readValues
in class DialogControlImpl
protected java.util.Map getSubNodes(Content node) throws javax.jcr.RepositoryException, AccessDeniedException
node
- content node
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException
public void init(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Content websiteNode, Content configNode) throws javax.jcr.RepositoryException
init
in interface DialogControl
init
in class DialogControlImpl
request
- current HttpServletRequestresponse
- current HttpServletResponsewebsiteNode
- current website nodeconfigNode
- configuration node for the dialog
javax.jcr.RepositoryException
public void drawHtml(java.io.Writer out) throws java.io.IOException
drawHtml
in interface DialogControl
drawHtml
in class DialogControlImpl
out
- Writer
java.io.IOException
- exceptions thrown when writing to the Writer can be safely rethrown by the dialogDialogControl.drawHtml(Writer)
protected void drawHtml(java.io.Writer out, java.lang.String freemarkerTemplate) throws java.io.IOException
out
- WriterfreemarkerTemplate
- path for the freemarker template
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |