Class WStringEditor

java.lang.Object
org.adempiere.webui.editor.WEditor
org.adempiere.webui.editor.WStringEditor
All Implemented Interfaces:
PropertyChangeListener, EventListener, IInputValidator, ContextMenuListener, org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
Direct Known Subclasses:
WJsonEditor, WPasswordEditor, WUnknownEditor

public class WStringEditor extends WEditor implements ContextMenuListener
Default editor for text display type (String, PrinterName, Text, TextLong and Memo).
Implemented with Textbox or Combobox (AD_Field.IsAutocomplete=Y) component and WTextEditorDialog dialog.
Version:
$Revision: 0.10 $
Author:
Ashley G Ramdass
  • Constructor Details

    • WStringEditor

      public WStringEditor()
      Default constructor
    • WStringEditor

      public WStringEditor(GridField gridField)
      Parameters:
      gridField -
    • WStringEditor

      public WStringEditor(GridField gridField, boolean tableEditor)
      Parameters:
      gridField -
      tableEditor -
    • WStringEditor

      public WStringEditor(GridField gridField, boolean tableEditor, IEditorConfiguration editorConfiguration)
      Parameters:
      gridField -
      tableEditor -
      editorConfiguration -
    • WStringEditor

      public WStringEditor(String columnName, boolean mandatory, boolean isReadOnly, boolean isUpdateable, int displayLength, int fieldLength, String wVFormat, String obscureType)
      Parameters:
      columnName -
      mandatory -
      isReadOnly -
      isUpdateable -
      displayLength -
      fieldLength -
      wVFormat -
      obscureType -
  • Method Details

    • getComponent

      public org.zkoss.zul.Textbox getComponent()
      Overrides:
      getComponent in class WEditor
      Returns:
      Component
    • isReadWrite

      public boolean isReadWrite()
      Specified by:
      isReadWrite in class WEditor
      Returns:
      true if editable
    • setReadWrite

      public void setReadWrite(boolean readWrite)
      Specified by:
      setReadWrite in class WEditor
    • onEvent

      public void onEvent(org.zkoss.zk.ui.event.Event event)
      Specified by:
      onEvent in interface org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
    • getDisplay

      public String getDisplay()
      Specified by:
      getDisplay in class WEditor
      Returns:
      display text
    • getValue

      public Object getValue()
      Specified by:
      getValue in class WEditor
      Returns:
      Object, current value of editor
    • setValue

      public void setValue(Object value)
      Description copied from class: WEditor
      Set editor value
      Specified by:
      setValue in class WEditor
    • setTypePassword

      protected void setTypePassword(boolean password)
      Set type of textbox to password or text
      Parameters:
      password - true to set type to password
    • getEvents

      public String[] getEvents()
      Overrides:
      getEvents in class WEditor
      Returns:
      list of WEditor.component events that this editor will listen to
    • onMenu

      public void onMenu(ContextMenuEvent evt)
      Specified by:
      onMenu in interface ContextMenuListener
    • dynamicDisplay

      public void dynamicDisplay()
      Description copied from class: WEditor
      Dynamic update of component state
      Overrides:
      dynamicDisplay in class WEditor
    • actionRefresh

      public void actionRefresh()
      Refresh auto complete combo