info.magnolia.cms.gui.dialog
Class DialogEditWithCustomButtons

java.lang.Object
  extended by info.magnolia.cms.gui.dialog.DialogControlImpl
      extended by info.magnolia.cms.gui.dialog.DialogBox
          extended by info.magnolia.cms.gui.dialog.DialogEditWithCustomButtons
All Implemented Interfaces:
DialogControl

public class DialogEditWithCustomButtons
extends DialogBox

A simple input text with additional configurable buttons. For most uses you can probably stay with the standard date and link dialogs provided with Magnolia, but if you need additional or custom buttons you can use this control.

Sample configuration:

 + dialog
   + tabText
     + sampleEdit
       + buttons
         + button1
           * label      "Say hello"
           * onclick    "alert('hello!')"
         + button2
           * label      "Browse"
           * onclick    "mgnlDialogLinkOpenBrowser('link','website','html', false)"
         + button3
           * label      "Clear"
           * onclick    "getElementById('link').value=''"
       * type           "String"
       * label          "sample link"
       * rows           "1"
       * name           "link"
       * controlType    "editWithButtons"
 

Since:
2.2
Author:
Fabrizio Giustina

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
DialogEditWithCustomButtons()
           
 
Method Summary
 void drawHtml(Writer out)
          Actually draw the dialog content.
 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.
 
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
 

Constructor Detail

DialogEditWithCustomButtons

public DialogEditWithCustomButtons()
Method Detail

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 HttpServletRequest
response - current HttpServletResponse
websiteNode - current website node
configNode - configuration node for the dialog
Throws:
javax.jcr.RepositoryException
See Also:
DialogControl.init(HttpServletRequest, HttpServletResponse, Content, Content)

drawHtml

public void drawHtml(Writer out)
              throws 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:
IOException - exceptions thrown when writing to the Writer can be safely rethrown by the dialog
See Also:
DialogControl.drawHtml(Writer)


Copyright © 2003-2014 Magnolia International Ltd.. All Rights Reserved.