info.magnolia.cms.gui.dialog
Class DialogMultiSelect

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.DialogMultiSelect
All Implemented Interfaces:
DialogControl

public class DialogMultiSelect
extends DialogBox

Control to select multiple values. The values can get stored as list, in JSON format or as a multiple values

Version:
$Revision: 47715 $ ($Author: dlipp $)
Author:
Philipp Bracher

Field Summary
static java.lang.String CONFIG_SAVE_MODE
          Set the save mode
static java.lang.String SAVE_MODE_JSON
          The values are saved as a single json string
static java.lang.String SAVE_MODE_LIST
          The values are saved as semicolon separated list
static java.lang.String SAVE_MODE_MULTIPLE
          The values are saved a properties
 
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
DialogMultiSelect()
           
 
Method Summary
 void drawHtml(java.io.Writer out)
          Render the Html using a template
 java.lang.String getAddButton()
          The button to add a new row
 java.lang.String getChooseButton()
          If this control has a choose button
 java.lang.String getDeleteButton()
          Button for deleting a row
 java.lang.String getGetObjectFunction()
          JS function used to create an object out of the input fields
 java.lang.String getHiddenFieldName()
          If the values are saved using the valueType multiple, we can not use the same name for the hidden field we use for persisting the data.
 java.lang.String getInnerHtml()
          Called by the template.
 java.lang.String getJSON()
          Create the object to initialize the table
 java.lang.String getNewObjectFunction()
          JS function used to create a new empty object
 java.lang.String getSaveInfo()
           
 boolean isSaveAsJSON()
           
 boolean isSaveAsList()
           
 
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, init, 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

SAVE_MODE_MULTIPLE

public static final java.lang.String SAVE_MODE_MULTIPLE
The values are saved a properties

See Also:
Constant Field Values

SAVE_MODE_JSON

public static final java.lang.String SAVE_MODE_JSON
The values are saved as a single json string

See Also:
Constant Field Values

SAVE_MODE_LIST

public static final java.lang.String SAVE_MODE_LIST
The values are saved as semicolon separated list

See Also:
Constant Field Values

CONFIG_SAVE_MODE

public static final java.lang.String CONFIG_SAVE_MODE
Set the save mode

See Also:
Constant Field Values
Constructor Detail

DialogMultiSelect

public DialogMultiSelect()
Method Detail

drawHtml

public void drawHtml(java.io.Writer out)
              throws java.io.IOException
Render the Html using a template

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)

getAddButton

public java.lang.String getAddButton()
The button to add a new row


getChooseButton

public java.lang.String getChooseButton()
If this control has a choose button


getDeleteButton

public java.lang.String getDeleteButton()
Button for deleting a row


getInnerHtml

public java.lang.String getInnerHtml()
Called by the template. It renders the dynamic inner row using trimpaths templating mechanism.


getGetObjectFunction

public java.lang.String getGetObjectFunction()
JS function used to create an object out of the input fields


getNewObjectFunction

public java.lang.String getNewObjectFunction()
JS function used to create a new empty object


getJSON

public java.lang.String getJSON()
Create the object to initialize the table


getSaveInfo

public java.lang.String getSaveInfo()

isSaveAsList

public boolean isSaveAsList()

isSaveAsJSON

public boolean isSaveAsJSON()

getHiddenFieldName

public java.lang.String getHiddenFieldName()
If the values are saved using the valueType multiple, we can not use the same name for the hidden field we use for persisting the data.

Returns:
the name of the hidden field


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