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: 32667 $ ($Author: gjoseph $)
Author:
Philipp Bracher

Field Summary
static String CONFIG_SAVE_MODE
          Set the save mode
static String SAVE_MODE_JSON
          The values are saved as a single json string
static String SAVE_MODE_LIST
          The values are saved as semicolon separated list
static 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(Writer out)
          Render the Html using a template
 String getAddButton()
          The button to add a new row
 String getChooseButton()
          If this control has a choose button
 String getDeleteButton()
          Button for deleting a row
 String getGetObjectFunction()
          JS function used to create an object out of the input fields
 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.
 String getInnerHtml()
          Called by the template.
 String getJSON()
          Create the object to initialize the table
 String getNewObjectFunction()
          JS function used to create a new empty object
 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 String SAVE_MODE_MULTIPLE
The values are saved a properties

See Also:
Constant Field Values

SAVE_MODE_JSON

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

See Also:
Constant Field Values

SAVE_MODE_LIST

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

See Also:
Constant Field Values

CONFIG_SAVE_MODE

public static final String CONFIG_SAVE_MODE
Set the save mode

See Also:
Constant Field Values
Constructor Detail

DialogMultiSelect

public DialogMultiSelect()
Method Detail

drawHtml

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

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)

getAddButton

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


getChooseButton

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


getDeleteButton

public String getDeleteButton()
Button for deleting a row


getInnerHtml

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


getGetObjectFunction

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


getNewObjectFunction

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


getJSON

public String getJSON()
Create the object to initialize the table


getSaveInfo

public String getSaveInfo()

isSaveAsList

public boolean isSaveAsList()

isSaveAsJSON

public boolean isSaveAsJSON()

getHiddenFieldName

public 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-2010 Magnolia International Ltd.. All Rights Reserved.