Package org.adempiere.webui.editor
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.- Version:
- $Revision: 0.10 $
- Author:
- Ashley G Ramdass
-
Nested Class Summary
Nested classes/interfaces inherited from class org.adempiere.webui.editor.WEditor
WEditor.DynamicDisplayListener
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String[]
protected boolean
true if lookup only contain short list items (i.e with IsShortList=Y)static final String
Context menu item attribute to store context menu event name/idFields inherited from class org.adempiere.webui.editor.WEditor
component, gridField, gridTab, IDEMPIERE_EDITOR_ATTR, INIT_EDIT_EVENT, label, listeners, mandatory, MAX_DISPLAY_LENGTH, popupMenu, readOnly, tableEditor
-
Constructor Summary
ConstructorDescriptionWTableDirEditor
(String columnName, boolean mandatory, boolean isReadOnly, boolean isUpdateable, Lookup lookup) WTableDirEditor
(String columnName, boolean mandatory, boolean isReadOnly, boolean isUpdateable, Lookup lookup, boolean autocomplete) WTableDirEditor
(GridField gridField) WTableDirEditor
(GridField gridField, boolean tableEditor, IEditorConfiguration editorConfiguration) WTableDirEditor
(Lookup lookup, String label, String description, boolean mandatory, boolean readonly, boolean updateable) Constructor for use if a grid field is unavailableWTableDirEditor
(Lookup lookup, String label, String description, boolean mandatory, boolean readonly, boolean updateable, boolean autocomplete) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Open drill assistant dialogprotected void
OpenWLocationDialog
protected void
actionQuickEntry
(boolean newRecord) Action - Special Quick Entry Screenvoid
Refresh lookup listvoid
Zoom to AD windowvoid
void
dynamicDisplay
(Properties ctx) Dynamic update of component stategetDisplayTextForGridView
(Object value) String[]
getValue()
void
void
boolean
boolean
void
onEvent
(org.zkoss.zk.ui.event.Event event) void
onMenu
(ContextMenuEvent evt) void
setReadWrite
(boolean readWrite) void
setRetainSelectedValueAfterRefresh
(boolean retainSelectedValueAfterRefresh) set whether current selected value is always retain after refresh of listvoid
Set editor valueMethods inherited from class org.adempiere.webui.editor.WEditor
addChangeLogMenu, addDynamicDisplayListener, addTextEditorMenu, addValueChangeListener, applyFieldStyles, applyLabelStyles, buildStyle, cleanColumnName, dynamicDisplay, fillHorizontal, fireValueChange, focusNext, getColumnName, getDescription, getDisplayComponent, getDisplayTextForGridView, getGridField, getLabel, getPopupMenu, getStyleEvaluatee, getValidInput, isComponentOfEditor, isMandatory, isMandatoryStyle, isNullOrEmpty, isProcessParameter, isSearchable, isShowPreference, isValid, isVisible, isZoomable, propertyChange, removeDynamicDisplayListener, removeValuechangeListener, setBackground, setBackground, setChangeEventWhenEditing, setColumnName, setComponent, setFieldStyle, setGridTab, setLabelStyle, setMandatory, setProcessParameter, setTableEditor, setValidInput, setVisible, setVisible, showMenu, toString, updateLabelStyle, updateStyle, updateStyle
-
Field Details
-
LISTENER_EVENTS
-
SHORT_LIST_EVENT
Context menu item attribute to store context menu event name/id- See Also:
-
onlyShortListItems
protected boolean onlyShortListItemstrue if lookup only contain short list items (i.e with IsShortList=Y)
-
-
Constructor Details
-
WTableDirEditor
- 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 datalabel
- field labeldescription
- description of componentmandatory
- whether field is mandatoryreadonly
- whether or not the editor is read onlyupdateable
- 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
- Specified by:
getDisplay
in classWEditor
- Returns:
- display text
-
getValue
-
setValue
Description copied from class:WEditor
Set editor value -
getComponent
- Overrides:
getComponent
in classWEditor
- Returns:
- Component
-
isReadWrite
public boolean isReadWrite()- Specified by:
isReadWrite
in classWEditor
- Returns:
- true if editable
-
setReadWrite
public void setReadWrite(boolean readWrite) - Specified by:
setReadWrite
in classWEditor
-
onEvent
public void onEvent(org.zkoss.zk.ui.event.Event event) - Specified by:
onEvent
in interfaceorg.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
-
getEvents
- Overrides:
getEvents
in classWEditor
- Returns:
- list of
WEditor.component
events that this editor will listen to
-
contentsChanged
- Specified by:
contentsChanged
in interfaceListDataListener
-
intervalAdded
- Specified by:
intervalAdded
in interfaceListDataListener
-
intervalRemoved
- Specified by:
intervalRemoved
in interfaceListDataListener
-
actionRefresh
public void actionRefresh()Refresh lookup list -
actionZoom
public void actionZoom()Description copied from interface:IZoomableEditor
Zoom to AD window- Specified by:
actionZoom
in interfaceIZoomableEditor
-
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()OpenWLocationDialog
-
onMenu
- Specified by:
onMenu
in interfaceContextMenuListener
-
dynamicDisplay
Description copied from class:WEditor
Dynamic update of component state- Overrides:
dynamicDisplay
in classWEditor
-
getDisplayTextForGridView
- Overrides:
getDisplayTextForGridView
in classWEditor
- 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
-
-