Package org.adempiere.webui.editor
Class WChosenboxSearchEditor
java.lang.Object
org.adempiere.webui.editor.WEditor
org.adempiere.webui.editor.WChosenboxSearchEditor
- All Implemented Interfaces:
PropertyChangeListener
,EventListener
,IInputValidator
,ContextMenuListener
,org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
Default editor for
DisplayType.ChosenMultipleSelectionSearch
.
Implemented with ChosenSearchBox
component.- Author:
- hengsin
-
Nested Class Summary
Nested classes/interfaces inherited from class org.adempiere.webui.editor.WEditor
WEditor.DynamicDisplayListener
-
Field Summary
Fields 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
ConstructorDescriptionWChosenboxSearchEditor
(String columnName, boolean mandatory, boolean readonly, boolean updateable, Lookup lookup) WChosenboxSearchEditor
(GridField gridField) WChosenboxSearchEditor
(GridField gridField, boolean tableEditor, IEditorConfiguration editorConfiguration) WChosenboxSearchEditor
(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 TypeMethodDescriptionvoid
dynamicDisplay
(Properties ctx) Dynamic update of component stateprotected void
fireValueChangeEvent
(Object newValue) Fire ValueChangeEvent for newValueString[]
getValue()
boolean
void
onEvent
(org.zkoss.zk.ui.event.Event e) void
onMenu
(ContextMenuEvent evt) On context menu eventvoid
setReadWrite
(boolean readWrite) void
setTableEditor
(boolean b) Set grid view mode.void
Set editor valueprotected void
OpenInfoPanel
Methods inherited from class org.adempiere.webui.editor.WEditor
addChangeLogMenu, addDynamicDisplayListener, addTextEditorMenu, addValueChangeListener, applyFieldStyles, applyLabelStyles, buildStyle, cleanColumnName, dynamicDisplay, fillHorizontal, fireValueChange, focusNext, getColumnName, getDescription, getDisplayComponent, getDisplayTextForGridView, 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
-
Constructor Details
-
WChosenboxSearchEditor
- Parameters:
gridField
-
-
WChosenboxSearchEditor
public WChosenboxSearchEditor(GridField gridField, boolean tableEditor, IEditorConfiguration editorConfiguration) - Parameters:
gridField
-tableEditor
-editorConfiguration
-
-
WChosenboxSearchEditor
public WChosenboxSearchEditor(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
- column name (not displayed)description
- description of componentmandatory
- whether a selection must be madereadonly
- whether or not the editor is read onlyupdateable
- whether the editor contents can be changed
-
WChosenboxSearchEditor
public WChosenboxSearchEditor(String columnName, boolean mandatory, boolean readonly, boolean updateable, Lookup lookup) - Parameters:
columnName
-mandatory
-readonly
-updateable
-lookup
-
-
-
Method Details
-
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
-
setValue
Description copied from class:WEditor
Set editor value -
getValue
-
getDisplay
- Specified by:
getDisplay
in classWEditor
- Returns:
- comma separated name list of selected records
-
onEvent
public void onEvent(org.zkoss.zk.ui.event.Event e) - Specified by:
onEvent
in interfaceorg.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
-
onMenu
Description copied from interface:ContextMenuListener
On context menu event- Specified by:
onMenu
in interfaceContextMenuListener
-
fireValueChangeEvent
Fire ValueChangeEvent for newValue- Parameters:
newValue
-
-
showInfoPanel
OpenInfoPanel
- Parameters:
ip
- InfoPanel
-
getEvents
- Overrides:
getEvents
in classWEditor
- Returns:
- list of
WEditor.component
events that this editor will listen to
-
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 classWEditor
-
getLookup
- Returns:
Lookup
-
dynamicDisplay
Description copied from class:WEditor
Dynamic update of component state- Overrides:
dynamicDisplay
in classWEditor
-