water.api
Class RequestArguments.MultipleSelect<T>

java.lang.Object
  extended by water.Iced
      extended by water.api.RequestArguments.Argument<T>
          extended by water.api.RequestArguments.MultipleSelect<T>
All Implemented Interfaces:
java.lang.Cloneable, Request.Filter, Freezable
Direct Known Subclasses:
RequestArguments.FrameKeyMultiVec, RequestArguments.HexColumnSelect
Enclosing class:
RequestArguments

public abstract class RequestArguments.MultipleSelect<T>
extends RequestArguments.Argument<T>

Displays multiple checkboxes for different values. Returns a list of the checked values separated by commas.


Field Summary
 
Fields inherited from class water.api.RequestArguments.Argument
_displayName, _field, _hideInQuery, _name, _prerequisites, _readOnly, _requestHelp, _required
 
Constructor Summary
RequestArguments.MultipleSelect(java.lang.String name)
          Constructor just calls super.
 
Method Summary
protected abstract  boolean isSelected(java.lang.String value)
          Returns true if the given option (by its value) is selected.
protected  java.lang.String jsRefresh(java.lang.String callbackName)
          Refresh is supported using standard jQuery change event.
protected  java.lang.String jsValue()
          Get value is supported by a JS function that enumerates over the possibilities.
protected  java.lang.String queryElement()
          Displays the query element.
protected  java.lang.String[] selectNames()
          Override this method to determine the value names, that is the names displayed in the browser.
protected abstract  java.lang.String[] selectValues()
          Override this method to provide the values for the options.
 
Methods inherited from class water.api.RequestArguments.Argument
addPrerequisite, check, defaultValue, disable, disable, disabled, errors, jsAddons, originalValue, parse, query, queryAddons, queryComment, queryDescription, record, refreshOnChange, requestHelp, reset, run, setRefreshOnChange, specified, valid, value
 
Methods inherited from class water.Iced
clone, frozenType, init, newInstance, read, toDocField, write, writeJSON, writeJSONFields
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestArguments.MultipleSelect

public RequestArguments.MultipleSelect(java.lang.String name)
Constructor just calls super. Is never required, translates to the default value.

Method Detail

selectValues

protected abstract java.lang.String[] selectValues()
Override this method to provide the values for the options. These will be the possible values returned by the form's input and should be the possible values for the JSON argument.


isSelected

protected abstract boolean isSelected(java.lang.String value)
Returns true if the given option (by its value) is selected. False otherwise.


selectNames

protected java.lang.String[] selectNames()
Override this method to determine the value names, that is the names displayed in the browser. Return null, if the value strings should be used (this is default behavior).


queryElement

protected java.lang.String queryElement()
Displays the query element. It is a tabled list of all possibilities with an optional scrollbar on the right.

Specified by:
queryElement in class RequestArguments.Argument<T>

jsRefresh

protected java.lang.String jsRefresh(java.lang.String callbackName)
Refresh is supported using standard jQuery change event. Each possibility's checkbox is instrumented.

Specified by:
jsRefresh in class RequestArguments.Argument<T>

jsValue

protected java.lang.String jsValue()
Get value is supported by a JS function that enumerates over the possibilities. If checked, the value of the possibility is appended to a comma separated list.

Specified by:
jsValue in class RequestArguments.Argument<T>