info.magnolia.cms.gui.dialog
Class DialogFile
java.lang.Object
info.magnolia.cms.gui.dialog.DialogControlImpl
info.magnolia.cms.gui.dialog.DialogBox
info.magnolia.cms.gui.dialog.DialogFile
- All Implemented Interfaces:
- DialogControl
public class DialogFile
- extends DialogBox
- Version:
- 2.0
- Author:
- Vinzenz Wyser
Method Summary |
void |
drawHtml(java.io.Writer out)
Actually draw the dialog content. |
protected File |
getFileControl()
Configures the inner file upload control |
protected java.lang.String |
getFileURI(File control)
Get the uri of the file (used to show images) |
protected java.lang.StringBuffer |
getHtmlControlFileName(File control)
|
java.util.List |
getImageExtensions()
|
protected java.lang.String |
getLink(File control)
|
void |
init(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
info.magnolia.cms.core.Content websiteNode,
info.magnolia.cms.core.Content configNode)
Initialize a Dialog. |
void |
initImageExtensions()
|
void |
setImageExtensions(java.util.List l)
|
boolean |
validate()
If the validation fails the code will set a message in the context using the AlertUtil. |
protected void |
writeInnerHtml(java.io.Writer out,
boolean showImage,
File control,
java.lang.StringBuffer htmlControlFileName,
java.lang.String link)
|
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DialogFile
public DialogFile()
init
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
- Description copied from interface:
DialogControl
- Initialize a Dialog. This method is guaranteed to be called just after the control instantiation.
- Specified by:
init
in interface DialogControl
- Overrides:
init
in class DialogControlImpl
- Parameters:
request
- current HttpServletRequestresponse
- current HttpServletResponsewebsiteNode
- current website nodeconfigNode
- configuration node for the dialog
- Throws:
javax.jcr.RepositoryException
- See Also:
DialogControl.init(HttpServletRequest, HttpServletResponse, Content, Content)
getImageExtensions
public java.util.List getImageExtensions()
setImageExtensions
public void setImageExtensions(java.util.List l)
initImageExtensions
public void initImageExtensions()
drawHtml
public void drawHtml(java.io.Writer out)
throws java.io.IOException
- Description copied from interface:
DialogControl
- Actually draw the dialog content.
- Specified by:
drawHtml
in interface DialogControl
- Overrides:
drawHtml
in class DialogControlImpl
- Parameters:
out
- Writer
- Throws:
java.io.IOException
- exceptions thrown when writing to the Writer can be safely rethrown by the dialog- See Also:
DialogControl.drawHtml(Writer)
getLink
protected java.lang.String getLink(File control)
writeInnerHtml
protected void writeInnerHtml(java.io.Writer out,
boolean showImage,
File control,
java.lang.StringBuffer htmlControlFileName,
java.lang.String link)
throws java.io.IOException
- Throws:
java.io.IOException
getHtmlControlFileName
protected java.lang.StringBuffer getHtmlControlFileName(File control)
validate
public boolean validate()
- Description copied from class:
DialogControlImpl
- If the validation fails the code will set a message in the context using the AlertUtil.
- Overrides:
validate
in class DialogControlImpl
- Returns:
- true if valid
getFileURI
protected java.lang.String getFileURI(File control)
- Get the uri of the file (used to show images)
- Parameters:
control
-
- Returns:
getFileControl
protected File getFileControl()
- Configures the inner file upload control
Copyright © 2003-2010 Magnolia International Ltd.. All Rights Reserved.