Class WPAttributeEditor

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

public class WPAttributeEditor extends WEditor implements ContextMenuListener
Default editor for DisplayType.PAttribute.
Implemented with PAttributebox component and WPAttributeDialog dialog.
Author:
Low Heng Sin
  • Field Details

    • m_WindowNo

      protected int m_WindowNo
    • m_mPAttribute

      protected Lookup m_mPAttribute
    • m_C_BPartner_ID

      protected int m_C_BPartner_ID
    • m_value

      protected Object m_value
      M_AttributeSetInstance_ID
  • Constructor Details

    • WPAttributeEditor

      public WPAttributeEditor(GridTab gridTab, GridField gridField)
      Parameters:
      gridTab -
      gridField -
    • WPAttributeEditor

      public WPAttributeEditor(GridTab gridTab, GridField gridField, boolean tableEditor, IEditorConfiguration editorConfiguration)
      Parameters:
      gridTab -
      gridField -
      tableEditor -
      editorConfiguration -
  • Method Details

    • getComponent

      public PAttributebox getComponent()
      Overrides:
      getComponent in class WEditor
      Returns:
      Component
    • setValue

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

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

      public String getDisplay()
      Specified by:
      getDisplay in class WEditor
      Returns:
      display text
    • 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
    • onMenu

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

      public void actionZoom()
      Zoom to record of getValue().
    • 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
    • setTableEditor

      public void setTableEditor(boolean b)
      Description copied from class: WEditor
      Set grid view mode. Have no effect if editor doesn't has a separate grid view mode.
      Overrides:
      setTableEditor in class WEditor