Package com.saperion.ngc.iform.field
Interface IntelligentField
- All Superinterfaces:
Cloneable
,org.zkoss.zk.ui.Component
,EventChild
,Localized
,org.zkoss.zk.ui.ext.Scope
,Serializable
- All Known Implementing Classes:
AdvancedLookupField
,CheckboxField
,ComboTextField
,DateField
,FloatField
,FormEditableImage
,IntField
,LookupTextField
,MultiField
,TextField
,TimeField
,TristateField
Interface for all fields contained in a form.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Element types of IntelligentFields. -
Field Summary
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 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
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
attachClientScripts
(com.saperion.ngc.iform.xml.EditFieldType field) Attaches client side scripts after page loaddefault void
attachScripts
(com.saperion.ngc.iform.xml.EditFieldType field, EventChildHandler provider, org.zkoss.zk.ui.Page newPage) Attaches client and server side scripts after page loaddefault void
attachServerScripts
(com.saperion.ngc.iform.xml.EditFieldType field, EventChildHandler provider, org.zkoss.zk.ui.Page newPage) Attaches server side scripts after page loadvoid
clear()
Clears the value(s) of this field.void
Removes the validation error message if present.default void
detachScripts
(com.saperion.ngc.iform.xml.EditFieldType field, org.zkoss.zk.ui.Page page) void
doChangeValue
(org.zkoss.zk.ui.event.Event event) void
focus()
Sets the focus to this field.com.saperion.ngc.iform.xml.EditFieldType
Returns the EditFieldType defining the properties of this field.Returns the type of this element.Returns the name of the field.getLimit()
Returns the limit of this field (upper, lower or both).Returns the parent form or null if this field is not part of a form.com.saperion.intf.SaPropertyValue
Returns the current value of the field asSaPropertyValue
.Returns a bean containing the current value, type, name and limit of this field.int
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
gets the readonly state of this field.void
onCancelEdit
(org.zkoss.zk.ui.event.Event event) Event handler for cancel edit 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
onVariablesAvailable
(org.zkoss.zk.ui.event.Event event) Event handler for variablesAvailableEvent.void
Sets the changed-property of this field to true.void
setChangedImplicitly
(boolean fireChangedEvent) Sets the changed-property of this field to true.void
setDefaultValue
(String valueAsString) Sets the default value.void
setDisabled
(boolean disabled) Sets the disabled state of this field.void
Starts event handling on enter key.void
setFieldInactive
(boolean inactive) Sets the fieldInactive parameter.void
setFieldName
(String name) Sets the name of the field.void
Sets the limit type.void
setReadonly
(boolean readonly) Sets the readonle state of this field.void
setTabindex
(int index) Sets the tabindex of this field.void
setValue
(com.saperion.intf.SaPropertyValue value) Sets the value of this field.void
setValueImplicitly
(com.saperion.intf.SaPropertyValue value) 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
updateAttribute
(String attr, Object value) Performs a smartUpdate on the specified attribute.void
validate()
Starts validation of the field.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.events.EventChild
getEventtarget, setEventtarget
Methods inherited from interface com.saperion.ngc.iform.Localized
isNoLocalize, setNoLocalize
Methods inherited from interface org.zkoss.zk.ui.ext.Scope
addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute
-
Method Details
-
doChangeValue
void doChangeValue(org.zkoss.zk.ui.event.Event event) - Parameters:
event
- Event
-
getElementType
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.- Returns:
- Element type
-
getResultBean
FieldResultBean getResultBean()Returns a bean containing the current value, type, name and limit of this field.- Returns:
- Result bean
-
onIndexChange
void onIndexChange(org.zkoss.zk.ui.event.Event event) Event handler for index changes.- Parameters:
event
- Event
-
onVariablesAvailable
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()
.- Parameters:
event
- Event
-
onCancelEdit
void onCancelEdit(org.zkoss.zk.ui.event.Event event) Event handler for cancel edit event.- Parameters:
event
- event
-
setValue
void setValue(com.saperion.intf.SaPropertyValue value) Sets the value of this field.- Parameters:
value
- value
-
getPropertyValue
com.saperion.intf.SaPropertyValue getPropertyValue()Returns the current value of the field asSaPropertyValue
.- Returns:
- the field's current value
-
setValueImplicitly
void setValueImplicitly(com.saperion.intf.SaPropertyValue value) Sets the value of this field and sets the changed-property of this field to true.- Parameters:
value
- value
-
setChangedImplicitly
void setChangedImplicitly()Sets the changed-property of this field to true. -
setValueImplicitly
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.- Parameters:
value
- valuefireChangedEvent
- if true, aEvents.ON_CHANGE
event will be fired after the value was set
-
setChangedImplicitly
void setChangedImplicitly(boolean fireChangedEvent) Sets the changed-property of this field to true.- Parameters:
fireChangedEvent
- if true, aEvents.ON_CHANGE
event will be fired
-
onIndexClear
void onIndexClear(org.zkoss.zk.ui.event.Event event) Event handler for index clear.- Parameters:
event
- Event
-
setEventOnOk
Starts event handling on enter key.- Parameters:
type
- Event type
-
isChanged
boolean isChanged()Returns true if the value of this field was changed.- Returns:
- Value is changed.
-
setDisabled
void setDisabled(boolean disabled) Sets the disabled state of this field.- Parameters:
disabled
- Disabled
-
setReadonly
void setReadonly(boolean readonly) Sets the readonle state of this field.- Parameters:
readonly
- readonly
-
isReadonly
boolean isReadonly()gets the readonly state of this field. -
isContentValid
boolean isContentValid()Performs a validation and returns true, if the content is valid.- Returns:
- Field content is valid.
-
getFieldName
String getFieldName()Returns the name of the field.- Returns:
- Field name
-
getLimit
String getLimit()Returns the limit of this field (upper, lower or both).- Returns:
- limit
-
setLimit
Sets the limit type. Possible values are: 'lower', 'upper', 'both'.- Parameters:
limit
- Limit type
-
getEditField
com.saperion.ngc.iform.xml.EditFieldType getEditField()Returns the EditFieldType defining the properties of this field.- Returns:
- the edit field
-
setDefaultValue
Sets the default value.- Parameters:
valueAsString
- string representation of value
-
setFieldInactive
void setFieldInactive(boolean inactive) Sets the fieldInactive parameter. Same assetReadonly(inactive)
.- Parameters:
inactive
- value
-
isFieldInactive
boolean isFieldInactive()Returns the fieldInactive parameter.- Returns:
- fieldInactive
-
setFieldName
Sets the name of the field. The name is required to be the same as in the database table representing the DDC used.- Parameters:
name
- field name
-
validate
void validate()Starts validation of the field. -
clearErrorMessage
void clearErrorMessage()Removes the validation error message if present. -
getParentForm
IntelligentFormView getParentForm()Returns the parent form or null if this field is not part of a form.- Returns:
- parent form or null
-
updateAttribute
Performs a smartUpdate on the specified attribute.- Parameters:
attr
- attribute namevalue
- attribute value
-
isEmpty
boolean isEmpty()- Returns:
- true if the field's value is empty.
-
setTabindex
void setTabindex(int index) Sets the tabindex of this field.- Parameters:
index
- tab index
-
getTabindex
int getTabindex()- Returns:
- the tabindex of this field.
-
clear
void clear()Clears the value(s) of this field. -
focus
void focus()Sets the focus to this field. -
attachScripts
default void attachScripts(com.saperion.ngc.iform.xml.EditFieldType field, EventChildHandler provider, org.zkoss.zk.ui.Page newPage) Attaches client and server side scripts after page load- Parameters:
field
- The field to attach the code to.provider
- Instance ofEventChildHandler
newPage
- The page on which the field is attached.
-
attachClientScripts
default void attachClientScripts(com.saperion.ngc.iform.xml.EditFieldType field) Attaches client side scripts after page load- Parameters:
field
- The field to attach the code to.
-
attachServerScripts
default void attachServerScripts(com.saperion.ngc.iform.xml.EditFieldType field, EventChildHandler provider, org.zkoss.zk.ui.Page newPage) Attaches server side scripts after page load- Parameters:
field
- The field to attach the code to.provider
- Instance ofEventChildHandler
newPage
- The page on which the field is attached.
-
detachScripts
default void detachScripts(com.saperion.ngc.iform.xml.EditFieldType field, org.zkoss.zk.ui.Page page)
-