to.etc.domui.component.input
Class SelectBasedControl<T>

java.lang.Object
  extended by to.etc.domui.dom.css.CssBase
      extended by to.etc.domui.dom.html.NodeBase
          extended by to.etc.domui.dom.html.NodeContainer
              extended by to.etc.domui.dom.html.InputNodeContainer
                  extended by to.etc.domui.dom.html.Select
                      extended by to.etc.domui.component.input.SelectBasedControl<T>
All Implemented Interfaces:
java.lang.Iterable<NodeBase>, IModelBinding, IBindable, INodeErrorDelegate, IActionControl, IControl<T>, IDisplayControl<T>, IHasChangeListener, IHasModifiedIndication, IInputNode<T>

Deprecated.

@Deprecated
public abstract class SelectBasedControl<T>
extends Select
implements IInputNode<T>, IHasModifiedIndication


Constructor Summary
SelectBasedControl()
          Deprecated.  
 
Method Summary
 IBinder bind()
          Deprecated. Return the binder for this control.
protected abstract  T findListValueByIndex(int nindex)
          Deprecated. Locate the "T" value for the nth selected option.
protected abstract  int findOptionIndexForValue(T newvalue)
          Deprecated.  
protected  SelectOption getEmptyOption()
          Deprecated. If this combobox has a "unselected" option currently this contains that option.
 java.lang.String getEmptyText()
          Deprecated.  
 T getValue()
          Deprecated. Returns the current value of this input component.
 T getValueSafe()
          Deprecated. Like IDisplayControl.getValue() this returns the value of the component, but this returns null if the value was invalid.
 boolean hasError()
          Deprecated. Return T if this node currently has an error associated with it.
protected  T internalGetCurrentValue()
          Deprecated.  
protected  boolean internalOnUserInput(int oldindex, int nindex)
          Deprecated. The user selected a different option.
protected  void internalOnValueSet(T previousvalue, T newvalue)
          Deprecated. A value was set through setValue(); we need to find the proper thingy to select.
protected  void internalSetCurrentValue(T val)
          Deprecated.  
 boolean isBound()
          Deprecated. Returns T if this control is bound to some data value.
protected  void setEmptyOption(SelectOption emptyOption)
          Deprecated. See getter.
 void setEmptyText(java.lang.String emptyText)
          Deprecated.  
 void setValue(T v)
          Deprecated. Set a new value into this control.
 
Methods inherited from class to.etc.domui.dom.html.Select
acceptRequestParameter, addExtraButton, canContain, clearSelected, getOption, getSelectedIndex, getSize, internalSetSelectedIndex, isDisabled, isModified, isMultiple, onAddedToPage, onRemoveFromPage, setDisabled, setModified, setMultiple, setReadOnly, setSelectedIndex, setSize, visit
 
Methods inherited from class to.etc.domui.dom.html.InputNodeContainer
callOnValueChanged, getOnValueChanged, isMandatory, isReadOnly, setMandatory, setOnValueChanged
 
Methods inherited from class to.etc.domui.dom.html.NodeContainer
add, add, add, addTable, delegateTo, findChildIndex, forceRebuild, getChild, getChildCount, getChildren, getDeepChild, getDeepChildren, getErrorFence, internalCheckNotDirty, internalClearDelta, internalClearDeltaFully, internalGetOldChildren, internalShelve, internalUnshelve, iterator, moveControlToModel, moveModelToControl, onRefresh, removeAllChildren, removeChild, removeChild, replaceChild, setControlsEnabled, setErrorFence, setErrorFence, setText, setValue
 
Methods inherited from class to.etc.domui.dom.html.NodeBase
$, addCssClass, addGlobalMessage, afterCreateContent, appendAfterMe, appendBeforeMe, appendCreateJS, appendJavascript, build, changed, clearFocusRequested, clearGlobalMessage, clearGlobalMessage, clearGlobalMessage, clearMessage, componentHandleWebAction, createContent, findComponentBundle, getActualID, getAllocationTracepoint, getClicked, getComponentBundle, getCreateJS, getCssClass, getErrorDelegate, getErrorLocation, getMessage, getOnClickJS, getOnMouseDownJS, getPage, getParent, getParent, getParent, getSharedContext, getSpecialAttribute, getSpecialAttributeList, getTag, getTestID, getTitle, getUserObject, handleDrop, hasCssClass, internalGetOldParent, internalHasChangedAttributes, internalNeedClickHandler, internalOnClicked, internalOnValueChanged, internalSetHasChangedAttributes, internalSetHasChangedAttributes, internalSetLogAllocations, internalSetTag, isBuilt, isFocusRequested, isStretchHeight, onBeforeFullRender, onForceRebuild, onHeaderContributors, onShelve, onUnshelve, refresh, remove, removeCssClass, renderJavascriptState, replaceWith, setClicked, setComponentBundle, setCssClass, setErrorDelegate, setErrorLocation, setFocus, setMessage, setOnClickJS, setOnMouseDownJS, setSpecialAttribute, setStretchHeight, setTestID, setTitle, setUserObject, toString
 
Methods inherited from class to.etc.domui.dom.css.CssBase
getBackgroundAttachment, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorderBottomColor, getBorderBottomStyle, getBorderBottomWidth, getBorderLeftColor, getBorderLeftStyle, getBorderLeftWidth, getBorderRightColor, getBorderRightStyle, getBorderRightWidth, getBorderTopColor, getBorderTopStyle, getBorderTopWidth, getBottom, getCachedStyle, getClear, getColor, getDisplay, getFloat, getFontFamily, getFontSize, getFontSizeAdjust, getFontStyle, getFontVariant, getFontWeight, getHeight, getLeft, getLineHeight, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOverflow, getPosition, getRight, getTextAlign, getTop, getTransform, getVerticalAlign, getVisibility, getWidth, getZIndex, internalSetDisplay, setBackgroundAttachment, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBorder, setBorderBottomColor, setBorderBottomStyle, setBorderBottomWidth, setBorderColor, setBorderLeftColor, setBorderLeftStyle, setBorderLeftWidth, setBorderRightColor, setBorderRightStyle, setBorderRightWidth, setBorderStyle, setBorderTopColor, setBorderTopStyle, setBorderTopWidth, setBorderWidth, setBottom, setBottom, setCachedStyle, setClear, setColor, setDisplay, setFloat, setFontFamily, setFontSize, setFontSizeAdjust, setFontStyle, setFontVariant, setFontWeight, setHeight, setLeft, setLeft, setLineHeight, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOverflow, setPosition, setRight, setRight, setTextAlign, setTop, setTop, setTransform, setVerticalAlign, setVisibility, setWidth, setZIndex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface to.etc.domui.dom.html.IControl
getErrorLocation, isDisabled, isMandatory, isReadOnly, setErrorLocation, setMandatory, setReadOnly
 
Methods inherited from interface to.etc.domui.dom.html.IDisplayControl
setTestID
 
Methods inherited from interface to.etc.domui.dom.html.IActionControl
setDisabled, setTestID
 
Methods inherited from interface to.etc.domui.dom.html.IHasChangeListener
getOnValueChanged, setOnValueChanged
 
Methods inherited from interface to.etc.domui.dom.errors.INodeErrorDelegate
clearMessage, getMessage, setMessage
 
Methods inherited from interface to.etc.domui.dom.html.IHasModifiedIndication
isModified, setModified
 

Constructor Detail

SelectBasedControl

public SelectBasedControl()
Deprecated. 
Method Detail

findListValueByIndex

protected abstract T findListValueByIndex(int nindex)
Deprecated. 
Locate the "T" value for the nth selected option. This must return the ACTUAL list value and must not decrement the index for mandatoryness (this has already been done).

Parameters:
nindex -
Returns:

findOptionIndexForValue

protected abstract int findOptionIndexForValue(T newvalue)
Deprecated. 

getEmptyText

public java.lang.String getEmptyText()
Deprecated. 

setEmptyText

public void setEmptyText(java.lang.String emptyText)
Deprecated. 

getEmptyOption

protected SelectOption getEmptyOption()
Deprecated. 
If this combobox has a "unselected" option currently this contains that option. When present it means that indexes in the combo list are one higher than indexes in the backing dataset (because this empty option is always choice# 0).

Returns:

setEmptyOption

protected void setEmptyOption(SelectOption emptyOption)
Deprecated. 
See getter.

Parameters:
emptyOption -

internalOnUserInput

protected boolean internalOnUserInput(int oldindex,
                                      int nindex)
Deprecated. 
The user selected a different option.

Overrides:
internalOnUserInput in class Select
See Also:
Select.internalOnUserInput(int, int)

getValue

public final T getValue()
Deprecated. 
Description copied from interface: IDisplayControl
Returns the current value of this input component. If the component contains no value this returns null. All text input components will return null when their value is the empty string! If the component, during conversion or validation of the input value, discovers that the input is invalid it will set itself in "error" mode, post an error message up the form, and throw a ValidationException. This means that this call either delivers correct input (as defined by it's converter and validators), null (when empty) or throws an exception. When a ValidationException occurs the framework mostly ignores it - it does not produce a stacktrace or error in the client. Instead the resulting error as posted by the error handling framework gets displayed on the form when the request completes.

To get the value of a component while ignoring exceptions call #getValueSafe().

Specified by:
getValue in interface IDisplayControl<T>
Returns:
See Also:
IDisplayControl.getValue()

setValue

public final void setValue(T v)
Deprecated. 
Description copied from interface: IDisplayControl
Set a new value into this control. Setting a value to null means the control holds no value. This value is converted to a presentable form using any (implicitly) defined converters; it will not be validated though! This means that if you set an invalid value for a validator this will not be seen until the value is gotten from the control again.

Specified by:
setValue in interface IDisplayControl<T>
See Also:
IDisplayControl.setValue(java.lang.Object)

internalOnValueSet

protected final void internalOnValueSet(T previousvalue,
                                        T newvalue)
Deprecated. 
A value was set through setValue(); we need to find the proper thingy to select.


internalGetCurrentValue

protected T internalGetCurrentValue()
Deprecated. 

internalSetCurrentValue

protected void internalSetCurrentValue(T val)
Deprecated. 

getValueSafe

public T getValueSafe()
Deprecated. 
Description copied from interface: IControl
Like IDisplayControl.getValue() this returns the value of the component, but this returns null if the value was invalid. For this method NULL either means the value was invalid OR it's content was empty. To distinguish between the two call IControl.hasError() or use IDisplayControl.getValue() instead of this call.

Specified by:
getValueSafe in interface IControl<T>
Returns:
See Also:
IControl.getValueSafe()

hasError

public boolean hasError()
Deprecated. 
Description copied from class: NodeBase
Return T if this node currently has an error associated with it.

Specified by:
hasError in interface IControl<T>
Overrides:
hasError in class NodeBase
Returns:
See Also:
IControl.hasError()

bind

public IBinder bind()
Deprecated. 
Return the binder for this control.

Specified by:
bind in interface IBindable
Returns:
See Also:
IBindable.bind()

isBound

public boolean isBound()
Deprecated. 
Returns T if this control is bound to some data value.

Specified by:
isBound in interface IBindable
Returns:
See Also:
IBindable.isBound()