|
||||||||||
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.Div
to.etc.domui.component.input.LookupInput<T>
public class LookupInput<T>
Lookup input field component. Additional description on use of stylesheets: LookupInput can have this states:
Field Summary | |
---|---|
static INodeContentRenderer<java.lang.Object> |
DEFAULT_RENDERER
|
Constructor Summary | |
---|---|
LookupInput(java.lang.Class<T> lookupClass)
Lookup a POJO Java bean persistent class. |
|
LookupInput(java.lang.Class<T> lookupClass,
ClassMetaModel metaModel)
|
|
LookupInput(java.lang.Class<T> lookupClass,
java.lang.String[] resultColumns)
|
Method Summary | |
---|---|
void |
addKeywordProperty(java.lang.String name)
Define a property to use for quick search. |
void |
addKeywordProperty(java.lang.String name,
int minlen)
Define a property to use for quick search. |
IBinder |
bind()
Return the binder for this control. |
void |
createContent()
|
TBody |
getBody()
|
INodeContentRenderer<T> |
getContentRenderer()
|
IErrorMessageListener |
getCustomErrorMessageListener()
|
LookupForm<T> |
getExternalLookupForm()
|
IActionAllowed |
getIsLookupAllowed()
|
java.lang.String |
getKeySearchHint()
Getter for keyword search hint. |
java.lang.String |
getKeyWordSearchCssClass()
|
IKeyWordSearchQueryFactory<T> |
getKeyWordSearchHandler()
|
java.lang.Integer |
getKeyWordSearchPopupWidth()
|
java.lang.Class<T> |
getLookupClass()
|
java.lang.String |
getLookupTitle()
When set this defines the title of the lookup window. |
ClassMetaModel |
getMetaModel()
|
IValueChanged<?> |
getOnValueChanged()
|
IQueryHandler<T> |
getQueryHandler()
The query handler to use, if a special one is needed. |
IQueryManipulator<T> |
getQueryManipulator()
When set the specified manipulator will be called before a query is sent to the database. |
java.lang.String[] |
getResultColumns()
|
java.util.List<SearchPropertyMetaModel> |
getSearchProperties()
Set the list of lookup properties to use for lookup in the lookup form, when shown. |
Table |
getTable()
|
T |
getValue()
Returns the current value of this input component. |
T |
getValueSafe()
Like IDisplayControl.getValue() this returns the value of the component, but this returns null
if the value was invalid. |
boolean |
hasError()
Return T if this node currently has an error associated with it. |
boolean |
isAllowEmptyQuery()
When T the user can press search even when no criteria are entered. |
boolean |
isAllowKeyWordSearch()
Getter for property m_allowKeyWordSearch . |
boolean |
isBound()
Returns T if this control is bound to some data value. |
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. |
boolean |
isUseStretchedLayout()
Returns T if we are using stretching of result table height to all remained parent height. |
void |
setAllowEmptyQuery(boolean allowEmptyQuery)
|
void |
setAllowKeyWordSearch(boolean allowKeyWordSearch)
Setter for property m_allowKeyWordSearch . |
void |
setContentRenderer(INodeContentRenderer<T> contentRenderer)
|
void |
setCustomErrorMessageListener(IErrorMessageListener customErrorMessageListener)
|
void |
setDisabled(boolean disabled)
Set the input to disabled mode. |
void |
setExternalLookupForm(LookupForm<T> externalLookupForm)
|
void |
setHint(java.lang.String text)
|
void |
setIsLookupAllowed(IActionAllowed isLookupAllowed)
|
void |
setKeySearchHint(java.lang.String keySearchHint)
Set hint to keyword search input. |
void |
setKeyWordSearchCssClass(java.lang.String cssClass)
Set custom css that would be applied only in case that component is rendering keyWordSearch. |
void |
setKeyWordSearchHandler(IKeyWordSearchQueryFactory<T> keyWordSearchManipulator)
|
void |
setKeyWordSearchPopupWidth(java.lang.Integer keyWordSearchPopupWidth)
|
void |
setKeywordSearchProperties(java.util.List<SearchPropertyMetaModel> keywordLookupPropertyList)
|
void |
setLookupTitle(java.lang.String lookupTitle)
When set this defines the title of the lookup window. |
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<T> queryHandler)
|
void |
setQueryManipulator(IQueryManipulator<T> 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(java.lang.String[] resultColumns)
|
void |
setSearchProperties(java.util.List<SearchPropertyMetaModel> searchPropertyList)
|
void |
setUseStretchedLayout(boolean value)
Set to F to disable stretching of result table height. |
void |
setValue(T v)
Sets a new value. |
Methods inherited from class to.etc.domui.dom.html.Div |
---|
afterCreateContent, componentHandleWebAction, fadeIn, fadeOut, getCustomUpdatesCallJS, getDragHandler, getDropBody, getDropHandler, getDropMode, getReturnPressed, setDragHandler, setDropBody, setDropHandler, setReturnPressed, slideDown, slideUp, tb, visit |
Methods inherited from class to.etc.domui.dom.html.NodeContainer |
---|
add, add, add, addTable, canContain, 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, setErrorLocation |
Methods inherited from interface to.etc.domui.dom.html.IDisplayControl |
---|
setTestID |
Methods inherited from interface to.etc.domui.dom.html.IActionControl |
---|
setTestID |
Methods inherited from interface to.etc.domui.dom.errors.INodeErrorDelegate |
---|
clearMessage, getMessage, setMessage |
Field Detail |
---|
public static final INodeContentRenderer<java.lang.Object> DEFAULT_RENDERER
Constructor Detail |
---|
public LookupInput(java.lang.Class<T> lookupClass, java.lang.String[] resultColumns)
public LookupInput(java.lang.Class<T> lookupClass)
lookupClass
- public LookupInput(java.lang.Class<T> lookupClass, ClassMetaModel metaModel)
Method Detail |
---|
public java.lang.Class<T> getLookupClass()
public ClassMetaModel getMetaModel()
public INodeContentRenderer<T> getContentRenderer()
public void setContentRenderer(INodeContentRenderer<T> contentRenderer)
public void createContent() throws java.lang.Exception
createContent
in class NodeBase
java.lang.Exception
public void setHint(java.lang.String text)
public boolean isMandatory()
IControl
isMandatory
in interface IControl<T>
public void setMandatory(boolean mandatory)
IControl
setMandatory
in interface IControl<T>
public boolean isReadOnly()
IControl
isReadOnly
in interface IControl<T>
public void setReadOnly(boolean readOnly)
IControl
setReadOnly
in interface IControl<T>
public boolean isDisabled()
IControl
isDisabled
in interface IControl<T>
public void setDisabled(boolean disabled)
IActionControl
setDisabled
in interface IActionControl
public T 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<T>
IDisplayControl.getValue()
public T 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<T>
IControl.getValueSafe()
public boolean hasError()
NodeBase
hasError
in interface IControl<T>
hasError
in class NodeBase
IControl.hasError()
public void setValue(T v)
setValue
in interface IDisplayControl<T>
IDisplayControl.setValue(java.lang.Object)
public IValueChanged<?> getOnValueChanged()
getOnValueChanged
in interface IHasChangeListener
IHasChangeListener.getOnValueChanged()
public void setOnValueChanged(IValueChanged<?> onValueChanged)
setOnValueChanged
in interface IHasChangeListener
IHasChangeListener.setOnValueChanged(to.etc.domui.dom.html.IValueChanged)
public IQueryManipulator<T> getQueryManipulator()
public IQueryHandler<T> getQueryHandler()
public void setQueryHandler(IQueryHandler<T> queryHandler)
public java.lang.String getLookupTitle()
public void setLookupTitle(java.lang.String lookupTitle)
lookupTitle
- public boolean isAllowEmptyQuery()
public void setAllowEmptyQuery(boolean allowEmptyQuery)
public void setQueryManipulator(IQueryManipulator<T> queryManipulator)
queryManipulator
- public LookupForm<T> getExternalLookupForm()
public void setExternalLookupForm(LookupForm<T> externalLookupForm)
public java.lang.String[] getResultColumns()
public void setResultColumns(java.lang.String[] resultColumns)
public IErrorMessageListener getCustomErrorMessageListener()
public void setCustomErrorMessageListener(IErrorMessageListener customErrorMessageListener)
public boolean isModified()
isModified
in interface IHasModifiedIndication
IHasModifiedIndication.isModified()
public void setModified(boolean as)
setModified
in interface IHasModifiedIndication
IHasModifiedIndication.setModified(boolean)
public IBinder bind()
bind
in interface IBindable
IBindable.bind()
public boolean isBound()
isBound
in interface IBindable
IBindable.isBound()
public IActionAllowed getIsLookupAllowed()
public void setIsLookupAllowed(IActionAllowed isLookupAllowed)
public IKeyWordSearchQueryFactory<T> getKeyWordSearchHandler()
public void setKeyWordSearchHandler(IKeyWordSearchQueryFactory<T> keyWordSearchManipulator)
public java.lang.String getKeyWordSearchCssClass()
public void setKeyWordSearchCssClass(java.lang.String cssClass)
cssClass
- public boolean isAllowKeyWordSearch()
m_allowKeyWordSearch
.
public void setAllowKeyWordSearch(boolean allowKeyWordSearch)
m_allowKeyWordSearch
.
public java.lang.String getKeySearchHint()
setKeySearchHint(java.lang.String)
.
hint
- public void setKeySearchHint(java.lang.String keySearchHint)
hint
- public void addKeywordProperty(java.lang.String name, int minlen)
name
- minlen
- public void setKeywordSearchProperties(java.util.List<SearchPropertyMetaModel> keywordLookupPropertyList)
public java.util.List<SearchPropertyMetaModel> getSearchProperties()
public void setSearchProperties(java.util.List<SearchPropertyMetaModel> searchPropertyList)
public void addKeywordProperty(java.lang.String name)
name
- public Table getTable()
public TBody getBody()
public java.lang.Integer getKeyWordSearchPopupWidth()
public void setKeyWordSearchPopupWidth(java.lang.Integer keyWordSearchPopupWidth)
public boolean isUseStretchedLayout()
public void setUseStretchedLayout(boolean value)
useStretchedLayout
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |