public class ComboComponentBase2<T,V> extends AbstractDivControl<V> implements IControl<V>, IHasModifiedIndication
| Constructor and Description |
|---|
ComboComponentBase2() |
ComboComponentBase2(Class<? extends IComboDataSet<T>> dataSetClass) |
ComboComponentBase2(Class<? extends IComboDataSet<T>> set,
INodeContentRenderer<T> r) |
ComboComponentBase2(IComboDataSet<T> dataSet) |
ComboComponentBase2(IListMaker<T> maker) |
ComboComponentBase2(List<T> in) |
ComboComponentBase2(QCriteria<T> query) |
| Modifier and Type | Method and Description |
|---|---|
void |
addExtraButton(String img,
String title,
IClicked<NodeBase> click)
Add a small image button after the combo.
|
void |
createContent()
Render the actual combobox.
|
V |
getBindValue() |
INodeContentRenderer<T> |
getContentRenderer() |
Class<? extends INodeContentRenderer<T>> |
getContentRendererClass() |
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.
|
String |
getEmptyText() |
protected String |
getFocusID()
If this node "wraps" focusable components this call should return the ID of
a HTML node that can receive focus when the component itself is focused.
|
IListMaker<T> |
getListMaker() |
IValueChanged<?> |
getOnValueChanged() |
PropertyMetaModel<?> |
getPropertyMetaModel() |
V |
getValue()
Returns the current value of this input component.
|
V |
getValueSafe()
Like
IControl.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.
|
void |
immediate() |
protected V |
internalGetCurrentValue() |
protected boolean |
internalOnUserInput(int oldindex,
int nindex)
The user selected a different option.
|
boolean |
isDisabled()
Returns T if the control is currently in disabled.
|
boolean |
isMandatory()
Returns T if this control is a mandatory input.
|
boolean |
isModified()
Returns the modified-by-user flag.
|
boolean |
isReadOnly()
Returns T if the control is currently in readonly mode.
|
protected V |
listToValue(T in) |
protected List<T> |
provideData()
Creates the list-of-values that is to be used if no specific lov is set using setData().
|
protected void |
renderOptionLabel(NodeContainer o,
T object) |
void |
setBindValue(V value) |
void |
setContentRenderer(INodeContentRenderer<T> contentRenderer) |
void |
setContentRendererClass(Class<? extends INodeContentRenderer<T>> contentRendererClass) |
void |
setData(List<T> data)
Can be used to set a specific list-of-values.
|
void |
setDisabled(boolean d)
Set the input to disabled mode.
|
protected void |
setEmptyOption(SelectOption emptyOption)
See getter.
|
void |
setEmptyText(String emptyText) |
void |
setListMaker(IListMaker<T> listMaker) |
void |
setMandatory(boolean mandatory)
Make the control mandatory.
|
void |
setMaxWidth(String maxWidth) |
void |
setModified(boolean as)
Set or clear the modified by user flag.
|
void |
setOnValueChanged(IValueChanged<?> onValueChanged) |
void |
setPropertyMetaModel(PropertyMetaModel<?> propertyMetaModel) |
void |
setReadOnly(boolean ro)
Sets the input to readonly-mode.
|
void |
setValue(V v)
Set the combo to the specified value.
|
void |
setValueTransformer(IValueTransformer<V> valueTransformer) |
disabledChanged, getDisabledBecause, internalGetValue, internalSetValue, mandatoryChanged, onValueSet, readOnlyChanged, setDisabledBecause, validateafterCreateContent, componentHandleWebAction, fadeIn, fadeOut, getCustomUpdatesCallJS, getDragHandler, getDropBody, getDropHandler, getDropMode, getReturnPressed, setDragHandler, setDropBody, setDropHandler, setReturnPressed, slideDown, slideUp, tb, visitadd, add, add, addTable, addTableForLayout, addTableForLayout, appendTreeErrors, canContain, createFrame, delegateTo, disableAllChildControlsDeep, findChildIndex, forceRebuild, getChild, getChildCount, getChildren, getDeepChildren, getDelegate, getErrorFence, getTextContents, internalAdd, internalCheckNotDirty, internalClearDelta, internalClearDeltaFully, internalCreateFrame, internalGetNodeCount, internalGetOldChildren, internalOnBeforeRender, internalShelve, internalUnshelve, iterator, onRefresh, removeAllChildren, removeChild, removeChild, replaceChild, setErrorFence, setErrorFence, setText, setValue, undelegatedAdd, undelegatedGetChild$, acceptRequestParameter, addBinding, addCssClass, addGlobalMessage, addNotificationListener, alignToLeft, alignToLeft, alignToMiddle, alignToMiddle, alignTopToBottom, alignTopToBottom, alignToRight, alignToRight, alignToTop, alignToTop, appendAfterMe, appendBeforeMe, appendCreateJS, appendJavascript, appendJQuerySelector, appendJsCustomUpdatesContributor, appendShowOverflowTextAsTitleJs, appendStatement, beforeCreateContent, bind, bind, bindErrors, build, calcTestID, changed, changedJavascriptState, clearFocusRequested, clearGlobalMessage, clearGlobalMessage, clearGlobalMessage, clearMessage, clearValidationFailure, componentHandleWebDataRequest, createStatement, findComponentBundle, findParent, getActualID, getAllocationTracepoint, getBindingErrors, getBindingList, getBrowserWindowSize, getCalculatedTestID, getClicked, getClientBounds, getComponentBundle, getComponentDataURL, getComponentDataURL, getComponentInfo, getComponentJSONURL, getCreateJS, getCssClass, getErrorList, getErrorLocation, getMessage, getOnClickJS, getOnMouseDownJS, getOnSizeAndPositionChange, getPage, getParent, getParent, getParent, getParentOfTypes, getSharedContext, getSharedContextFactory, getSpecialAttribute, getSpecialAttributeList, getTag, getTestID, getTestRepeatId, getThemedResourceRURL, getTitle, getUserObject, handleDrop, hasCssClass, hasParent, internalGetOldParent, internalGetParent, internalHasChangedAttributes, internalNeedClickHandler, internalOnClicked, internalOnValueChanged, internalRenderJavascriptDelta, internalRenderJavascriptState, internalSetHasChangedAttributes, internalSetHasChangedAttributes, internalSetLogAllocations, internalSetTag, isAttached, isBuilt, isFocusable, isFocusRequested, isRendersOwnClose, isStretchHeight, lc, notify, notifyParentOrOpenerPage, onAddedToPage, onBeforeFullRender, onBeforeRender, onForceRebuild, onHeaderContributors, onRemoveFromPage, onShelve, onUnshelve, refresh, remove, removeBinding, removeCssClass, renderJavascriptDelta, renderJavascriptState, renderJavascriptState, replaceWith, setBrowserWindowSize, setCalculcatedId, setCalculcatedId, setClicked, setClientBounds, setComponentBundle, setCssClass, setErrorLocation, setFocus, setMessage, setOnClickJS, setOnMouseDownJS, setOnSizeAndPositionChange, setOverrideTitle, setSpecialAttribute, setStretchHeight, setTestID, setTestRepeatID, setTitle, setUserObject, toStringgetBackgroundAttachment, 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, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, 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, setMinHeight, setMinWidth, setOverflow, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPosition, setRight, setRight, setTextAlign, setTop, setTop, setTransform, setVerticalAlign, setVisibility, setWidth, setZIndexclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetErrorLocation, setErrorLocationsetTestIDclearMessage, getMessage, setMessageforEach, spliteratorpublic ComboComponentBase2()
public ComboComponentBase2(@Nonnull IListMaker<T> maker)
public ComboComponentBase2(@Nonnull IComboDataSet<T> dataSet)
public ComboComponentBase2(Class<? extends IComboDataSet<T>> dataSetClass)
public ComboComponentBase2(Class<? extends IComboDataSet<T>> set, INodeContentRenderer<T> r)
public void createContent()
throws Exception
createContent in class AbstractDivControl<V>Exception@Nullable protected String getFocusID()
NodeBasegetFocusID in class NodeBasepublic final V getValue()
IControlValidationException. 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 IControl.getValueSafe().
getValue in interface IControl<V>getValue in class AbstractDivControl<V>IControl.getValue()public final V getBindValue()
public final void setBindValue(V value)
public final void setValue(@Nullable V v)
setValue in interface IControl<V>setValue in class AbstractDivControl<V>IControl.setValue(java.lang.Object)protected final boolean internalOnUserInput(int oldindex,
int nindex)
Select.internalOnUserInput(int, int)protected V listToValue(T in) throws Exception
in - Exceptionprotected final void renderOptionLabel(NodeContainer o, T object) throws Exception
Exceptionpublic void setData(List<T> data)
data - public List<T> getData() throws Exception
Exceptionprotected List<T> provideData() throws Exception
Exceptionpublic void addExtraButton(String img, String title, IClicked<NodeBase> click)
img - title - click - public V getValueSafe()
IControlIControl.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
IControl.getValue() instead of this call.getValueSafe in interface IControl<V>getValueSafe in class AbstractDivControl<V>IControl.getValueSafe()public boolean hasError()
NodeBasehasError in interface IControl<V>hasError in class NodeContainerIControl.hasError()public INodeContentRenderer<T> getContentRenderer()
public void setContentRenderer(INodeContentRenderer<T> contentRenderer)
public Class<? extends INodeContentRenderer<T>> getContentRendererClass()
public void setContentRendererClass(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 String getEmptyText()
public void setEmptyText(String emptyText)
protected SelectOption getEmptyOption()
protected void setEmptyOption(SelectOption emptyOption)
emptyOption - protected V internalGetCurrentValue()
public void setMandatory(boolean mandatory)
IControlsetMandatory in interface IControl<V>setMandatory in class AbstractDivControl<V>public IValueChanged<?> getOnValueChanged()
getOnValueChanged in interface IHasChangeListenergetOnValueChanged in class AbstractDivControl<V>public void setOnValueChanged(IValueChanged<?> onValueChanged)
setOnValueChanged in interface IHasChangeListenersetOnValueChanged in class AbstractDivControl<V>public void immediate()
public void setDisabled(boolean d)
IActionControlsetDisabled in interface IActionControlsetDisabled in class AbstractDivControl<V>public boolean isModified()
IHasModifiedIndicationisModified in interface IHasModifiedIndicationpublic void setModified(boolean as)
IHasModifiedIndicationsetModified in interface IHasModifiedIndicationpublic boolean isReadOnly()
IControlisReadOnly in interface IControl<V>isReadOnly in class AbstractDivControl<V>public void setReadOnly(boolean ro)
IControlsetReadOnly in interface IControl<V>setReadOnly in class AbstractDivControl<V>public boolean isDisabled()
IControlisDisabled in interface IControl<V>isDisabled in class AbstractDivControl<V>public boolean isMandatory()
IControlisMandatory in interface IControl<V>isMandatory in class AbstractDivControl<V>public void setMaxWidth(String maxWidth)
setMaxWidth in class CssBaseCopyright © 2017 etc.to. All rights reserved.