public abstract class LookupInputBase2<QT,OT> extends Div implements IControl<OT>, ITypedControl<OT>, IHasModifiedIndication, IQueryManipulator<QT>
| Modifier and Type | Class and Description |
|---|---|
static interface |
LookupInputBase2.IPopupOpener
EXPERIMENTAL Factory for the lookup dialog, to be shown when the lookup button
is pressed.
|
| Constructor and Description |
|---|
LookupInputBase2(ITableModelFactory<QT,OT> modelFactory,
Class<QT> queryClass,
Class<OT> resultClass)
Lookup a POJO Java bean persistent class.
|
LookupInputBase2(ITableModelFactory<QT,OT> modelFactory,
Class<QT> queryClass,
Class<OT> resultClass,
ClassMetaModel queryMetaModel,
ClassMetaModel outputMetaModel) |
LookupInputBase2(ITableModelFactory<QT,OT> modelFactory,
QCriteria<QT> rootCriteria,
Class<OT> resultClass) |
| Modifier and Type | Method and Description |
|---|---|
void |
addKeywordProperty(String name)
Define a property to use for quick search.
|
void |
addKeywordProperty(String name,
int minlen)
Define a property to use for quick search.
|
QCriteria<QT> |
adjustQuery(QCriteria<QT> enteredCriteria)
Adjust the query.
|
void |
createContent() |
Class<OT> |
getActualType() |
OT |
getBindValue() |
HoverButton |
getClearButton() |
String |
getDefaultTitle()
Construct a default title for this LookupInput
|
String |
getDisabledBecause() |
protected String |
getFocusID()
Depending on what is present return the ID of a component that can
receive focus.
|
String |
getKeySearchHint()
Getter for keyword search hint.
|
List<SearchPropertyMetaModel> |
getKeywordLookupPropertyList() |
String |
getKeyWordSearchCssClass() |
int |
getKeyWordSearchPopupWidth() |
ITableModelFactory<QT,OT> |
getModelFactory() |
INotify<Dialog> |
getOnPopupOpen() |
IValueChanged<?> |
getOnValueChanged() |
Class<OT> |
getOutputClass() |
ClassMetaModel |
getOutputMetaModel() |
LookupInputBase2.IPopupOpener |
getPopupOpener() |
Class<QT> |
getQueryClass() |
IQueryHandler<QT> |
getQueryHandler()
The query handler to use.
|
IQueryManipulator<QT> |
getQueryManipulator()
When set the specified manipulator will be called before a query is sent to the database.
|
ClassMetaModel |
getQueryMetaModel() |
IStringQueryFactory<QT> |
getStringQueryFactory() |
OT |
getValue()
Returns the current value of this input component.
|
INodeContentRenderer<OT> |
getValueRenderer()
The content renderer to use to render the current value.
|
OT |
getValueSafe()
Like
IControl.getValue() this returns the value of the component, but this returns null
if the value was invalid. |
OT |
getWorkValue()
The value without any consequences
|
boolean |
hasError()
Return T if this node currently has an error associated with it.
|
boolean |
isAllowKeyWordSearch()
Getter for property
m_allowKeyWordSearch. |
boolean |
isDisabled()
Returns T if the control is currently in disabled.
|
boolean |
isFocusable() |
boolean |
isMandatory()
Returns T if this control is a mandatory input.
|
boolean |
isModified()
Returns the modified-by-user flag.
|
protected boolean |
isPopupShown()
Define the full column spec in the format described for
BasicRowRenderer for the dropdown box
showing quick search results. |
boolean |
isReadOnly()
Returns T if the control is currently in readonly mode.
|
void |
setAllowKeyWordSearch(boolean allowKeyWordSearch)
Setter for property
m_allowKeyWordSearch. |
void |
setBindValue(OT value) |
void |
setDefaultTitle(String defaultTitle) |
void |
setDialogSelection(OT value)
EXPERIMENTAL This callback must be called by the popup once a selection is made.
|
void |
setDisabled(boolean disabled)
Set the input to disabled mode.
|
void |
setDisabledBecause(String msg) |
void |
setFocus()
Claim the focus for this component.
|
void |
setHint(String text)
Set a hint text for this control, for some reason only on the select button??
|
void |
setKeySearchHint(String keySearchHint)
Set hint to keyword search input.
|
void |
setKeyWordSearchCssClass(String cssClass)
Set custom css that would be applied only in case that component is rendering keyWordSearch.
|
void |
setKeyWordSearchPopupWidth(int keyWordSearchPopupWidth) |
void |
setKeywordSearchProperties(List<SearchPropertyMetaModel> keywordLookupPropertyList)
Not normally used; use
addKeywordProperty(String, int) instead. |
void |
setMandatory(boolean mandatory)
Make the control mandatory.
|
void |
setModelFactory(ITableModelFactory<QT,OT> modelFactory) |
void |
setModified(boolean as)
Set or clear the modified by user flag.
|
void |
setOnPopupOpen(INotify<Dialog> onPopupOpen) |
void |
setOnValueChanged(IValueChanged<?> onValueChanged) |
void |
setPopupOpener(LookupInputBase2.IPopupOpener popupOpener) |
void |
setQueryHandler(IQueryHandler<QT> queryHandler) |
void |
setQueryManipulator(IQueryManipulator<QT> queryManipulator)
When set the specified manipulator will be called before a query is sent to the database.
|
void |
setReadOnly(boolean readOnly)
Sets the input to readonly-mode.
|
void |
setStringQueryFactory(IStringQueryFactory<QT> keyWordSearchManipulator) |
void |
setValue(OT v)
Set a new value into this control.
|
void |
setValueColumns(String... columns)
Define the columns to show in "display current value" mode.
|
void |
setValueRenderer(INodeContentRenderer<OT> contentRenderer) |
void |
showResults(ITableModel<OT> model) |
afterCreateContent, 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, 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, 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, setMaxWidth, 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 LookupInputBase2(@Nonnull ITableModelFactory<QT,OT> modelFactory, @Nonnull Class<QT> queryClass, @Nonnull Class<OT> resultClass)
queryClass - public LookupInputBase2(@Nonnull ITableModelFactory<QT,OT> modelFactory, @Nonnull QCriteria<QT> rootCriteria, @Nonnull Class<OT> resultClass)
public LookupInputBase2(@Nonnull ITableModelFactory<QT,OT> modelFactory, @Nonnull Class<QT> queryClass, @Nonnull Class<OT> resultClass, @Nullable ClassMetaModel queryMetaModel, @Nullable ClassMetaModel outputMetaModel)
@Nonnull public HoverButton getClearButton()
public void createContent()
throws Exception
createContent in class NodeBaseException@Nullable protected String getFocusID()
getFocusID in class NodeBase@Nullable public QCriteria<QT> adjustQuery(@Nonnull QCriteria<QT> enteredCriteria)
IQueryManipulatoradjustQuery in interface IQueryManipulator<QT>public void showResults(@Nullable ITableModel<OT> model) throws Exception
Exception@Nonnull public String getDefaultTitle()
public void setHint(@Nonnull String text)
text - public boolean isMandatory()
isMandatory in interface IControl<OT>public void setMandatory(boolean mandatory)
setMandatory in interface IControl<OT>public boolean isReadOnly()
isReadOnly in interface IControl<OT>public void setReadOnly(boolean readOnly)
setReadOnly in interface IControl<OT>public boolean isDisabled()
isDisabled in interface IControl<OT>public void setDisabled(boolean disabled)
setDisabled in interface IActionControl@Nullable public OT getValue()
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 IControl.getValueSafe().
@Nullable public OT getValueSafe()
IControl.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<OT>public OT getWorkValue()
public boolean hasError()
hasError in interface IControl<OT>hasError in class NodeContainerpublic void setValue(@Nullable OT v)
public final void setDialogSelection(@Nullable OT value) throws Exception
value - Exception@Nullable public IValueChanged<?> getOnValueChanged()
getOnValueChanged in interface IHasChangeListenerpublic void setOnValueChanged(@Nullable IValueChanged<?> onValueChanged)
setOnValueChanged in interface IHasChangeListener@Nullable public IQueryManipulator<QT> getQueryManipulator()
@Nonnull public IQueryHandler<QT> getQueryHandler()
PageQueryHandler will use the
normal conversation-associated DataContext to issue the query.public void setQueryHandler(@Nullable IQueryHandler<QT> queryHandler)
public void setQueryManipulator(@Nullable IQueryManipulator<QT> queryManipulator)
queryManipulator - public boolean isModified()
isModified in interface IHasModifiedIndicationIHasModifiedIndication.isModified()public void setModified(boolean as)
setModified in interface IHasModifiedIndicationIHasModifiedIndication.setModified(boolean)@Nonnull public IStringQueryFactory<QT> getStringQueryFactory()
public void setStringQueryFactory(@Nonnull IStringQueryFactory<QT> keyWordSearchManipulator)
public void setKeyWordSearchCssClass(@Nullable String cssClass)
cssClass - public boolean isAllowKeyWordSearch()
m_allowKeyWordSearch.public void setAllowKeyWordSearch(boolean allowKeyWordSearch)
m_allowKeyWordSearch.@Nullable public String getKeySearchHint()
setKeySearchHint(java.lang.String).public void setKeySearchHint(@Nullable String keySearchHint)
keySearchHint - public void addKeywordProperty(@Nonnull String name, int minlen)
name - minlen - public void setKeywordSearchProperties(@Nonnull List<SearchPropertyMetaModel> keywordLookupPropertyList)
addKeywordProperty(String, int) instead.keywordLookupPropertyList - @Nonnull public List<SearchPropertyMetaModel> getKeywordLookupPropertyList()
public void addKeywordProperty(@Nonnull String name)
name - public int getKeyWordSearchPopupWidth()
public void setKeyWordSearchPopupWidth(int keyWordSearchPopupWidth)
@Nonnull public Class<OT> getActualType()
getActualType in interface ITypedControl<OT>@Nonnull public ClassMetaModel getOutputMetaModel()
@Nonnull public ClassMetaModel getQueryMetaModel()
public void setValueColumns(String... columns)
SimpleLookupInputRenderer2) to render the fields.columns - @Nullable public INodeContentRenderer<OT> getValueRenderer()
public void setValueRenderer(@Nullable INodeContentRenderer<OT> contentRenderer)
protected boolean isPopupShown()
BasicRowRenderer for the dropdown box
showing quick search results.columns - public boolean isFocusable()
isFocusable in class NodeBasepublic void setFocus()
NodeBase@Nonnull public ITableModelFactory<QT,OT> getModelFactory()
public void setModelFactory(@Nonnull ITableModelFactory<QT,OT> modelFactory)
@Nullable public LookupInputBase2.IPopupOpener getPopupOpener()
public void setPopupOpener(LookupInputBase2.IPopupOpener popupOpener)
Copyright © 2017 etc.to. All rights reserved.