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 StringCNTRL_KEYSstatic StringEVENT_ON_AFTER_SAVEstatic StringEVENT_ON_CLICK_TO_NAVIGATEstatic StringEVENT_ON_CUSTOMIZE_GRIDstatic StringEVENT_ON_PAGE_NAVIGATEstatic StringEVENT_ON_SELECT_ROWstatic StringEVENT_ON_SET_FOCUS_TO_FIRST_CELLstatic StringEVENT_ONFOCUS_AFTER_SAVEstatic intFOCUS_CODEbooleanisNewLineSavedGridTableListModellistModelstatic intNAVIGATE_CODEorg.zkoss.zul.PagingpagingIQuickFormquickFormstatic intSALES_ORDER_LINE_TAB_IDprotected CheckboxselectAll
-
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 voidclear()protected voidcreateListbox()voidcreateNewLine()booleandataSave(int code)voiddynamicDisplay(int col)Validate display properties of fields of current rowprotected voidechoOnPostSelectedRowChanged()voideditorTraverse(Callback<WEditor> editorTaverseCallback)helper method to loop thru editor collection of panel
can use on callout to check relative editororg.zkoss.zul.ColumnfindCurrentSortColumn()voidfocusToFirstEditor()focus to first field editorvoidfocusToNextEditor(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()GridgetListbox()QuickGridTabRowRenderergetRenderer()voidinit(GridTab gridTab)booleanisAllSelected()booleanisInit()booleanisRefreshing()protected voidonADTabPanelParentChanged()voidonEvent(org.zkoss.zk.ui.event.Event event)voidonPageAttached(org.zkoss.zk.ui.Page newpage, org.zkoss.zk.ui.Page oldpage)voidonPageDetached(org.zkoss.zk.ui.Page page)voidonPostSelectedRowChanged()voidrefresh(GridTab gridTab)refresh after switching from form viewvoidreInit()voidscrollToCurrentRow()scroll grid to the current focus rowvoidsetADWindowPanel(AbstractADWindowContent winPanel)voidsetGridField(GridField[] gridField)voidsetPageSize(int pageSize)set paging sizevoidsetStatusLine(String text, boolean error)voidsetWindowNo(int windowNo)voidstateChange(StateChangeEvent event)voidtoggleSelectionForAll(boolean b)voidupdateListIndex()Update current row from modelbooleanupdateModelIndex(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:
onEventin 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:IFieldEditorContainerfocus to first field editor- Specified by:
focusToFirstEditorin interfaceIFieldEditorContainer
-
focusToNextEditor
public void focusToNextEditor(WEditor ref)
Description copied from interface:IFieldEditorContainerfocus to next field editor from ref- Specified by:
focusToNextEditorin interfaceIFieldEditorContainer
-
stateChange
public void stateChange(StateChangeEvent event)
- Specified by:
stateChangein 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:
onPageAttachedin interfaceorg.zkoss.zk.ui.sys.ComponentCtrl- Overrides:
onPageAttachedin classorg.zkoss.zk.ui.AbstractComponent
-
onPageDetached
public void onPageDetached(org.zkoss.zk.ui.Page page)
- Specified by:
onPageDetachedin interfaceorg.zkoss.zk.ui.sys.ComponentCtrl- Overrides:
onPageDetachedin classorg.zkoss.zk.ui.AbstractComponent
-
editorTraverse
public void editorTraverse(Callback<WEditor> editorTaverseCallback)
Description copied from interface:IFieldEditorContainerhelper method to loop thru editor collection of panel
can use on callout to check relative editor- Specified by:
editorTraversein interfaceIFieldEditorContainer
-
findCurrentSortColumn
public org.zkoss.zul.Column findCurrentSortColumn()
-
-