Package org.adempiere.webui.editor
Class WSearchEditor
java.lang.Object
org.adempiere.webui.editor.WEditor
org.adempiere.webui.editor.WSearchEditor
- All Implemented Interfaces:
PropertyChangeListener,EventListener,IInputValidator,IZoomableEditor,ContextMenuListener,ValueChangeListener,org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
public class WSearchEditor
extends WEditor
implements ContextMenuListener, ValueChangeListener, IZoomableEditor
Default editor for
Implemented with
DisplayType.Search and DisplayType.SearchUU.Implemented with
WSearchEditor.CustomSearchBox component and InfoPanel, InfoWindow dialog.- Author:
- Ashley G Ramdass
-
Nested Class Summary
Nested classes/interfaces inherited from class org.adempiere.webui.editor.WEditor
WEditor.DynamicDisplayListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ADWindowADWindow instance that own this editorstatic final StringBoolean component attribute to store whether info panel is openprotected InfoPanelprotected Lookupprotected booleanFields 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
ConstructorsConstructorDescriptionWSearchEditor(String columnName, boolean mandatory, boolean readonly, boolean updateable, Lookup lookup) WSearchEditor(GridField gridField) WSearchEditor(GridField gridField, boolean tableEditor, IEditorConfiguration editorConfiguration) WSearchEditor(Lookup lookup, String label, String description, boolean mandatory, boolean readonly, boolean updateable) Constructor for use if a grid field is unavailable -
Method Summary
Modifier and TypeMethodDescriptionprotected voidactionButton(String queryValue) Handle onClick event fromWSearchEditor.CustomSearchBoxbutton.protected voidactionCombo(Object value) Process value from InfoPanel/InfoWindow.
Fire ValueChangeEvent.protected voidOpen drill assistant dialogprotected voidactionQuickEntry(boolean newRecord) Action - Special Quick Entry Screenprotected voidactionRefresh(Object value) Refresh editor valueprotected voidactionText(String text) Process text input from uservoidZoom to window for reference/target tablestatic WSearchEditorcreateBPartner(int windowNo) Create new WSearhEditor instance for C_Invoice.C_BPartner_ID column.static WSearchEditorcreateProduct(int windowNo) Create new WSearchEditor instance for C_InvoiceLine.M_Product_ID column.voidTurn off auto complete for editorvoiddynamicDisplay(Properties ctx) Dynamic update of component statevoidTurn on auto complete for editorgetDisplayTextForGridView(Object value) String[]getValue()booleanbooleanbooleanvoidonEvent(org.zkoss.zk.ui.event.Event e) voidonMenu(ContextMenuEvent evt) On context menu eventprotected voidReset state ofWSearchEditor.CustomSearchBoxbutton to defaultvoidsetMultipleSelection(boolean multipleSelection) voidsetReadWrite(boolean readWrite) voidsetTableEditor(boolean b) Set grid view mode.voidSet editor valuevoidOpen InfoPanel/InfoWindow dialogvoidOn value change eventMethods 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, setValidInput, setVisible, setVisible, showMenu, toString, updateLabelStyle, updateStyle, updateStyle
-
Field Details
-
ATTRIBUTE_IS_INFO_PANEL_OPEN
Boolean component attribute to store whether info panel is open- See Also:
-
lookup
-
infoPanel
-
adwindow
ADWindow instance that own this editor -
multipleSelection
protected boolean multipleSelection
-
-
Constructor Details
-
WSearchEditor
- Parameters:
gridField-
-
WSearchEditor
public WSearchEditor(GridField gridField, boolean tableEditor, IEditorConfiguration editorConfiguration) - Parameters:
gridField-tableEditor-editorConfiguration-
-
WSearchEditor
public WSearchEditor(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
-
WSearchEditor
public WSearchEditor(String columnName, boolean mandatory, boolean readonly, boolean updateable, Lookup lookup) - Parameters:
columnName-mandatory-readonly-updateable-lookup-
-
-
Method Details
-
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
-
enableAutoComplete
public void enableAutoComplete()Turn on auto complete for editor -
disableAutoComplete
public void disableAutoComplete()Turn off auto complete for editor -
setValue
Description copied from class:WEditorSet editor value -
getValue
-
getDisplay
- Specified by:
getDisplayin classWEditor- Returns:
- display text
-
onEvent
public void onEvent(org.zkoss.zk.ui.event.Event e) - Specified by:
onEventin interfaceorg.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
-
actionRefresh
Refresh editor value- Parameters:
value-
-
actionZoom
public void actionZoom()Zoom to window for reference/target table- Specified by:
actionZoomin interfaceIZoomableEditor
-
onMenu
Description copied from interface:ContextMenuListenerOn context menu event- Specified by:
onMenuin interfaceContextMenuListener
-
actionText
Process text input from user- Parameters:
text-
-
actionDrill
protected void actionDrill()Open drill assistant dialog -
resetButtonState
protected void resetButtonState()Reset state ofWSearchEditor.CustomSearchBoxbutton to default -
actionCombo
Process value from InfoPanel/InfoWindow.
Fire ValueChangeEvent.- Parameters:
value-
-
actionQuickEntry
protected void actionQuickEntry(boolean newRecord) Action - Special Quick Entry Screen- Parameters:
newRecord- true if new record should be created
-
actionButton
Handle onClick event fromWSearchEditor.CustomSearchBoxbutton.- Parameters:
queryValue-
-
showInfoPanel
Open InfoPanel/InfoWindow dialog- Parameters:
ip- InfoPanel
-
getEvents
- Overrides:
getEventsin classWEditor- Returns:
- list of
WEditor.componentevents that this editor will listen to
-
valueChange
Description copied from interface:ValueChangeListenerOn value change event- Specified by:
valueChangein interfaceValueChangeListener
-
setTableEditor
public void setTableEditor(boolean b) Description copied from class:WEditorSet grid view mode. Have no effect if editor doesn't has a separate grid view mode.- Overrides:
setTableEditorin classWEditor
-
isShowingDialog
public boolean isShowingDialog()- Returns:
- true if InfoPanel/InfoWindow dialog is active
-
createBPartner
Create new WSearhEditor instance for C_Invoice.C_BPartner_ID column.- Parameters:
windowNo-- Returns:
- WSearchEditor
-
createProduct
Create new WSearchEditor instance for C_InvoiceLine.M_Product_ID column.- Parameters:
windowNo-- Returns:
- WSearchEditor
-
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()
-
isMultipleSelection
public boolean isMultipleSelection()- Returns:
- true if info window allow multiple selection
-
setMultipleSelection
public void setMultipleSelection(boolean multipleSelection) - Parameters:
multipleSelection-
-