Package com.saperion.ngc.iform.field
Class LookupTextField
java.lang.Object
org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zul.impl.XulElement
org.zkoss.zul.impl.InputElement
org.zkoss.zul.Textbox
org.zkoss.zul.Bandbox
com.saperion.ngc.iform.field.LookupTextField
- All Implemented Interfaces:
EventChild
,IntelligentField
,LookupField
,Localized
,Identifiable
,Serializable
,Cloneable
,org.zkoss.zk.ui.Component
,org.zkoss.zk.ui.ext.Disable
,org.zkoss.zk.ui.ext.Readonly
,org.zkoss.zk.ui.ext.Scope
,org.zkoss.zk.ui.sys.ComponentCtrl
,org.zkoss.zul.ext.Constrainted
public class LookupTextField
extends org.zkoss.zul.Bandbox
implements IntelligentField, Identifiable, LookupField
This field is used for two purposes:
1) A textbox with a popup used to display the values of a lookup-table. Once the user selected an entry in the result list in the popup, the properties of the selected row are stored in an attribute named "selectedRow". Additionally an event named "onLookupSelected" containing the current selection is fired.
2) A textbox with a popup containing a fixed set of predefined values. The user is able to select any number of these values by checking the rows in the list with the items. This functionality is enabled by setting a value for "Form" and removing the checkmark from "Show Buttons" in the forms-designer. The predefined values entered in "Form" can be replaced with other values by using the setMultiSearchItems method.
1) A textbox with a popup used to display the values of a lookup-table. Once the user selected an entry in the result list in the popup, the properties of the selected row are stored in an attribute named "selectedRow". Additionally an event named "onLookupSelected" containing the current selection is fired.
2) A textbox with a popup containing a fixed set of predefined values. The user is able to select any number of these values by checking the rows in the list with the items. This functionality is enabled by setting a value for "Form" and removing the checkmark from "Show Buttons" in the forms-designer. The predefined values entered in "Form" can be replaced with other values by using the setMultiSearchItems method.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrl
Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.AbstractComponent.Children
Nested classes/interfaces inherited from interface com.saperion.ngc.iform.field.IntelligentField
IntelligentField.ElementType
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Delimiter for multiedit.static final String
Deprecated.static final String
Name of the attribute containing the selected row.Fields inherited from class org.zkoss.zul.impl.InputElement
_value
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
_zclass
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
Fields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
Fields inherited from interface com.saperion.ngc.events.EventChild
ALL_EVENTS, ON_ADD_LINK, ON_ADD_LOOKUP, ON_ADD_TO_FAVORITES, ON_AFTER_QUERY, ON_BUTTON, ON_BUTTON_QUERY, ON_CANCEL, ON_CANCEL_AND, ON_CANCEL_EDIT, ON_CHANGE_DOCUMENT_SECURITY, ON_CHANGE_FOLDER_SECURITY, ON_CLEAR, ON_DELETE_SELECTED, ON_DISPLAY_POPUP, ON_DISPLAY_RESULTITEM, ON_DISPLAY_TEMPORARY_DOCUMENT, ON_DOCUMENT_ADDED, ON_DOCUMENT_CHECK, ON_DOCUMENT_FILING, ON_DOCUMENT_LOCKED, ON_DOCUMENT_PROLONG_RETENTION, ON_DOCUMENT_REDUCE_DISPOSITION, ON_DOCUMENT_RELEASE, ON_DOWNLOAD_RESULTITEM, ON_EDIT_CONTENT, ON_EDIT_FOLDER, ON_EDIT_ITEM, ON_EDIT_ITEM_SELECTED, ON_EDIT_LOOKUP, ON_EDIT_SELECTED, ON_EDIT_STRUCTURE, ON_EXPORT, ON_EXTERNAL_STORAGE_UPLOAD, ON_EXTERNAL_STORAGE_UPLOAD_STATUS, ON_FAST_ACCESS_DRAG_OVER, ON_FIELD_CHANGE, ON_FILE_ACTION, ON_FILE_PREVIEW, ON_FILE_SEARCH, ON_FORM_CREATED, ON_FORM_RENDER_ERROR, ON_FORWARD, ON_IGNORE, ON_INDEX, ON_INDEX_CLEAR, ON_INDEX_RESULTITEM, ON_ITEM_DOUBLECLICK, ON_LAUNCH_WORKFLOW, ON_LOG, ON_LOGON, ON_MACRO, ON_NAVIGATION, ON_NAVIGATION_FOLDER, ON_NAVIGATION_FORM, ON_NAVIGATION_WEBPART, ON_NEW_ITEM, ON_NEW_SELECTED, ON_OK, ON_ONEDRIVE_LOGIN, ON_OPEN_INDEX_MASK, ON_OPEN_MASK, ON_OPEN_QUERY_MASK, ON_PASSWORD_EXPIRED, ON_PRINT_DOCUMENTS, ON_QUERY, ON_QUERY_FAVORITE, ON_REFRESH, ON_REFRESH_FOLDER, ON_RESET_GUI, ON_REVISION_CREATED, ON_SAVE_AND, ON_SAVE_DOC, ON_SAVE_FOLDER, ON_SCROLL_NODE, ON_SELECT_TREE_ITEM, ON_SELECTDDC, ON_SEND_MAIL_RESULTITEM, ON_SET_LITIGATION_HOLD, ON_SHAREBASE_DOCUMENT_CHECK, ON_SHAREBASE_LOGIN, ON_START_WORKFLOW, ON_TAB_SELECTED, ON_UNDELETE_SELECTED, ON_UPLOAD_DOCUMENT, ON_UPLOAD_EXTERNAL_STORAGE_DOCUMENT, ON_UPLOAD_SUCCESS, ON_VARIABLES_AVAILABLE, ON_WF, ON_WF_COMMENT_DIALOG_CANCEL, ON_WF_COMMENT_DIALOG_OK, ON_WFCOMMENTS, ON_WFDELEGATE, ON_WFFORWARD, ON_WFFORWARD1, ON_WFFORWARD2, ON_WFFORWARD3, ON_WFFORWARD4, ON_WFFORWARD5, ON_WFHISTORY, ON_WFPUTBACK, ON_WFREMINDER, ON_WFTAKE, ON_WORKFLOW_ACTION, ON_WORKFLOW_COMMENT, ON_WORKFLOW_DISPLAY_COMMENT
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.LookupTextField
(com.saperion.ngc.iform.xml.EditFieldType type, com.saperion.ngc.iform.xml.PosType panePos, FormMode mode, boolean isNoLocalization) Constructor.LookupTextField
(String value) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCondition
(String fieldName, Object value, com.saperion.constants.SaConstants.SaFieldType fieldType) Adds a condition to the field that will be used to search for items displayed in the field's result list.void
addCondition
(String fieldName, Object value, com.saperion.constants.SaConstants.SaFieldType fieldType, boolean multiValue) Adds a condition to the field that will be used to search for items displayed in the field's result list.void
clear()
Clears the value(s) of this field.void
Clears the selected row from the field.void
doChangeValue
(org.zkoss.zk.ui.event.Event event) long
long
int
com.saperion.ngc.iform.xml.EditFieldType
Returns the EditFieldType defining the properties of this field.Returns the type of this element.short
Set<org.zkoss.zk.ui.Component>
getEventtarget
(String eventName) Reads the event target for the given event name, if set or the root element.Returns the name of the field.getFName()
com.saperion.ngc.iform.xml.FontType
getFont()
Integer[]
getLimit()
Returns the limit of this field (upper, lower or both).long
com.saperion.ngc.iform.xml.OverrideKindType
Returns the parent form or null if this field is not part of a form.com.saperion.ngc.iform.xml.PosType
getPos()
com.saperion.intf.SaPropertyValue
Returns the current value of the field asSaPropertyValue
.Double[]
int
int
Returns a bean containing the current value, type, name and limit of this field.Returns the selected row in the lookup table belonging to this lookup field.short
int
int
int
boolean
boolean
boolean
boolean
boolean
Returns true if the value of this field was changed.boolean
Performs a validation and returns true, if the content is valid.boolean
isEmpty()
boolean
Returns the fieldInactive parameter.boolean
boolean
isIsVar()
boolean
boolean
Returns the noLocalize parameter.boolean
boolean
gets the readonly state of this field.boolean
boolean
boolean
boolean
isValid()
void
onCancelEdit
(org.zkoss.zk.ui.event.Event event) Event handler for cancel edit event.void
onChange
(org.zkoss.zk.ui.event.Event event) void
onCreate
(org.zkoss.zk.ui.event.Event event) void
onIndexChange
(org.zkoss.zk.ui.event.Event event) Event handler for index changes.void
onIndexClear
(org.zkoss.zk.ui.event.Event event) Event handler for index clear.void
onOK
(org.zkoss.zk.ui.event.Event event) void
onOpen
(org.zkoss.zk.ui.event.Event event) void
onPageAttached
(org.zkoss.zk.ui.Page newPage, org.zkoss.zk.ui.Page oldPage) void
onPageDetached
(org.zkoss.zk.ui.Page page) void
onVariablesAvailable
(org.zkoss.zk.ui.event.Event event) Event handler for variablesAvailableEvent.void
open()
void
postFieldChangeEvent
(ResultProperty property) Posts a FieldChangeEvent.void
Posts a FormButtonEvent.void
removeCondition
(String fieldName) Removes a condition from the field.void
setAlign
(com.saperion.ngc.iform.xml.AlignType value) void
setAllowInactiveLookup
(boolean value) void
setAutoComplete
(boolean value) void
setBEnabled
(boolean value) void
setBPersistent
(boolean value) void
Sets the changed-property of this field to true.void
setChangedImplicitly
(boolean fireChangedEvent) Sets the changed-property of this field to true.void
setColorError
(long value) void
setColorOk
(long value) void
setConditionField
(int value) void
setDefaultValue
(String valueAsString) Sets the default value.void
setDisabled
(boolean disabled) Sets the disabled state of this field.void
setEnableMaximize
(short value) void
Starts event handling on enter key.void
setEventtarget
(org.zkoss.zk.ui.Component comp, String eventName) Set the event target.void
setFieldInactive
(boolean inactive) Sets the fieldInactive parameter.void
setFieldName
(String name) Sets the name of the field.void
void
setFont
(com.saperion.ngc.iform.xml.FontType value) void
setHideButtons
(boolean value) void
setIsVar
(boolean value) void
Sets the limit type.void
setListVersion
(long value) void
setMandatory
(com.saperion.ngc.iform.xml.OverrideKindType value) void
setMultiSearchItems
(String[] values) Sets the values to display for multi-selection.void
setNoLocalize
(boolean value) Sets the noLocalize parameter that can be used to disable localization of this component.void
setPersistVar
(boolean value) void
setPos
(com.saperion.ngc.iform.xml.PosType value) void
setReadonly
(boolean readonly) Sets the readonle state of this field.void
setResFieldCnt
(int value) void
setResStyle
(int value) void
setRestrictCursor
(boolean value) void
setSaveLayout
(boolean value) void
void
setUseCalendar
(boolean value) void
setValue
(com.saperion.intf.SaPropertyValue val) Sets the value of this field.void
setValueImplicitly
(com.saperion.intf.SaPropertyValue val) Sets the value of this field and sets the changed-property of this field to true.void
setValueImplicitly
(com.saperion.intf.SaPropertyValue value, boolean fireChangedEvent) Sets the value of this field and sets the changed-property of this field to true.void
setVarDataType
(short value) void
setWxCombo
(int value) void
setWyCombo
(int value) void
setXCombo
(int value) toString()
void
updateAttribute
(String attr, Object value) Performs a smartUpdate on the specified attribute.void
validate()
Starts validation of the field.Methods inherited from class org.zkoss.zul.Bandbox
beforeChildAdded, close, getDropdown, getIconSclass, getPopupWidth, getZclass, isAutodrop, isButtonVisible, isChildable, isOpen, renderProperties, service, setAutodrop, setButtonVisible, setIconSclass, setMultiline, setOpen, setPopupWidth, setRows
Methods inherited from class org.zkoss.zul.Textbox
checkBeforeSetRows, clone, coerceFromString, coerceToString, getPropertyAccess, getRows, getType, getValue, isMultiline, isSubmitByEnter, isTabbable, setHeight, setSubmitByEnter, setTabbable, setType, setValue, setVflex
Methods inherited from class org.zkoss.zul.impl.InputElement
checkUserError, clearErrorMessage, clearErrorMessage, getCols, getConstraint, getErrorboxIconSclass, getErrorboxSclass, getErrorMessage, getInputAttributes, getInstant, getMaxlength, getName, getPlaceholder, getRawText, getRawValue, getTargetValue, getText, isDisabled, isInplace, isInstant, marshall, onWrongValue, select, setCols, setConstraint, setConstraint, setErrorboxIconSclass, setErrorboxSclass, setErrorMessage, setInplace, setInputAttributes, setInputAttributes, setInsertedText, setInstant, setMaxlength, setName, setPlaceholder, setRawValue, setSelectedText, setSelectionRange, setValueDirectly, showCustomError, unmarshall, validate
Methods inherited from class org.zkoss.zul.impl.XulElement
getContext, getCtrlKeys, getPopup, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributes
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addSclass, evalCSSFlex, focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, removeSclass, removeSclass, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, invalidate, invalidatePartial, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.zkoss.zk.ui.Component
addEventListener, addEventListener, addForward, addForward, addForward, addForward, appendChild, applyProperties, clone, detach, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getChildren, getClientAttribute, getClientDataAttribute, getDefinition, getDesktop, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getShadowVariable, getShadowVariable, getSpaceOwner, getStubonly, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttributeOrFellow, hasFellow, hasFellow, insertBefore, invalidate, isInvalidated, isListenerAvailable, isVisible, query, queryAll, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setTemplate, setVisible, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride
Methods inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
invalidatePartial
Methods inherited from interface com.saperion.ngc.iform.field.IntelligentField
attachClientScripts, attachScripts, attachServerScripts, clearErrorMessage, detachScripts, focus, getTabindex, setTabindex
Methods inherited from interface org.zkoss.zk.ui.ext.Scope
addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute
-
Field Details
-
SELECTED_ROW_ATTRIBUTE
Name of the attribute containing the selected row.- See Also:
-
ON_LOOKUP_SELECTED
Deprecated.Constant has been replaced withLookupField.ON_LOOKUP_SELECTED
.Name of the event fired when the user selected a lookup entry.- See Also:
-
DELIMITER
Delimiter for multiedit.- See Also:
-
-
Constructor Details
-
LookupTextField
public LookupTextField(com.saperion.ngc.iform.xml.EditFieldType type, com.saperion.ngc.iform.xml.PosType panePos, FormMode mode, boolean isNoLocalization) throws SystemException, AuthenticationException Constructor.- Parameters:
type
- Field typepanePos
- Pane positionmode
- the mode of the parent formisNoLocalization
- isNoLocalization- Throws:
AuthenticationException
- authentication error when creating fieldSystemException
- system exception when creating field
-
LookupTextField
Constructor. -
LookupTextField
Constructor.- Parameters:
value
- Value throws WrongValueException Wrong value
-
-
Method Details
-
open
public void open()- Overrides:
open
in classorg.zkoss.zul.Bandbox
- See Also:
-
Bandbox.open()
-
onOpen
public void onOpen(org.zkoss.zk.ui.event.Event event) - Parameters:
event
- Open event
-
onCreate
public void onCreate(org.zkoss.zk.ui.event.Event event) - Parameters:
event
- Create event.
-
onChange
public void onChange(org.zkoss.zk.ui.event.Event event) - Parameters:
event
- Change event.
-
onOK
public void onOK(org.zkoss.zk.ui.event.Event event) - Parameters:
event
- OK event.
-
onPageAttached
public void onPageAttached(org.zkoss.zk.ui.Page newPage, org.zkoss.zk.ui.Page oldPage) - Specified by:
onPageAttached
in interfaceorg.zkoss.zk.ui.sys.ComponentCtrl
- Overrides:
onPageAttached
in classorg.zkoss.zk.ui.AbstractComponent
- See Also:
-
AbstractComponent.onPageAttached(org.zkoss.zk.ui.Page, org.zkoss.zk.ui.Page)
-
onPageDetached
public void onPageDetached(org.zkoss.zk.ui.Page page) - Specified by:
onPageDetached
in interfaceorg.zkoss.zk.ui.sys.ComponentCtrl
- Overrides:
onPageDetached
in classorg.zkoss.zk.ui.AbstractComponent
- See Also:
-
AbstractComponent.onPageDetached(org.zkoss.zk.ui.Page)
-
onIndexChange
public void onIndexChange(org.zkoss.zk.ui.event.Event event) Event handler for index changes.- Specified by:
onIndexChange
in interfaceIntelligentField
- Parameters:
event
- Event- See Also:
-
onVariablesAvailable
public void onVariablesAvailable(org.zkoss.zk.ui.event.Event event) Event handler for variablesAvailableEvent. The event-object sent does not contain data. To retrieve variables, useIntelligentFormView.getIndexMaskDocument()
.- Specified by:
onVariablesAvailable
in interfaceIntelligentField
- Parameters:
event
- Event- See Also:
-
onCancelEdit
public void onCancelEdit(org.zkoss.zk.ui.event.Event event) Event handler for cancel edit event.- Specified by:
onCancelEdit
in interfaceIntelligentField
- Parameters:
event
- event- See Also:
-
setValue
public void setValue(com.saperion.intf.SaPropertyValue val) Sets the value of this field.- Specified by:
setValue
in interfaceIntelligentField
- Parameters:
val
- value- See Also:
-
getPropertyValue
public com.saperion.intf.SaPropertyValue getPropertyValue()Description copied from interface:IntelligentField
Returns the current value of the field asSaPropertyValue
.- Specified by:
getPropertyValue
in interfaceIntelligentField
- Returns:
- the field's current value
-
setText
- Overrides:
setText
in classorg.zkoss.zul.impl.InputElement
- Throws:
org.zkoss.zk.ui.WrongValueException
-
setValueImplicitly
public void setValueImplicitly(com.saperion.intf.SaPropertyValue val) Sets the value of this field and sets the changed-property of this field to true.- Specified by:
setValueImplicitly
in interfaceIntelligentField
- Parameters:
val
- value- See Also:
-
setValueImplicitly
public void setValueImplicitly(com.saperion.intf.SaPropertyValue value, boolean fireChangedEvent) Sets the value of this field and sets the changed-property of this field to true.- Specified by:
setValueImplicitly
in interfaceIntelligentField
- Parameters:
value
- valuefireChangedEvent
- if true, aEvents.ON_CHANGE
event will be fired after the value was set- See Also:
-
getIntValue
- Returns:
- Integer value, if this is a integer field.
-
getRealValue
- Returns:
- Double value, if this is a double field.
-
getIntValues
- Returns:
- Integer value, if this is a integer field.
-
getRealValues
- Returns:
- Double value, if this is a double field.
-
isMultiSelect
public boolean isMultiSelect()- Returns:
- True, if field is multiselect.
-
onIndexClear
public void onIndexClear(org.zkoss.zk.ui.event.Event event) Event handler for index clear.- Specified by:
onIndexClear
in interfaceIntelligentField
- Parameters:
event
- Event- See Also:
-
isChanged
public boolean isChanged()Returns true if the value of this field was changed.- Specified by:
isChanged
in interfaceIntelligentField
- Returns:
- Value is changed.
- See Also:
-
setEventOnOk
Starts event handling on enter key.- Specified by:
setEventOnOk
in interfaceIntelligentField
- Parameters:
type
- Event type- See Also:
-
doChangeValue
public void doChangeValue(org.zkoss.zk.ui.event.Event event) - Specified by:
doChangeValue
in interfaceIntelligentField
- Parameters:
event
- Event- See Also:
-
getColorError
public long getColorError()- Returns:
- Value
- See Also:
-
EditFieldType.getColorError()
-
getColorOk
public long getColorOk()- Returns:
- Value
- See Also:
-
EditFieldType.getColorOk()
-
getConditionField
public int getConditionField()- Returns:
- Value
- See Also:
-
EditFieldType.getConditionField()
-
getEnableMaximize
public short getEnableMaximize()- Returns:
- Value
- See Also:
-
EditFieldType.getEnableMaximize()
-
getFName
- Returns:
- Value
- See Also:
-
EditFieldType.getFName()
-
getFont
public com.saperion.ngc.iform.xml.FontType getFont()- Returns:
- Value
- See Also:
-
EditFieldType.getFont()
-
getLimit
Description copied from interface:IntelligentField
Returns the limit of this field (upper, lower or both).- Specified by:
getLimit
in interfaceIntelligentField
- Returns:
- Value
- See Also:
-
EditFieldType.getLimit()
-
getListVersion
public long getListVersion()- Returns:
- Value
- See Also:
-
EditFieldType.getListVersion()
-
getMandatory
public com.saperion.ngc.iform.xml.OverrideKindType getMandatory()- Returns:
- Value
- See Also:
-
EditFieldType.getMandatory()
-
getPos
public com.saperion.ngc.iform.xml.PosType getPos()- Returns:
- Value
- See Also:
-
EditFieldType.getPos()
-
getResFieldCnt
public int getResFieldCnt()- Returns:
- Value
- See Also:
-
EditFieldType.getResFieldCnt()
-
getResStyle
public int getResStyle()- Returns:
- Value
- See Also:
-
EditFieldType.getResStyle()
-
getVarDataType
public short getVarDataType()- Returns:
- Value
- See Also:
-
EditFieldType.getVarDataType()
-
getWxCombo
public int getWxCombo()- Returns:
- Value
- See Also:
-
EditFieldType.getWxCombo()
-
getWyCombo
public int getWyCombo()- Returns:
- Value
- See Also:
-
EditFieldType.getWyCombo()
-
getXCombo
public int getXCombo()- Returns:
- Value
- See Also:
-
EditFieldType.getXCombo()
-
isAllowInactiveLookup
public boolean isAllowInactiveLookup()- Returns:
- Value
- See Also:
-
EditFieldType.isAllowInactiveLookup()
-
isAutoComplete
public boolean isAutoComplete()- Returns:
- Value
- See Also:
-
EditFieldType.isAutoComplete()
-
isBEnabled
public boolean isBEnabled()- Returns:
- Value
- See Also:
-
EditFieldType.isBEnabled()
-
isBPersistent
public boolean isBPersistent()- Returns:
- Value
- See Also:
-
EditFieldType.isBPersistent()
-
isHideButtons
public boolean isHideButtons()- Returns:
- Value
- See Also:
-
EditFieldType.isHideButtons()
-
isIsVar
public boolean isIsVar()- Returns:
- Value
- See Also:
-
EditFieldType.isIsVar()
-
isPersistVar
public boolean isPersistVar()- Returns:
- Value
- See Also:
-
EditFieldType.isPersistVar()
-
isRestrictCursor
public boolean isRestrictCursor()- Returns:
- Value
- See Also:
-
EditFieldType.isRestrictCursor()
-
isSaveLayout
public boolean isSaveLayout()- Returns:
- Value
- See Also:
-
EditFieldType.isSaveLayout()
-
isUseCalendar
public boolean isUseCalendar()- Returns:
- Value
- See Also:
-
EditFieldType.isUseCalendar()
-
setAlign
public void setAlign(com.saperion.ngc.iform.xml.AlignType value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setAlign(com.saperion.ngc.iform.xml.AlignType)
-
setAllowInactiveLookup
public void setAllowInactiveLookup(boolean value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setAllowInactiveLookup(boolean)
-
setAutoComplete
public void setAutoComplete(boolean value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setAutoComplete(boolean)
-
setBEnabled
public void setBEnabled(boolean value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setBEnabled(boolean)
-
setBPersistent
public void setBPersistent(boolean value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setBPersistent(boolean)
-
setColorError
public void setColorError(long value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setColorError(long)
-
setColorOk
public void setColorOk(long value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setColorOk(long)
-
setConditionField
public void setConditionField(int value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setConditionField(int)
-
setEnableMaximize
public void setEnableMaximize(short value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setEnableMaximize(short)
-
setFName
- Parameters:
value
- Value- See Also:
-
EditFieldType.setFName(java.lang.String)
-
setFont
public void setFont(com.saperion.ngc.iform.xml.FontType value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setFont(com.saperion.ngc.iform.xml.FontType)
-
setHideButtons
public void setHideButtons(boolean value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setHideButtons(boolean)
-
setIsVar
public void setIsVar(boolean value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setIsVar(boolean)
-
setLimit
Description copied from interface:IntelligentField
Sets the limit type. Possible values are: 'lower', 'upper', 'both'.- Specified by:
setLimit
in interfaceIntelligentField
- Parameters:
value
- Value- See Also:
-
EditFieldType.setLimit(com.saperion.ngc.iform.xml.LimitType)
-
setListVersion
public void setListVersion(long value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setListVersion(long)
-
setMandatory
public void setMandatory(com.saperion.ngc.iform.xml.OverrideKindType value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setMandatory(com.saperion.ngc.iform.xml.OverrideKindType)
-
setPersistVar
public void setPersistVar(boolean value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setPersistVar(boolean)
-
setPos
public void setPos(com.saperion.ngc.iform.xml.PosType value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setPos(com.saperion.ngc.iform.xml.PosType)
-
setResFieldCnt
public void setResFieldCnt(int value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setResFieldCnt(int)
-
setResStyle
public void setResStyle(int value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setResStyle(int)
-
setRestrictCursor
public void setRestrictCursor(boolean value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setRestrictCursor(boolean)
-
setSaveLayout
public void setSaveLayout(boolean value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setSaveLayout(boolean)
-
setUseCalendar
public void setUseCalendar(boolean value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setUseCalendar(boolean)
-
setVarDataType
public void setVarDataType(short value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setVarDataType(short)
-
setWxCombo
public void setWxCombo(int value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setWxCombo(int)
-
setWyCombo
public void setWyCombo(int value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setWyCombo(int)
-
setXCombo
public void setXCombo(int value) - Parameters:
value
- Value- See Also:
-
EditFieldType.setXCombo(int)
-
getElementType
Returns the type of this element. The type defines the kind of data and control used for this IntelligentField. SeeIntelligentField.ElementType
for a list of types.- Specified by:
getElementType
in interfaceIntelligentField
- Returns:
- Element type
- See Also:
-
getResultBean
Returns a bean containing the current value, type, name and limit of this field.- Specified by:
getResultBean
in interfaceIntelligentField
- Returns:
- Result bean
- See Also:
-
getEventtarget
Reads the event target for the given event name, if set or the root element.- Specified by:
getEventtarget
in interfaceEventChild
- Parameters:
eventName
- Event name or null for main target- Returns:
- Set of event targets
- See Also:
-
setEventtarget
Set the event target.- Specified by:
setEventtarget
in interfaceEventChild
- Parameters:
comp
- Event targeteventName
- Event name or null for main target- See Also:
-
postFormButtonEvent
Posts a FormButtonEvent.- Parameters:
info
- information about the button pressed.- See Also:
-
postFieldChangeEvent
Posts a FieldChangeEvent.- Parameters:
property
- the property that was changed- See Also:
-
getFieldName
Returns the name of the field.- Specified by:
getFieldName
in interfaceIntelligentField
- Returns:
- Field name
- See Also:
-
isContentValid
public boolean isContentValid()Performs a validation and returns true, if the content is valid.- Specified by:
isContentValid
in interfaceIntelligentField
- Returns:
- Field content is valid.
- See Also:
-
isValid
public boolean isValid()- Overrides:
isValid
in classorg.zkoss.zul.impl.InputElement
- See Also:
-
InputElement.isValid()
-
getEditField
public com.saperion.ngc.iform.xml.EditFieldType getEditField()Returns the EditFieldType defining the properties of this field.- Specified by:
getEditField
in interfaceIntelligentField
- Returns:
- the edit field
- See Also:
-
getFormMode
- Returns:
- An instance of
FormMode
-
setDefaultValue
Sets the default value.- Specified by:
setDefaultValue
in interfaceIntelligentField
- Parameters:
valueAsString
- string representation of value- See Also:
-
setFieldInactive
public void setFieldInactive(boolean inactive) Sets the fieldInactive parameter. Same assetReadonly(inactive)
.- Specified by:
setFieldInactive
in interfaceIntelligentField
- Parameters:
inactive
- value- See Also:
-
setReadonly
public void setReadonly(boolean readonly) Sets the readonle state of this field.- Specified by:
setReadonly
in interfaceIntelligentField
- Specified by:
setReadonly
in interfaceorg.zkoss.zk.ui.ext.Readonly
- Overrides:
setReadonly
in classorg.zkoss.zul.impl.InputElement
- Parameters:
readonly
- readonly- See Also:
-
InputElement.setReadonly(boolean)
-
isReadonly
public boolean isReadonly()gets the readonly state of this field.- Specified by:
isReadonly
in interfaceIntelligentField
- Specified by:
isReadonly
in interfaceorg.zkoss.zk.ui.ext.Readonly
- Overrides:
isReadonly
in classorg.zkoss.zul.impl.InputElement
- See Also:
-
InputElement.setReadonly(boolean)
-
isFieldInactive
public boolean isFieldInactive()Returns the fieldInactive parameter.- Specified by:
isFieldInactive
in interfaceIntelligentField
- Returns:
- fieldInactive
- See Also:
-
setDisabled
public void setDisabled(boolean disabled) Sets the disabled state of this field.- Specified by:
setDisabled
in interfaceorg.zkoss.zk.ui.ext.Disable
- Specified by:
setDisabled
in interfaceIntelligentField
- Overrides:
setDisabled
in classorg.zkoss.zul.impl.InputElement
- Parameters:
disabled
- Disabled- See Also:
-
InputElement.setDisabled(boolean)
-
setFieldName
Sets the name of the field. The name is required to be the same as in the database table representing the DDC used.- Specified by:
setFieldName
in interfaceIntelligentField
- Parameters:
name
- field name- See Also:
-
validate
public void validate()Starts validation of the field.- Specified by:
validate
in interfaceIntelligentField
- See Also:
-
getParentForm
Returns the parent form or null if this field is not part of a form.- Specified by:
getParentForm
in interfaceIntelligentField
- Returns:
- parent form or null
- See Also:
-
setChangedImplicitly
public void setChangedImplicitly()Sets the changed-property of this field to true.- Specified by:
setChangedImplicitly
in interfaceIntelligentField
- See Also:
-
setChangedImplicitly
public void setChangedImplicitly(boolean fireChangedEvent) Sets the changed-property of this field to true.- Specified by:
setChangedImplicitly
in interfaceIntelligentField
- Parameters:
fireChangedEvent
- if true, aEvents.ON_CHANGE
event will be fired- See Also:
-
updateAttribute
Performs a smartUpdate on the specified attribute.- Specified by:
updateAttribute
in interfaceIntelligentField
- Parameters:
attr
- attribute namevalue
- attribute value- See Also:
-
isNoLocalize
public boolean isNoLocalize()Returns the noLocalize parameter.- Specified by:
isNoLocalize
in interfaceLocalized
- Returns:
- noLocalize
- See Also:
-
setNoLocalize
public void setNoLocalize(boolean value) Sets the noLocalize parameter that can be used to disable localization of this component.- Specified by:
setNoLocalize
in interfaceLocalized
- Parameters:
value
- value- See Also:
-
setMultiSearchItems
Sets the values to display for multi-selection. SeeLookupTextField
on how to enable multiselection mode.
When the field is in multiselection mode, the values defined in the form can be replaced by using this method. The field will not show values retrieved from the lookup-table when it is in multiselection mode. This method throws an UnsupportedOperationException when the field is not in multiselection mode.- Parameters:
values
- Values to show in multiselect-popup
-
generateUUID
- Specified by:
generateUUID
in interfaceIdentifiable
- Returns:
- the generated uuid for the DOM tree
- See Also:
-
toString
- Overrides:
toString
in classorg.zkoss.zk.ui.AbstractComponent
- See Also:
-
AbstractComponent.toString()
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceIntelligentField
- Returns:
- true if the field's value is empty.
- See Also:
-
addCondition
public void addCondition(String fieldName, Object value, com.saperion.constants.SaConstants.SaFieldType fieldType) Adds a condition to the field that will be used to search for items displayed in the field's result list.- Parameters:
fieldName
- the name of the field to checkvalue
- the value to check forfieldType
- the type of the field (anSaConstants.SaFieldType
)
-
addCondition
public void addCondition(String fieldName, Object value, com.saperion.constants.SaConstants.SaFieldType fieldType, boolean multiValue) Adds a condition to the field that will be used to search for items displayed in the field's result list.- Parameters:
fieldName
- the name of the field to checkvalue
- the value to check forfieldType
- the type of the field (anSaConstants.SaFieldType
)multiValue
- whether the field used in the condition is a multivalue-field or not
-
removeCondition
Removes a condition from the field.- Parameters:
fieldName
- name of the field to remove the condition for
-
getSelectedRow
Description copied from interface:LookupField
Returns the selected row in the lookup table belonging to this lookup field.- Specified by:
getSelectedRow
in interfaceLookupField
- Returns:
ResultProperties
containing the selected row or null, if no row was selected so far
-
clearSelectedRow
public void clearSelectedRow()Description copied from interface:LookupField
Clears the selected row from the field. The lookup table will not be changed.- Specified by:
clearSelectedRow
in interfaceLookupField
-
clear
public void clear()Description copied from interface:IntelligentField
Clears the value(s) of this field.- Specified by:
clear
in interfaceIntelligentField
-
LookupField.ON_LOOKUP_SELECTED
.