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.- Author:
- Ashley G Ramdass
-
Nested Class Summary
Nested classes/interfaces inherited from class org.adempiere.webui.editor.WEditor
WEditor.DynamicDisplayListener -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String[]protected booleantrue if lookup only contain short list items (i.e with IsShortList=Y)static final StringContext 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
ConstructorsConstructorDescriptionWTableDirEditor(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 voidOpen drill assistant dialogprotected voidOpenWLocationDialogprotected voidactionQuickEntry(boolean newRecord) Action - Special Quick Entry ScreenvoidRefresh lookup listvoidZoom to AD windowvoidvoiddynamicDisplay(Properties ctx) Dynamic update of component stategetDisplayTextForGridView(Object value) String[]getValue()voidvoidbooleanbooleanvoidonEvent(org.zkoss.zk.ui.event.Event event) voidonMenu(ContextMenuEvent evt) On context menu eventvoidsetReadWrite(boolean readWrite) voidsetRetainSelectedValueAfterRefresh(boolean retainSelectedValueAfterRefresh) set whether current selected value is always retain after refresh of listvoidSet 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:
getDisplayin classWEditor- Returns:
- display text
-
getValue
-
setValue
Description copied from class:WEditorSet editor value -
getComponent
- Overrides:
getComponentin classWEditor- Returns:
- Component
-
isReadWrite
public boolean isReadWrite()- Specified by:
isReadWritein classWEditor- Returns:
- true if editable
-
setReadWrite
public void setReadWrite(boolean readWrite) - Specified by:
setReadWritein classWEditor
-
onEvent
public void onEvent(org.zkoss.zk.ui.event.Event event) - Specified by:
onEventin interfaceorg.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
-
getEvents
- Overrides:
getEventsin classWEditor- Returns:
- list of
WEditor.componentevents that this editor will listen to
-
contentsChanged
- Specified by:
contentsChangedin interfaceListDataListener
-
intervalAdded
- Specified by:
intervalAddedin interfaceListDataListener
-
intervalRemoved
- Specified by:
intervalRemovedin interfaceListDataListener
-
actionRefresh
public void actionRefresh()Refresh lookup list -
actionZoom
public void actionZoom()Description copied from interface:IZoomableEditorZoom to AD window- Specified by:
actionZoomin 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
Description copied from interface:ContextMenuListenerOn context menu event- Specified by:
onMenuin interfaceContextMenuListener
-
dynamicDisplay
Description copied from class:WEditorDynamic update of component state- Overrides:
dynamicDisplayin classWEditor
-
getDisplayTextForGridView
- Overrides:
getDisplayTextForGridViewin 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-
-