info.magnolia.module.form.controls
Class MultiControl

java.lang.Object
  extended by info.magnolia.cms.gui.dialog.DialogControlImpl
      extended by info.magnolia.cms.gui.dialog.DialogBox
          extended by info.magnolia.module.form.controls.MultiControl
All Implemented Interfaces:
info.magnolia.cms.gui.dialog.DialogControl, MultiValueControl
Direct Known Subclasses:
ConditionControl, CriteriaControl

public abstract class MultiControl
extends info.magnolia.cms.gui.dialog.DialogBox
implements MultiValueControl

Common class for creating combined multi controls.

Author:
had

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
MultiControl()
           
 
Method Summary
 void drawHtml(Writer w)
           
 String getAddButton()
          The button to add a new row.
 String getDeleteButton()
          Button for deleting a row.
protected abstract  String getEmpty()
           
 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 getJSON()
          Create the object to initialize the table.
 String getNewObjectFunction()
          JS function used to create a new empty object.
 String getSaveInfo()
           
protected  List<String> readValues()
           
 
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, 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

MultiControl

public MultiControl()
Method Detail

getJSON

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


getEmpty

protected abstract String getEmpty()

readValues

protected List<String> readValues()
Overrides:
readValues in class info.magnolia.cms.gui.dialog.DialogControlImpl

drawHtml

public void drawHtml(Writer w)
              throws IOException
Specified by:
drawHtml in interface info.magnolia.cms.gui.dialog.DialogControl
Overrides:
drawHtml in class info.magnolia.cms.gui.dialog.DialogControlImpl
Throws:
IOException

getSaveInfo

public String getSaveInfo()

getAddButton

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


getDeleteButton

public String getDeleteButton()
Button for deleting a row.


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

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.



Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.