public abstract class LookupInputBase<QT,OT> extends Div implements IControl<OT>, ITypedControl<OT>, IHasModifiedIndication
| Modifier and Type | Class and Description |
|---|---|
static interface |
LookupInputBase.ILookupFormModifier<T>
Interface provides assess to used lookup form initialization method.
|
| Modifier and Type | Field and Description |
|---|---|
static INodeContentRenderer<Object> |
DEFAULT_RENDERER |
static String |
MAGIC_ID_MARKER |
| Constructor and Description |
|---|
LookupInputBase(Class<QT> queryClass,
Class<OT> resultClass)
Lookup a POJO Java bean persistent class.
|
LookupInputBase(Class<QT> queryClass,
Class<OT> resultClass,
ClassMetaModel queryMetaModel,
ClassMetaModel outputMetaModel) |
LookupInputBase(Class<QT> queryClass,
Class<OT> resultClass,
String... resultColumns)
Create a lookup control that shows the specified column set in both quick lookup mode and form lookup
mode.
|
LookupInputBase(QCriteria<QT> rootCriteria,
Class<OT> resultClass) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDropdownColumns(Object... columns)
Define the full column spec in the format described for
BasicRowRenderer for the dropdown box
showing quick search results. |
void |
addFormColumns(Object... columns)
Add column specs for the full query form's result list, according to the specifications as defined by
BasicRowRenderer. |
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.
|
protected void |
closePopup() |
void |
createContent() |
protected abstract ITableModel<OT> |
createTableModel(QCriteria<QT> query)
This must create the table model for the output type from the query on the input type.
|
IRowRenderer<OT> |
getActualFormRowRenderer()
Either use the user-specified popup form row renderer or create one using resultColumns or the default metadata.
|
Class<OT> |
getActualType() |
TBody |
getBody()
Deprecated.
|
HoverButton |
getClearButton() |
IErrorMessageListener |
getCustomErrorMessageListener() |
protected DataTable<OT> |
getDataTable() |
FloatingWindow |
getFloater() |
IClickableRowRenderer<OT> |
getFormRowRenderer()
When set this defines the
IClickableRowRenderer<OT> to use to render rows when the popup lookup form is used. |
String |
getFormTitle()
When set this defines the title of the lookup window.
|
IActionAllowed |
getIsLookupAllowed() |
String |
getKeySearchHint()
Getter for keyword search hint.
|
List<SearchPropertyMetaModel> |
getKeywordLookupPropertyList() |
String |
getKeyWordSearchCssClass() |
IKeyWordSearchQueryFactory<QT> |
getKeyWordSearchHandler() |
int |
getKeyWordSearchPopupWidth() |
LookupForm<QT> |
getLookupForm()
Can be set by a specific lookup form to use when the full query popup is shown.
|
LookupInputBase.ILookupFormModifier<QT> |
getLookupFormInitialization() |
IValueChanged<?> |
getOnValueChanged() |
Class<OT> |
getOutputClass() |
ClassMetaModel |
getOutputMetaModel() |
Class<QT> |
getQueryClass() |
IQueryHandler<QT> |
getQueryHandler()
The query handler to use, if a special one is needed.
|
IQueryManipulator<QT> |
getQueryManipulator()
When set the specified manipulator will be called before a query is sent to the database.
|
ClassMetaModel |
getQueryMetaModel() |
List<SearchPropertyMetaModel> |
getSearchProperties()
Set the list of lookup properties to use for lookup in the lookup form, when shown.
|
String |
getSelectionCssClass() |
Table |
getTable()
Deprecated.
|
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.
|
protected void |
initSelectionModel() |
boolean |
isAllowEmptyQuery()
When T the user can press search even when no criteria are entered.
|
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() |
boolean |
isReadOnly()
Returns T if the control is currently in readonly mode.
|
boolean |
isSearchImmediately()
When T this will immediately search with an empty query.
|
boolean |
isUseStretchedLayout()
Returns T if we are using stretching of result table height to all remained parent height.
|
void |
setAbsolutePopupLayoutQuirkMode(boolean value) |
void |
setAllowEmptyQuery(boolean allowEmptyQuery) |
void |
setAllowKeyWordSearch(boolean allowKeyWordSearch)
Setter for property
m_allowKeyWordSearch. |
void |
setCustomErrorMessageListener(IErrorMessageListener customErrorMessageListener) |
void |
setDisabled(boolean disabled)
Set the input to disabled mode.
|
void |
setFocus()
Claim the focus for this component.
|
void |
setFormRowRenderer(IClickableRowRenderer<OT> lookupFormRenderer)
When set this defines the
IClickableRowRenderer<OT> to use to render rows when the popup lookup form is used. |
void |
setFormTitle(String lookupTitle)
When set this defines the title of the lookup window.
|
void |
setHint(String text)
Set a hint text for this control, for some reason only on the select button??
|
void |
setIsLookupAllowed(IActionAllowed isLookupAllowed) |
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 |
setKeyWordSearchHandler(IKeyWordSearchQueryFactory<QT> keyWordSearchManipulator) |
void |
setKeyWordSearchPopupWidth(int keyWordSearchPopupWidth) |
void |
setKeywordSearchProperties(List<SearchPropertyMetaModel> keywordLookupPropertyList)
Not normally used; use
addKeywordProperty(String, int) instead. |
void |
setLookupForm(LookupForm<QT> externalLookupForm) |
void |
setLookupFormInitialization(LookupInputBase.ILookupFormModifier<QT> lookupFormInitialization) |
void |
setMandatory(boolean mandatory)
Make the control mandatory.
|
void |
setModified(boolean as)
Set or clear the modified by user flag.
|
void |
setOnValueChanged(IValueChanged<?> onValueChanged) |
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 |
setResultColumns(String... resultColumns)
DO NOT USE - this sets both dropdown columns AND full lookup form columns to the column spec passed...
|
void |
setSearchImmediately(boolean searchImmediately) |
void |
setSearchProperties(List<SearchPropertyMetaModel> searchPropertyList) |
void |
setSelectionCssClass(String cssClass)
Set custom css that would be applied only in case that component is rendering selected value.
|
void |
setUseStretchedLayout(boolean value)
Set to F to disable stretching of result table height.
|
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) |
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, getFocusID, 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 static final String MAGIC_ID_MARKER
public static final INodeContentRenderer<Object> DEFAULT_RENDERER
public LookupInputBase(@Nonnull Class<QT> queryClass, @Nonnull Class<OT> resultClass, @Nonnull String... resultColumns)
queryClass - resultClass - resultColumns - public LookupInputBase(@Nonnull Class<QT> queryClass, @Nonnull Class<OT> resultClass)
queryClass - public LookupInputBase(@Nonnull QCriteria<QT> rootCriteria, @Nonnull Class<OT> resultClass)
public LookupInputBase(@Nonnull Class<QT> queryClass, @Nonnull Class<OT> resultClass, @Nullable ClassMetaModel queryMetaModel, @Nullable ClassMetaModel outputMetaModel)
@Nonnull protected abstract ITableModel<OT> createTableModel(@Nonnull QCriteria<QT> query) throws Exception
query - Exception@Nonnull public HoverButton getClearButton()
public void createContent()
throws Exception
createContent in class NodeBaseException@Nonnull public FloatingWindow getFloater()
@Nonnull public IRowRenderer<OT> getActualFormRowRenderer()
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)
@Nullable public IValueChanged<?> getOnValueChanged()
getOnValueChanged in interface IHasChangeListenerpublic void setOnValueChanged(@Nullable IValueChanged<?> onValueChanged)
setOnValueChanged in interface IHasChangeListener@Nullable public IQueryManipulator<QT> getQueryManipulator()
@Nullable public IQueryHandler<QT> getQueryHandler()
public void setQueryHandler(@Nullable IQueryHandler<QT> queryHandler)
@Nullable public String getFormTitle()
public void setFormTitle(@Nullable String lookupTitle)
lookupTitle - public boolean isAllowEmptyQuery()
public void setAllowEmptyQuery(boolean allowEmptyQuery)
public void setQueryManipulator(@Nullable IQueryManipulator<QT> queryManipulator)
queryManipulator - @Nullable public LookupForm<QT> getLookupForm()
public void setLookupForm(@Nullable LookupForm<QT> externalLookupForm)
@Nullable public IErrorMessageListener getCustomErrorMessageListener()
public void setCustomErrorMessageListener(@Nullable IErrorMessageListener customErrorMessageListener)
public boolean isModified()
isModified in interface IHasModifiedIndicationIHasModifiedIndication.isModified()public void setModified(boolean as)
setModified in interface IHasModifiedIndicationIHasModifiedIndication.setModified(boolean)@Nullable public IActionAllowed getIsLookupAllowed()
public void setIsLookupAllowed(@Nullable IActionAllowed isLookupAllowed)
@Nullable public IKeyWordSearchQueryFactory<QT> getKeyWordSearchHandler()
public void setKeyWordSearchHandler(@Nullable IKeyWordSearchQueryFactory<QT> keyWordSearchManipulator)
public void setKeyWordSearchCssClass(@Nullable String cssClass)
cssClass - public void setSelectionCssClass(@Nullable String cssClass)
cssClass - public boolean isAllowKeyWordSearch()
m_allowKeyWordSearch.public void setAllowKeyWordSearch(boolean allowKeyWordSearch)
m_allowKeyWordSearch.@Nullable public String getKeySearchHint()
setKeySearchHint(java.lang.String).hint - public void setKeySearchHint(@Nullable String keySearchHint)
hint - 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 List<SearchPropertyMetaModel> getSearchProperties()
public void setSearchProperties(List<SearchPropertyMetaModel> searchPropertyList)
public void addKeywordProperty(@Nonnull String name)
name - @Deprecated @Nonnull public Table getTable()
@Deprecated @Nonnull public TBody getBody()
public int getKeyWordSearchPopupWidth()
public void setKeyWordSearchPopupWidth(int keyWordSearchPopupWidth)
public void setAbsolutePopupLayoutQuirkMode(boolean value)
public boolean isUseStretchedLayout()
public void setUseStretchedLayout(boolean value)
useStretchedLayout - public LookupInputBase.ILookupFormModifier<QT> getLookupFormInitialization()
public void setLookupFormInitialization(LookupInputBase.ILookupFormModifier<QT> lookupFormInitialization)
@Nonnull public Class<OT> getActualType()
getActualType in interface ITypedControl<OT>@Nonnull public ClassMetaModel getOutputMetaModel()
@Nonnull public ClassMetaModel getQueryMetaModel()
public void setValueColumns(String... columns)
LookupInputPropertyRenderer) to render the fields.columns - @Nullable public INodeContentRenderer<OT> getValueRenderer()
public void setValueRenderer(@Nullable INodeContentRenderer<OT> contentRenderer)
public void addFormColumns(@Nonnull Object... columns)
BasicRowRenderer.columns - public void addDropdownColumns(@Nonnull Object... columns)
BasicRowRenderer for the dropdown box
showing quick search results.columns - public void setResultColumns(@Nonnull String... resultColumns)
resultColumns - public boolean isSearchImmediately()
public void setSearchImmediately(boolean searchImmediately)
@Nullable public IClickableRowRenderer<OT> getFormRowRenderer()
IClickableRowRenderer<OT> to use to render rows when the popup lookup form is used.public void setFormRowRenderer(@Nullable IClickableRowRenderer<OT> lookupFormRenderer)
IClickableRowRenderer<OT> to use to render rows when the popup lookup form is used.lookupFormRenderer - protected boolean isPopupShown()
public boolean isFocusable()
isFocusable in class NodeBasepublic void setFocus()
NodeBaseCopyright © 2017 etc.to. All rights reserved.