|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectto.etc.domui.dom.css.CssBase
to.etc.domui.dom.html.NodeBase
to.etc.domui.dom.html.NodeContainer
to.etc.domui.dom.html.InputNodeContainer
to.etc.domui.dom.html.Select
to.etc.domui.component.input.ComboComponentBase<T,V>
public class ComboComponentBase<T,V>
Constructor Summary | |
---|---|
ComboComponentBase()
|
|
ComboComponentBase(java.lang.Class<? extends IComboDataSet<T>> dataSetClass)
|
|
ComboComponentBase(java.lang.Class<? extends IComboDataSet<T>> set,
INodeContentRenderer<T> r)
|
|
ComboComponentBase(IComboDataSet<T> dataSet)
|
|
ComboComponentBase(IListMaker<T> maker)
|
|
ComboComponentBase(java.util.List<T> in)
|
|
ComboComponentBase(QCriteria<T> query)
|
Method Summary | |
---|---|
IBinder |
bind()
Return the binder for this control. |
void |
createContent()
Render the actual combobox. |
INodeContentRenderer<T> |
getContentRenderer()
|
java.lang.Class<? extends INodeContentRenderer<T>> |
getContentRendererClass()
|
java.util.List<T> |
getData()
Returns the data to use as the list-of-values of this combo. |
protected SelectOption |
getEmptyOption()
If this combobox has a "unselected" option currently this contains that option. |
java.lang.String |
getEmptyText()
|
IListMaker<T> |
getListMaker()
|
PropertyMetaModel<?> |
getPropertyMetaModel()
|
V |
getValue()
Returns the current value of this input component. |
V |
getValueSafe()
Like IDisplayControl.getValue() this returns the value of the component, but this returns null
if the value was invalid. |
IValueTransformer<V> |
getValueTransformer()
|
boolean |
hasError()
Return T if this node currently has an error associated with it. |
protected V |
internalGetCurrentValue()
|
protected boolean |
internalOnUserInput(int oldindex,
int nindex)
The user selected a different option. |
protected void |
internalSetCurrentValue(V val)
|
boolean |
isBound()
Returns T if this control is bound to some data value. |
protected V |
listToValue(T in)
|
protected java.util.List<T> |
provideData()
Creates the list-of-values that is to be used if no specific lov is set using setData(). |
protected void |
renderOptionLabel(SelectOption o,
T object)
|
void |
setContentRenderer(INodeContentRenderer<T> contentRenderer)
|
void |
setContentRendererClass(java.lang.Class<? extends INodeContentRenderer<T>> contentRendererClass)
|
void |
setData(java.util.List<T> data)
Can be used to set a specific list-of-values. |
protected void |
setEmptyOption(SelectOption emptyOption)
See getter. |
void |
setEmptyText(java.lang.String emptyText)
|
void |
setListMaker(IListMaker<T> listMaker)
|
void |
setPropertyMetaModel(PropertyMetaModel<?> propertyMetaModel)
|
void |
setValue(V v)
Set the combo to the specified value. |
void |
setValueTransformer(IValueTransformer<V> valueTransformer)
|
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 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 |
---|
public ComboComponentBase()
public ComboComponentBase(IListMaker<T> maker)
public ComboComponentBase(IComboDataSet<T> dataSet)
public ComboComponentBase(QCriteria<T> query)
public ComboComponentBase(java.lang.Class<? extends IComboDataSet<T>> dataSetClass)
public ComboComponentBase(java.util.List<T> in)
public ComboComponentBase(java.lang.Class<? extends IComboDataSet<T>> set, INodeContentRenderer<T> r)
Method Detail |
---|
public void createContent() throws java.lang.Exception
createContent
in class NodeBase
java.lang.Exception
public final V getValue()
IDisplayControl
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()
.
getValue
in interface IDisplayControl<V>
IDisplayControl.getValue()
public final void setValue(V v)
setValue
in interface IDisplayControl<V>
IDisplayControl.setValue(java.lang.Object)
protected boolean internalOnUserInput(int oldindex, int nindex)
internalOnUserInput
in class Select
Select.internalOnUserInput(int, int)
protected V listToValue(T in) throws java.lang.Exception
in
-
java.lang.Exception
protected void renderOptionLabel(SelectOption o, T object) throws java.lang.Exception
java.lang.Exception
public void setData(java.util.List<T> data)
data
- public java.util.List<T> getData() throws java.lang.Exception
java.lang.Exception
protected java.util.List<T> provideData() throws java.lang.Exception
java.lang.Exception
public V getValueSafe()
IControl
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.
getValueSafe
in interface IControl<V>
IControl.getValueSafe()
public boolean hasError()
NodeBase
hasError
in interface IControl<V>
hasError
in class NodeBase
IControl.hasError()
public IBinder bind()
bind
in interface IBindable
IBindable.bind()
public boolean isBound()
isBound
in interface IBindable
IBindable.isBound()
public INodeContentRenderer<T> getContentRenderer()
public void setContentRenderer(INodeContentRenderer<T> contentRenderer)
public java.lang.Class<? extends INodeContentRenderer<T>> getContentRendererClass()
public void setContentRendererClass(java.lang.Class<? extends INodeContentRenderer<T>> contentRendererClass)
public PropertyMetaModel<?> getPropertyMetaModel()
public void setPropertyMetaModel(PropertyMetaModel<?> propertyMetaModel)
public IListMaker<T> getListMaker()
public void setListMaker(IListMaker<T> listMaker)
public IValueTransformer<V> getValueTransformer()
public void setValueTransformer(IValueTransformer<V> valueTransformer)
public java.lang.String getEmptyText()
public void setEmptyText(java.lang.String emptyText)
protected SelectOption getEmptyOption()
protected void setEmptyOption(SelectOption emptyOption)
emptyOption
- protected V internalGetCurrentValue()
protected void internalSetCurrentValue(V val)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |