Package org.adempiere.webui.adwindow
Class QuickGridView
- java.lang.Object
-
- org.zkoss.zk.ui.AbstractComponent
-
- org.zkoss.zk.ui.HtmlBasedComponent
-
- org.zkoss.zul.impl.XulElement
-
- org.zkoss.zul.Box
-
- org.zkoss.zul.Vbox
-
- org.adempiere.webui.adwindow.QuickGridView
-
- All Implemented Interfaces:
Serializable
,Cloneable
,EventListener
,IFieldEditorContainer
,StateChangeListener
,org.zkoss.zk.ui.Component
,org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
,org.zkoss.zk.ui.ext.Scope
,org.zkoss.zk.ui.IdSpace
,org.zkoss.zk.ui.sys.ComponentCtrl
public class QuickGridView extends org.zkoss.zul.Vbox implements org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>, org.zkoss.zk.ui.IdSpace, IFieldEditorContainer, StateChangeListener
Quick Grid view implemented using the Grid component.- Since:
- Nov 03, 2017
- Author:
- Logilite Technologies
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
CNTRL_KEYS
static String
EVENT_ON_AFTER_SAVE
static String
EVENT_ON_CLICK_TO_NAVIGATE
static String
EVENT_ON_CUSTOMIZE_GRID
static String
EVENT_ON_PAGE_NAVIGATE
static String
EVENT_ON_SELECT_ROW
static String
EVENT_ON_SET_FOCUS_TO_FIRST_CELL
static String
EVENT_ONFOCUS_AFTER_SAVE
static int
FOCUS_CODE
boolean
isNewLineSaved
GridTableListModel
listModel
static int
NAVIGATE_CODE
org.zkoss.zul.Paging
paging
IQuickForm
quickForm
static int
SALES_ORDER_LINE_TAB_ID
protected Checkbox
selectAll
-
Constructor Summary
Constructors Constructor Description QuickGridView(int windowNo)
QuickGridView(AbstractADWindowContent abstractADWindowContent, GridTab gridTab, IQuickForm wQuickForm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
protected void
createListbox()
void
createNewLine()
boolean
dataSave(int code)
void
dynamicDisplay(int col)
Validate display properties of fields of current rowprotected void
echoOnPostSelectedRowChanged()
void
editorTraverse(Callback<WEditor> editorTaverseCallback)
helper method to loop thru editor collection of panel
can use on callout to check relative editororg.zkoss.zul.Column
findCurrentSortColumn()
void
focusToFirstEditor()
focus to first field editorvoid
focusToNextEditor(WEditor ref)
focus to next field editor from refGridField[]
getFields()
list field display in grid mode, in case user customize grid this list container only customize list.GridField[]
getGridField()
Grid
getListbox()
QuickGridTabRowRenderer
getRenderer()
void
init(GridTab gridTab)
boolean
isAllSelected()
boolean
isInit()
boolean
isRefreshing()
protected void
onADTabPanelParentChanged()
void
onEvent(org.zkoss.zk.ui.event.Event event)
void
onPageAttached(org.zkoss.zk.ui.Page newpage, org.zkoss.zk.ui.Page oldpage)
void
onPageDetached(org.zkoss.zk.ui.Page page)
void
onPostSelectedRowChanged()
void
refresh(GridTab gridTab)
refresh after switching from form viewvoid
reInit()
void
scrollToCurrentRow()
scroll grid to the current focus rowvoid
setADWindowPanel(AbstractADWindowContent winPanel)
void
setGridField(GridField[] gridField)
void
setPageSize(int pageSize)
set paging sizevoid
setStatusLine(String text, boolean error)
void
setWindowNo(int windowNo)
void
stateChange(StateChangeEvent event)
void
toggleSelectionForAll(boolean b)
void
updateListIndex()
Update current row from modelboolean
updateModelIndex(int rowIndex)
-
Methods inherited from class org.zkoss.zul.Box
evalCSSFlex, getAlign, getHeights, getOrient, getPack, getSpacing, getWidths, getZclass, isHorizontal, isSizedByContent, isVertical, renderProperties, setAlign, setHeights, setOrient, setPack, setSizedByContent, setSpacing, setWidths
-
Methods inherited from class org.zkoss.zul.impl.XulElement
clone, getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributes
-
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addSclass, focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, removeSclass, removeSclass, service, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
-
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, invalidate, invalidatePartial, isChildable, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.zkoss.zk.ui.IdSpace
getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, hasFellow, hasFellow
-
Methods inherited from interface org.adempiere.webui.adwindow.IFieldEditorContainer
editorTraverse
-
-
-
-
Field Detail
-
SALES_ORDER_LINE_TAB_ID
public static final int SALES_ORDER_LINE_TAB_ID
- See Also:
- Constant Field Values
-
CNTRL_KEYS
public static final String CNTRL_KEYS
- See Also:
- Constant Field Values
-
EVENT_ON_SELECT_ROW
public static final String EVENT_ON_SELECT_ROW
- See Also:
- Constant Field Values
-
EVENT_ON_CUSTOMIZE_GRID
public static final String EVENT_ON_CUSTOMIZE_GRID
- See Also:
- Constant Field Values
-
EVENT_ON_PAGE_NAVIGATE
public static final String EVENT_ON_PAGE_NAVIGATE
- See Also:
- Constant Field Values
-
EVENT_ON_CLICK_TO_NAVIGATE
public static final String EVENT_ON_CLICK_TO_NAVIGATE
- See Also:
- Constant Field Values
-
EVENT_ON_SET_FOCUS_TO_FIRST_CELL
public static final String EVENT_ON_SET_FOCUS_TO_FIRST_CELL
- See Also:
- Constant Field Values
-
EVENT_ON_AFTER_SAVE
public static final String EVENT_ON_AFTER_SAVE
- See Also:
- Constant Field Values
-
EVENT_ONFOCUS_AFTER_SAVE
public static final String EVENT_ONFOCUS_AFTER_SAVE
- See Also:
- Constant Field Values
-
NAVIGATE_CODE
public static final int NAVIGATE_CODE
- See Also:
- Constant Field Values
-
FOCUS_CODE
public static final int FOCUS_CODE
- See Also:
- Constant Field Values
-
listModel
public GridTableListModel listModel
-
paging
public org.zkoss.zul.Paging paging
-
selectAll
protected Checkbox selectAll
-
isNewLineSaved
public boolean isNewLineSaved
-
quickForm
public IQuickForm quickForm
-
-
Constructor Detail
-
QuickGridView
public QuickGridView(int windowNo)
- Parameters:
windowNo
-
-
QuickGridView
public QuickGridView(AbstractADWindowContent abstractADWindowContent, GridTab gridTab, IQuickForm wQuickForm)
-
-
Method Detail
-
getGridField
public GridField[] getGridField()
-
setGridField
public void setGridField(GridField[] gridField)
-
getRenderer
public QuickGridTabRowRenderer getRenderer()
-
createListbox
protected void createListbox()
-
init
public void init(GridTab gridTab)
- Parameters:
gridTab
-
-
isInit
public boolean isInit()
- Returns:
- boolean
-
refresh
public void refresh(GridTab gridTab)
refresh after switching from form view- Parameters:
gridTab
-
-
isRefreshing
public boolean isRefreshing()
-
updateListIndex
public void updateListIndex()
Update current row from model
-
echoOnPostSelectedRowChanged
protected void echoOnPostSelectedRowChanged()
-
setPageSize
public void setPageSize(int pageSize)
set paging size- Parameters:
pageSize
-
-
clear
public void clear()
-
onEvent
public void onEvent(org.zkoss.zk.ui.event.Event event) throws Exception
- Specified by:
onEvent
in interfaceorg.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
- Throws:
Exception
-
isAllSelected
public boolean isAllSelected()
-
toggleSelectionForAll
public void toggleSelectionForAll(boolean b)
-
onPostSelectedRowChanged
public void onPostSelectedRowChanged()
-
scrollToCurrentRow
public void scrollToCurrentRow()
scroll grid to the current focus row
-
updateModelIndex
public boolean updateModelIndex(int rowIndex)
-
getListbox
public Grid getListbox()
- Returns:
- Grid
-
dynamicDisplay
public void dynamicDisplay(int col)
Validate display properties of fields of current row- Parameters:
col
-
-
setWindowNo
public void setWindowNo(int windowNo)
- Parameters:
windowNo
-
-
setADWindowPanel
public void setADWindowPanel(AbstractADWindowContent winPanel)
- Parameters:
winPanel
-
-
reInit
public void reInit()
-
getFields
public GridField[] getFields()
list field display in grid mode, in case user customize grid this list container only customize list.
-
focusToFirstEditor
public void focusToFirstEditor()
Description copied from interface:IFieldEditorContainer
focus to first field editor- Specified by:
focusToFirstEditor
in interfaceIFieldEditorContainer
-
focusToNextEditor
public void focusToNextEditor(WEditor ref)
Description copied from interface:IFieldEditorContainer
focus to next field editor from ref- Specified by:
focusToNextEditor
in interfaceIFieldEditorContainer
-
stateChange
public void stateChange(StateChangeEvent event)
- Specified by:
stateChange
in interfaceStateChangeListener
-
onADTabPanelParentChanged
protected void onADTabPanelParentChanged()
-
setStatusLine
public void setStatusLine(String text, boolean error)
-
createNewLine
public void createNewLine()
-
dataSave
public boolean dataSave(int code)
- Parameters:
code
-
-
onPageAttached
public void onPageAttached(org.zkoss.zk.ui.Page newpage, org.zkoss.zk.ui.Page oldpage)
- Specified by:
onPageAttached
in interfaceorg.zkoss.zk.ui.sys.ComponentCtrl
- Overrides:
onPageAttached
in classorg.zkoss.zk.ui.AbstractComponent
-
onPageDetached
public void onPageDetached(org.zkoss.zk.ui.Page page)
- Specified by:
onPageDetached
in interfaceorg.zkoss.zk.ui.sys.ComponentCtrl
- Overrides:
onPageDetached
in classorg.zkoss.zk.ui.AbstractComponent
-
editorTraverse
public void editorTraverse(Callback<WEditor> editorTaverseCallback)
Description copied from interface:IFieldEditorContainer
helper method to loop thru editor collection of panel
can use on callout to check relative editor- Specified by:
editorTraverse
in interfaceIFieldEditorContainer
-
findCurrentSortColumn
public org.zkoss.zul.Column findCurrentSortColumn()
-
-