Class WTableDirEditor

java.lang.Object
org.adempiere.webui.editor.WEditor
org.adempiere.webui.editor.WTableDirEditor
All Implemented Interfaces:
PropertyChangeListener, EventListener, ListDataListener, IInputValidator, IZoomableEditor, ContextMenuListener, org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>

public class WTableDirEditor extends WEditor implements ListDataListener, ContextMenuListener, IZoomableEditor
Default editor for display type TableDir, TableDirUU, Table, TableUU and List. Implemented with WTableDirEditor.EditorCombobox or WTableDirEditor.EditorAutoComplete (AD_Field.IsAutoComplete=Y) component.
Author:
Ashley G Ramdass
  • Field Details

    • LISTENER_EVENTS

      public static final String[] LISTENER_EVENTS
    • SHORT_LIST_EVENT

      public static final String SHORT_LIST_EVENT
      Context menu item attribute to store context menu event name/id
      See Also:
    • onlyShortListItems

      protected boolean onlyShortListItems
      true if lookup only contain short list items (i.e with IsShortList=Y)
  • Constructor Details

    • WTableDirEditor

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

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

      public WTableDirEditor(Lookup lookup, String label, String description, boolean mandatory, boolean readonly, boolean updateable)
      Constructor for use if a grid field is unavailable
      Parameters:
      lookup - Store of selectable data
      label - field label
      description - description of component
      mandatory - whether field is mandatory
      readonly - whether or not the editor is read only
      updateable - whether the editor contents can be changed
    • WTableDirEditor

      public WTableDirEditor(Lookup lookup, String label, String description, boolean mandatory, boolean readonly, boolean updateable, boolean autocomplete)
      Parameters:
      lookup -
      label -
      description -
      mandatory -
      readonly -
      updateable -
      autocomplete -
    • WTableDirEditor

      public WTableDirEditor(String columnName, boolean mandatory, boolean isReadOnly, boolean isUpdateable, Lookup lookup)
      Parameters:
      columnName -
      mandatory -
      isReadOnly -
      isUpdateable -
      lookup -
    • WTableDirEditor

      public WTableDirEditor(String columnName, boolean mandatory, boolean isReadOnly, boolean isUpdateable, Lookup lookup, boolean autocomplete)
      Parameters:
      columnName -
      mandatory -
      isReadOnly -
      isUpdateable -
      lookup -
      autocomplete -
  • Method Details

    • 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
    • getComponent

      public Combobox 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>
    • getEvents

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

      public void contentsChanged(ListDataEvent e)
      Specified by:
      contentsChanged in interface ListDataListener
    • intervalAdded

      public void intervalAdded(ListDataEvent e)
      Specified by:
      intervalAdded in interface ListDataListener
    • intervalRemoved

      public void intervalRemoved(ListDataEvent e)
      Specified by:
      intervalRemoved in interface ListDataListener
    • actionRefresh

      public void actionRefresh()
      Refresh lookup list
    • actionZoom

      public void actionZoom()
      Description copied from interface: IZoomableEditor
      Zoom to AD window
      Specified by:
      actionZoom in interface IZoomableEditor
    • getLookup

      public Lookup getLookup()
      Returns:
      Lookup
    • actionDrill

      protected void actionDrill()
      Open drill assistant dialog
    • actionQuickEntry

      protected void actionQuickEntry(boolean newRecord)
      Action - Special Quick Entry Screen
      Parameters:
      newRecord - true if new record should be created
    • actionLocation

      protected void actionLocation()
    • onMenu

      public void onMenu(ContextMenuEvent evt)
      Description copied from interface: ContextMenuListener
      On context menu event
      Specified by:
      onMenu in interface ContextMenuListener
    • dynamicDisplay

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

      public String getDisplayTextForGridView(Object value)
      Overrides:
      getDisplayTextForGridView in class WEditor
      Returns:
      display text for grid view, for consumption by WEditor.getDisplayComponent()
    • isRetainSelectedValueAfterRefresh

      public boolean isRetainSelectedValueAfterRefresh()
      Returns:
      true if current selected value is always retain after refresh of list
    • setRetainSelectedValueAfterRefresh

      public void setRetainSelectedValueAfterRefresh(boolean retainSelectedValueAfterRefresh)
      set whether current selected value is always retain after refresh of list
      Parameters:
      retainSelectedValueAfterRefresh -