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
,java.io.Serializable
,java.lang.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.- See Also:
- Serialized Form
-
-
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
Fields Modifier and Type Field Description static java.lang.String
DELIMITER
Delimiter for multiedit.static java.lang.String
ON_LOOKUP_SELECTED
Deprecated.Constant has been replaced withLookupField.ON_LOOKUP_SELECTED
.static java.lang.String
SELECTED_ROW_ATTRIBUTE
Name of the attribute containing the selected row.-
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
Constructors Constructor Description LookupTextField()
Constructor.LookupTextField(com.saperion.ngc.iform.xml.EditFieldType type, com.saperion.ngc.iform.xml.PosType panePos, FormMode mode, boolean isNoLocalization)
Constructor.LookupTextField(java.lang.String value)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCondition(java.lang.String fieldName, java.lang.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(java.lang.String fieldName, java.lang.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
clearSelectedRow()
Clears the selected row from the field.void
doChangeValue(org.zkoss.zk.ui.event.Event event)
java.lang.String
generateUUID()
long
getColorError()
long
getColorOk()
int
getConditionField()
com.saperion.ngc.iform.xml.EditFieldType
getEditField()
Returns the EditFieldType defining the properties of this field.IntelligentField.ElementType
getElementType()
Returns the type of this element.short
getEnableMaximize()
java.util.Set<org.zkoss.zk.ui.Component>
getEventtarget(java.lang.String eventName)
Reads the event target for the given event name, if set or the root element.java.lang.String
getFieldName()
Returns the name of the field.java.lang.String
getFName()
com.saperion.ngc.iform.xml.FontType
getFont()
FormMode
getFormMode()
java.lang.Integer
getIntValue()
java.lang.Integer[]
getIntValues()
java.lang.String
getLimit()
Returns the limit of this field (upper, lower or both).long
getListVersion()
com.saperion.ngc.iform.xml.OverrideKindType
getMandatory()
IntelligentFormView
getParentForm()
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
getPropertyValue()
Returns the current value of the field asSaPropertyValue
.java.lang.Double
getRealValue()
java.lang.Double[]
getRealValues()
int
getResFieldCnt()
int
getResStyle()
FieldResultBean
getResultBean()
Returns a bean containing the current value, type, name and limit of this field.ResultProperties
getSelectedRow()
Returns the selected row in the lookup table belonging to this lookup field.short
getVarDataType()
int
getWxCombo()
int
getWyCombo()
int
getXCombo()
boolean
isAllowInactiveLookup()
boolean
isAutoComplete()
boolean
isBEnabled()
boolean
isBPersistent()
boolean
isChanged()
Returns true if the value of this field was changed.boolean
isContentValid()
Performs a validation and returns true, if the content is valid.boolean
isEmpty()
boolean
isFieldInactive()
Returns the fieldInactive parameter.boolean
isHideButtons()
boolean
isIsVar()
boolean
isMultiSelect()
boolean
isNoLocalize()
Returns the noLocalize parameter.boolean
isPersistVar()
boolean
isReadonly()
gets the readonly state of this field.boolean
isRestrictCursor()
boolean
isSaveLayout()
boolean
isUseCalendar()
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
postFormButtonEvent(ButtonInfo info)
Posts a FormButtonEvent.void
removeCondition(java.lang.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
setChangedImplicitly()
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(java.lang.String valueAsString)
Sets the default value.void
setDisabled(boolean disabled)
Sets the disabled state of this field.void
setEnableMaximize(short value)
void
setEventOnOk(ButtonInfo.EventType type)
Starts event handling on enter key.void
setEventtarget(org.zkoss.zk.ui.Component comp, java.lang.String eventName)
Set the event target.void
setFieldInactive(boolean inactive)
Sets the fieldInactive parameter.void
setFieldName(java.lang.String name)
Sets the name of the field.void
setFName(java.lang.String value)
void
setFont(com.saperion.ngc.iform.xml.FontType value)
void
setHideButtons(boolean value)
void
setIsVar(boolean value)
void
setLimit(java.lang.String value)
Sets the limit type.void
setListVersion(long value)
void
setMandatory(com.saperion.ngc.iform.xml.OverrideKindType value)
void
setMultiSearchItems(java.lang.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
setText(java.lang.String value)
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)
java.lang.String
toString()
void
updateAttribute(java.lang.String attr, java.lang.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, 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, 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 com.saperion.ngc.iform.field.IntelligentField
attachClientScripts, attachScripts, attachServerScripts, clearErrorMessage, detachScripts, focus, getTabindex, setTabindex
-
-
-
-
Field Detail
-
SELECTED_ROW_ATTRIBUTE
public static final java.lang.String SELECTED_ROW_ATTRIBUTE
Name of the attribute containing the selected row.- See Also:
- Constant Field Values
-
ON_LOOKUP_SELECTED
@Deprecated public static final java.lang.String 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:
- Constant Field Values
-
DELIMITER
public static final java.lang.String DELIMITER
Delimiter for multiedit.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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
public LookupTextField() throws SystemException, AuthenticationException
Constructor.
-
LookupTextField
public LookupTextField(java.lang.String value)
Constructor.- Parameters:
value
- Value throws WrongValueException Wrong value
-
-
Method Detail
-
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:
IntelligentField.onIndexChange(org.zkoss.zk.ui.event.Event)
-
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:
IntelligentField.onVariablesAvailable(org.zkoss.zk.ui.event.Event)
-
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:
IntelligentField.onCancelEdit(org.zkoss.zk.ui.event.Event)
-
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:
IntelligentField.setValue(com.saperion.intf.SaPropertyValue)
-
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
public void setText(java.lang.String value) throws org.zkoss.zk.ui.WrongValueException
- 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:
IntelligentField.setValueImplicitly(com.saperion.intf.SaPropertyValue)
-
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:
IntelligentField.setValueImplicitly(com.saperion.intf.SaPropertyValue, boolean)
-
getIntValue
public java.lang.Integer getIntValue()
- Returns:
- Integer value, if this is a integer field.
-
getRealValue
public java.lang.Double getRealValue()
- Returns:
- Double value, if this is a double field.
-
getIntValues
public java.lang.Integer[] getIntValues()
- Returns:
- Integer value, if this is a integer field.
-
getRealValues
public java.lang.Double[] 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:
IntelligentField.onIndexClear(org.zkoss.zk.ui.event.Event)
-
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:
IntelligentField.isChanged()
-
setEventOnOk
public void setEventOnOk(ButtonInfo.EventType type)
Starts event handling on enter key.- Specified by:
setEventOnOk
in interfaceIntelligentField
- Parameters:
type
- Event type- See Also:
IntelligentField.setEventOnOk(com.saperion.ngc.iform.button.ButtonInfo.EventType)
-
doChangeValue
public void doChangeValue(org.zkoss.zk.ui.event.Event event)
- Specified by:
doChangeValue
in interfaceIntelligentField
- Parameters:
event
- Event- See Also:
IntelligentField.doChangeValue(org.zkoss.zk.ui.event.Event)
-
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
public java.lang.String getFName()
- Returns:
- Value
- See Also:
EditFieldType.getFName()
-
getFont
public com.saperion.ngc.iform.xml.FontType getFont()
- Returns:
- Value
- See Also:
EditFieldType.getFont()
-
getLimit
public java.lang.String 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
public void setFName(java.lang.String value)
- 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
public void setLimit(java.lang.String value)
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
public IntelligentField.ElementType 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:
IntelligentField.getElementType()
-
getResultBean
public FieldResultBean 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:
IntelligentField.getResultBean()
-
getEventtarget
public java.util.Set<org.zkoss.zk.ui.Component> getEventtarget(java.lang.String eventName)
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:
EventChild.getEventtarget(java.lang.String)
-
setEventtarget
public void setEventtarget(org.zkoss.zk.ui.Component comp, java.lang.String eventName)
Set the event target.- Specified by:
setEventtarget
in interfaceEventChild
- Parameters:
comp
- Event targeteventName
- Event name or null for main target- See Also:
EventChild.setEventtarget(org.zkoss.zk.ui.Component, java.lang.String)
-
postFormButtonEvent
public void postFormButtonEvent(ButtonInfo info)
Posts a FormButtonEvent.- Parameters:
info
- information about the button pressed.- See Also:
EventChildHandler.postFormButtonEvent(com.saperion.ngc.iform.button.ButtonInfo)
-
postFieldChangeEvent
public void postFieldChangeEvent(ResultProperty property)
Posts a FieldChangeEvent.- Parameters:
property
- the property that was changed- See Also:
EventChildHandler.postFieldChangeEvent(com.saperion.ngc.model.resultset.ResultProperty)
-
getFieldName
public java.lang.String getFieldName()
Returns the name of the field.- Specified by:
getFieldName
in interfaceIntelligentField
- Returns:
- Field name
- See Also:
IntelligentField.getFieldName()
-
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:
IntelligentField.isContentValid()
-
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:
IntelligentField.getEditField()
-
setDefaultValue
public void setDefaultValue(java.lang.String valueAsString)
Sets the default value.- Specified by:
setDefaultValue
in interfaceIntelligentField
- Parameters:
valueAsString
- string representation of value- See Also:
IntelligentField.setDefaultValue(java.lang.String)
-
setFieldInactive
public void setFieldInactive(boolean inactive)
Sets the fieldInactive parameter. Same assetReadonly(inactive)
.- Specified by:
setFieldInactive
in interfaceIntelligentField
- Parameters:
inactive
- value- See Also:
IntelligentField.setFieldInactive(boolean)
-
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:
IntelligentField.isFieldInactive()
-
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
public void setFieldName(java.lang.String name)
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:
IntelligentField.setFieldName(java.lang.String)
-
validate
public void validate()
Starts validation of the field.- Specified by:
validate
in interfaceIntelligentField
- See Also:
IntelligentField.validate()
-
getParentForm
public IntelligentFormView 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:
IntelligentField.getParentForm()
-
setChangedImplicitly
public void setChangedImplicitly()
Sets the changed-property of this field to true.- Specified by:
setChangedImplicitly
in interfaceIntelligentField
- See Also:
IntelligentField.setChangedImplicitly()
-
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:
IntelligentField.setChangedImplicitly(boolean)
-
updateAttribute
public void updateAttribute(java.lang.String attr, java.lang.Object value)
Performs a smartUpdate on the specified attribute.- Specified by:
updateAttribute
in interfaceIntelligentField
- Parameters:
attr
- attribute namevalue
- attribute value- See Also:
IntelligentField.updateAttribute(java.lang.String, java.lang.Object)
-
isNoLocalize
public boolean isNoLocalize()
Returns the noLocalize parameter.- Specified by:
isNoLocalize
in interfaceLocalized
- Returns:
- noLocalize
- See Also:
Localized.isNoLocalize()
-
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:
Localized.setNoLocalize(boolean)
-
setMultiSearchItems
public void setMultiSearchItems(java.lang.String[] values)
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
public java.lang.String generateUUID()
- Specified by:
generateUUID
in interfaceIdentifiable
- Returns:
- the generated uuid for the DOM tree
- See Also:
Identifiable.generateUUID()
-
toString
public java.lang.String 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:
IntelligentField.isEmpty()
-
addCondition
public void addCondition(java.lang.String fieldName, java.lang.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(java.lang.String fieldName, java.lang.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
public void removeCondition(java.lang.String fieldName)
Removes a condition from the field.- Parameters:
fieldName
- name of the field to remove the condition for
-
getSelectedRow
public ResultProperties 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
-
-