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

public interface IntelligentField extends org.zkoss.zk.ui.Component, EventChild, Localized
Interface for all fields contained in a form.
  • Method Details

    • doChangeValue

      void doChangeValue(org.zkoss.zk.ui.event.Event event)
      Parameters:
      event - Event
    • getElementType

      Returns the type of this element. The type defines the kind of data and control used for this IntelligentField. See IntelligentField.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, use IntelligentFormView.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 as SaPropertyValue.
      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 - value
      fireChangedEvent - if true, a Events.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, a Events.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

      void setEventOnOk(ButtonInfo.EventType type)
      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

      void setLimit(String limit)
      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

      void setDefaultValue(String valueAsString)
      Sets the default value.
      Parameters:
      valueAsString - string representation of value
    • setFieldInactive

      void setFieldInactive(boolean inactive)
      Sets the fieldInactive parameter. Same as setReadonly(inactive).
      Parameters:
      inactive - value
    • isFieldInactive

      boolean isFieldInactive()
      Returns the fieldInactive parameter.
      Returns:
      fieldInactive
    • setFieldName

      void setFieldName(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.
      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

      void updateAttribute(String attr, Object value)
      Performs a smartUpdate on the specified attribute.
      Parameters:
      attr - attribute name
      value - 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 of EventChildHandler
      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 of EventChildHandler
      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)