Package org.adempiere.webui.info
Class InfoWindow
java.lang.Object
org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zul.impl.XulElement
org.zkoss.zul.Window
org.adempiere.webui.component.Window
org.adempiere.webui.panel.InfoPanel
org.adempiere.webui.info.InfoWindow
- All Implemented Interfaces:
Serializable
,Cloneable
,ValueChangeListener
,WTableModelListener
,ISupportMask
,IHelpContext
,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
,org.zkoss.zul.ext.Framable
,org.zkoss.zul.ext.Sortable<Object>
- Direct Known Subclasses:
InfoAssetWindow
,InfoAssignmentWindow
,InfoBPartnerWindow
,InfoInOutWindow
,InfoInvoiceWindow
,InfoOrderWindow
,InfoPAttributeInstanceWindow
,InfoPAttributeWindow
,InfoPaymentWindow
,InfoProductWindow
public class InfoWindow
extends InfoPanel
implements ValueChangeListener, org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
AD_InfoWindow implementation
- Author:
- hengsin
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.zkoss.zul.Window
org.zkoss.zul.Window.Mode
Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrl
Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.AbstractComponent.Children, org.zkoss.zk.ui.AbstractComponent.ForwardInfo, org.zkoss.zk.ui.AbstractComponent.TargetInfo
-
Field Summary
Modifier and TypeFieldDescriptionprotected ColumnInfo[]
List of WEditorsprotected Tabbox
embedded Panel (AD_InfoRelated)protected ArrayList<EmbedWinInfo>
static final int
Max Length of Fieldsprotected InfoColumnVO[]
protected Properties
protected Menupopup
Popup menu for processprotected Grid
Query parameter gridList of editors that will trigger query after changes by userprotected Map<Integer,
RelatedInfoWindow> protected AccessSqlParser.TableInfo[]
protected AbstractWQuickEntry
Fields inherited from class org.adempiere.webui.panel.InfoPanel
ATT_INFO_PROCESS_KEY, autoCompleteSearchColumn, btCbbProcess, btMenuProcess, btProcessList, cbbProcess, COLUMN_VISIBLE_ORIGINAL, columnDataIndex, confirmPanel, contentPanel, editorMap, extra_max_row, hasRightQuickEntry, haveProcess, indexColumnCount, indexKeyOfView, indexOrderColumn, INFO_QUERY_TIME_OUT_ERROR, infoProcessBtList, infoProcessDropList, infoProcessList, infoProcessMenuList, infoWindow, isAutoComplete, isColumnSortAscending, isHasNextPage, isIDColumnKeyOfView, isIgnoreCacheAll, isMustUpdateColumnIndex, isQueryByUser, isRequeryByRunSuccessProcess, keyColumnOfView, log, lsReadedColumn, m_count, m_gridfield, m_infoWindowID, m_lookup, m_rowSelectionOrder, m_selectedCount, m_sqlCount, m_sqlMain, m_sqlOrder, m_values, m_viewIDMap, numPagePreLoad, ON_RUN_PROCESS, ON_SELECT_ALL_RECORDS, ON_USER_QUERY_ATTR, p_keyColumn, p_layout, p_loadedOK, p_multipleSelection, p_tableName, p_whereClause, p_WindowNo, pageNo, pageSize, paging, paraCtxValues, prevParameterValues, prevQueryOperators, prevRefParmeterEditor, prevWhereClause, PROCESS_ID_KEY, queryTimeout, queryValue, recordSelectedData, relatedInfoList, ROW_CTX_VARIABLE_PREFIX, ROW_ID_CTX_VARIABLE_NAME, sqlOrderColumn, statusBar, useQueryTimeoutFromSysConfig, VK_ENTER, VK_ESCAPE
Fields inherited from class org.adempiere.webui.component.Window
INSERT_END, INSERT_NEXT, INSERT_POSITION_KEY, MODE_EMBEDDED, MODE_HIGHLIGHTED, MODE_KEY, MODE_MODAL, MODE_OVERLAPPED, MODE_POPUP, REPLACE, showMaskWrapper
Fields inherited from class org.zkoss.zul.Window
EMBEDDED, HIGHLIGHTED, MODAL, OVERLAPPED, POPUP
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
_zclass
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
Fields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, AFTER_PARENT_CHANGED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
Fields inherited from interface org.adempiere.webui.ISupportMask
READY_SHOW_MASK_FLAG
-
Constructor Summary
ConstructorDescriptionInfoWindow
(int WindowNo, String tableName, String keyColumn, String queryValue, boolean multipleSelection, String whereClause, int AD_InfoWindow_ID) InfoWindow
(int WindowNo, String tableName, String keyColumn, String queryValue, boolean multipleSelection, String whereClause, int AD_InfoWindow_ID, boolean lookup) InfoWindow
(int WindowNo, String tableName, String keyColumn, String queryValue, boolean multipleSelection, String whereClause, int AD_InfoWindow_ID, boolean lookup, GridField field) InfoWindow
(int WindowNo, String tableName, String keyColumn, String queryValue, boolean multipleSelection, String whereClause, int AD_InfoWindow_ID, boolean lookup, GridField field, String predefinedContextVariables) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
IfInfoPanel.keyColumnOfView
not null and not display, addInfoPanel.keyColumnOfView
to queryprotected String
addMoreColumnToQuery
(String sqlMain, IInfoColumn[] listInfoColumn) Info window load infoColumns with isDisplay = true to construct the main query.protected void
addSearchParameter
(WEditor editor, WEditor editor2) add search parameterprotected void
addSelectionColumn
(InfoColumnVO infoColumn, GridField mField, GridField mField2) Add Selection Column to first Tabprotected void
Add all ViewID in each MInfoProcess to query.
If main query have subquery in SELECT, it will beak or incorrectprotected void
Evaluate display logic of processes.protected void
Evaluate display logic of process info button and set visibility of button.protected void
Create drop down list (Combobox) of processprotected void
Create popup of menu for processesprotected String
buildDataSQL
(int start, int end) build sql clause with pagingprotected void
cacheOriginalValues
(int rowIndex) protected void
create checkbox for ANDprotected ColumnInfo
createLookupColumnInfo
(AccessSqlParser.TableInfo[] tableInfos, GridField gridField, InfoColumnVO infoColumn) protected void
create query parameter panelprotected void
dynamicDisplay
(WEditor editor) protected void
enable/disable export buttonprotected void
evaluate display logic for input parametersprotected void
Execute Queryprotected int
findColumnIndex
(String columnName) protected InfoColumnVO
findInfoColumn
(GridField gridField) protected InfoColumnVO
findInfoColumnParameter
(GridField gridField) void
set focus to first parameter editorprotected int
Get id of window link with main table of this info windowint
getColumnIndex
(String columnName) Return (if exists) the index of the column in the gridReturn (if exists) the editor with the nameprotected GridField
getGridField
(InfoColumnVO infoColumn) author xolali IDEMPIERE-1045 GridField getGridField(InfoColumnVO infoColumn)author xolali IDEMPIERE-1045 getInfoColumnslayout(MInfoWindow info)protected int
getRowaAsCtx
(int row, int editingColumn, Object editingValue) protected String
Get dynamic WHERE part of SQL.
When override this method, please take isQueryByUser and prevWhereClause into consideration.protected boolean
protected boolean
hasNew()
Support create new record (default false)protected boolean
hasZoom()
Has Zoom support (default false)protected void
init export buttonprotected void
IDEMPIERE-1334
Load info processes by layout type.
Create buttons, drop down list and popup menu.
Set status of haveProcess flag.protected void
add paging component for list boxboolean
need override at infoWindow to check isDisplayprotected boolean
Check if parameter value has changeprotected void
layoutParameterGrid
(boolean update) layout query parameter panelprotected boolean
load info window definitionprotected boolean
load related infoprotected void
query ADInfoWindow from ADInfoWindowIDvoid
Move process buttons from left of centre panel to the front of right panelprotected void
Handle user click on new record button.void
onCellEditCallback
(ValueChangeEvent event, int rowIndex, int colIndex, WEditor editor, GridField field) protected void
handle on client info eventvoid
onEvent
(org.zkoss.zk.ui.event.Event event) void
onPageAttached
(org.zkoss.zk.ui.Page newpage, org.zkoss.zk.ui.Page oldpage) void
onQueryCallback
(org.zkoss.zk.ui.event.Event event) handle echo from query eventboolean
onRestoreSelectedItemIndexInPage
(Object keyViewValue, int rowIndex, Object oRow) Hook to intercept 'restore selection' actionsprotected void
Post query event if all editor with IsQueryAfterChange=True have been populatedprotected void
Setup list box and construct SQL query clauseprotected void
prepareTable
(ColumnInfo[] layout, String from, String where, String orderBy) set up list box and construct sql clauseprotected void
Process query value from input elementprotected void
renderContentPane
(org.zkoss.zul.Center center) layout center content paneprotected void
renderFooter
(org.zkoss.zul.South south) layout footerprotected void
renderParameterPane
(org.zkoss.zul.North north) layout query parameter paneprotected void
layout window UI elementsprotected void
reset
(EmbedWinInfo relatedInfo) reset to emptyprotected void
protected void
resetParameters
(WEditor editor) protected void
restoreOriginalValues
(int rowIndex) protected void
go through all data record, in case key value is inInfoPanel.recordSelectedData
, mark it as selected recordprotected void
Save Selection Details Get Location/Partner Infoprotected void
setParameter
(PreparedStatement pstmt, int parameterIndex, Object value, String queryOperator) Set parameters for prepared statement.
Does not need null check for value.protected int
setParameter
(WEditor editor, InfoColumnVO infoColumnVO, PreparedStatement pstmt, int parameterIndex) protected void
setParameters
(PreparedStatement pstmt, boolean forCount) Set Parameters for Query.protected void
setSouthVisible
(boolean visible) Allow to show or hide the sub panel (detail) programmaticallyvoid
tableChanged
(WTableModelEvent event) Notify listeners the exact range of cells, rows, or columns that have changed.protected boolean
Test Row Countprotected boolean
testCount
(boolean promptError) Test Row Countprotected void
protected void
protected void
testQueryForSplit
(String[] values) protected void
Get all selected record of current page and update toInfoPanel.recordSelectedData
.
Remove unselected record and add new selected record.
We maintain value of key, and extra value append byInfoPanel.appendInfoColumnData(ResultSet, List, IInfoColumn[], List)
protected void
updateSubcontent
(int row) Update related info for a specific row.protected boolean
validateField
(WEditor wEditor) Validate mandatory fields.
Display red color when a mandatory field is not fill.boolean
validate parameter before run queryvoid
On value change eventMethods inherited from class org.adempiere.webui.panel.InfoPanel
addValueChangeListener, appendDataForKeyView, appendDataForParentLink, appendDataForViewID, appendInfoColumnData, autoHideEmptyColumns, correctHeaderOrderIndicator, create, createT_Selection_InfoWindow, customize, dispose, enableButtons, enableButtons, fireValueChange, getAD_Window_ID, getAlias, getCacheEnd, getCacheStart, getColumnHeader, getColumnValue, getEvents, getFirstRowKey, getGridfield, getIndexKeyColumnOfView, getInfoColumnIDFromProcess, getIntSelectedRowKey, getKeyColumn, getKeyNullException, getLastSelectedRow, getOverIntValue, getOverIntValue, getPageSize, getRowCount, getRowKeyAt, getSaveKeys, getSelectedIDsForCtx, getSelectedKey, getSelectedKeys, getSelectedKeysCollection, getSelectedRowInfo, getSelectedRowKey, getSelectedRowKeys, getSelectedSQL, getSortDirection, getStatusLinesWidget, getSubList, getTableName, getUserOrderClause, getUserOrderClause, getWindowNo, hasCustomize, hasHistory, hasProcess, initParameters, isAutoHideEmptyColumns, isCancelled, isCloseAfterExecutionOfProcess, isIDColumn, isIDColumn, isLoadPageNumber, isLookup, isUseDatabasePaging, loadedOK, onCancel, onDoubleClick, onOk, onPageDetached, onUserQuery, parseQueryValue, preRunProcess, renderItems, runProcess, saveResultSelection, saveSelection, scrollToSelectedRow, setCloseAfterExecutionOfProcess, setContext, setFixedQueryTimeout, setGridfield, setMultipleSelection, setStatusDB, setStatusLine, setStatusSelected, showHistory, showPanel, sort, syncSelectedAfterRequery, updateContext, updateRowSelectionOrder, updateStatusBar, updateSubcontent, validateEndPage, validateOrderIndex, zoom
Methods inherited from class org.adempiere.webui.component.Window
dispose, getMaskComponent, getMaskObj, getModeAttribute, hideMask, isFireWindowCloseEventOnDetach, setFireWindowCloseEventOnDetach, showMask
Methods inherited from class org.zkoss.zul.Window
beforeChildAdded, clone, doEmbedded, doHighlighted, doModal, doOverlapped, doPopup, getBorder, getCaption, getContentSclass, getContentStyle, getMinheight, getMinwidth, getMode, getModeType, getPosition, getTitle, getZclass, inEmbedded, inHighlighted, inModal, inOverlapped, inPopup, insertBefore, isClosable, isCollapsible, isMaximizable, isMaximized, isMinimizable, isMinimized, isShadow, isSizable, onChildRemoved, onClose, onModal, renderProperties, service, setBorder, setBorder, setClosable, setContentSclass, setContentStyle, setDraggable, setMaximizable, setMaximized, setMinheight, setMinimizable, setMinimized, setMinwidth, setMode, setMode, setMode, setPosition, setShadow, setSizable, setTitle, setTopmost, setVisible
Methods inherited from class org.zkoss.zul.impl.XulElement
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, evalCSSFlex, focus, getAction, getClientAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, removeSclass, removeSclass, setAction, setClass, setClientAction, 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, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildRemoved, beforeParentChanged, destroyIndexCacheMap, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, disableHostChanged, enableBindingAnnotation, enableHostChanged, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, 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, getForwards, getId, getIndexCacheMap, getLastChild, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, initIndexCacheMap, invalidate, isChildable, isDisabledHostChanged, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onParentChanged, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, renderPropertiesOnly, 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, setVisibleDirectly, 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.zkoss.zk.ui.ext.Scope
addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute
Methods inherited from interface org.zkoss.zul.ext.Sortable
sort
-
Field Details
-
parameterGrid
Query parameter grid -
editors
List of WEditors -
editors2
-
queryAfterChangeEditors
List of editors that will trigger query after changes by user -
identifiers
-
infoContext
-
embeddedPane
embedded Panel (AD_InfoRelated) -
embeddedWinList
-
FIELDLENGTH
public static final int FIELDLENGTHMax Length of Fields- See Also:
-
columnInfos
-
tableInfos
-
infoColumns
-
vqe
-
ipMenu
Popup menu for process
-
-
Constructor Details
-
InfoWindow
public InfoWindow(int WindowNo, String tableName, String keyColumn, String queryValue, boolean multipleSelection, String whereClause, int AD_InfoWindow_ID) - Parameters:
WindowNo
-tableName
-keyColumn
-queryValue
-multipleSelection
-whereClause
-AD_InfoWindow_ID
-
-
InfoWindow
public InfoWindow(int WindowNo, String tableName, String keyColumn, String queryValue, boolean multipleSelection, String whereClause, int AD_InfoWindow_ID, boolean lookup) - Parameters:
WindowNo
-tableName
-keyColumn
-queryValue
-multipleSelection
-whereClause
-AD_InfoWindow_ID
-lookup
-
-
InfoWindow
public InfoWindow(int WindowNo, String tableName, String keyColumn, String queryValue, boolean multipleSelection, String whereClause, int AD_InfoWindow_ID, boolean lookup, GridField field) - Parameters:
WindowNo
-tableName
-keyColumn
-queryValue
-multipleSelection
-whereClause
-AD_InfoWindow_ID
-lookup
-field
-
-
InfoWindow
public InfoWindow(int WindowNo, String tableName, String keyColumn, String queryValue, boolean multipleSelection, String whereClause, int AD_InfoWindow_ID, boolean lookup, GridField field, String predefinedContextVariables) - Parameters:
WindowNo
-tableName
-keyColumn
-queryValue
-multipleSelection
-whereClause
-AD_InfoWindow_ID
-lookup
-field
-predefinedContextVariables
-
-
-
Method Details
-
focusToFirstEditor
public void focusToFirstEditor()set focus to first parameter editor -
updateSubcontent
protected void updateSubcontent(int row) Update related info for a specific row. If targetRow < 0, update using selected row.- Overrides:
updateSubcontent
in classInfoPanel
-
initInfoProcess
protected void initInfoProcess()IDEMPIERE-1334
Load info processes by layout type.
Create buttons, drop down list and popup menu.
Set status of haveProcess flag. -
bindInfoProcess
protected void bindInfoProcess()Evaluate display logic of processes. Implemented by sub class.- Overrides:
bindInfoProcess
in classInfoPanel
-
bindInfoProcessBt
protected void bindInfoProcessBt()Evaluate display logic of process info button and set visibility of button. -
bindInfoProcessDropDown
protected void bindInfoProcessDropDown()Create drop down list (Combobox) of process -
bindInfoProcessMenu
protected void bindInfoProcessMenu()Create popup of menu for processes -
moveProcessButtonsToBeforeRight
public void moveProcessButtonsToBeforeRight()Move process buttons from left of centre panel to the front of right panel -
processQueryValue
protected void processQueryValue()Process query value from input element -
testQueryForAutoComplete
protected void testQueryForAutoComplete() -
testQueryForEachIdentifier
protected void testQueryForEachIdentifier() -
testQueryForSplit
-
loadInfoWindowData
protected void loadInfoWindowData()Description copied from class:InfoPanel
query ADInfoWindow from ADInfoWindowID- Overrides:
loadInfoWindowData
in classInfoPanel
-
loadInfoDefinition
protected boolean loadInfoDefinition()load info window definition- Returns:
- true if loaded ok
-
loadInfoRelatedTabs
protected boolean loadInfoRelatedTabs()load related info- Returns:
- true if loaded ok
-
prepareTable
protected void prepareTable()Setup list box and construct SQL query clause -
createLookupColumnInfo
protected ColumnInfo createLookupColumnInfo(AccessSqlParser.TableInfo[] tableInfos, GridField gridField, InfoColumnVO infoColumn) - Parameters:
tableInfos
-gridField
-infoColumn
-- Returns:
ColumnInfo
-
getSQLWhere
Description copied from class:InfoPanel
Get dynamic WHERE part of SQL.
When override this method, please take isQueryByUser and prevWhereClause into consideration.- Specified by:
getSQLWhere
in classInfoPanel
- Returns:
- WHERE clause
-
findInfoColumn
- Parameters:
gridField
-- Returns:
InfoColumnVO
if found, null otherwise
-
findInfoColumnParameter
- Parameters:
gridField
-- Returns:
InfoColumnVO
if found, null otherwise
-
isParameteChangeValue
protected boolean isParameteChangeValue()Check if parameter value has change- Returns:
- true if at least one parameter value has change or this is the first search by user
-
setParameters
Description copied from class:InfoPanel
Set Parameters for Query.
When override this method, please take isQueryByUser and prevWhereClause into consideration.- Specified by:
setParameters
in classInfoPanel
- Parameters:
pstmt
- statementforCount
- for counting records- Throws:
SQLException
-
setParameter
protected int setParameter(WEditor editor, InfoColumnVO infoColumnVO, PreparedStatement pstmt, int parameterIndex) throws SQLException - Parameters:
editor
-infoColumnVO
-pstmt
-parameterIndex
- current parameter index- Returns:
- current parameter index
- Throws:
SQLException
-
setParameter
protected void setParameter(PreparedStatement pstmt, int parameterIndex, Object value, String queryOperator) throws SQLException Set parameters for prepared statement.
Does not need null check for value.- Parameters:
pstmt
-parameterIndex
-value
-queryOperator
-- Throws:
SQLException
-
prepareTable
Description copied from class:InfoPanel
set up list box and construct sql clause- Overrides:
prepareTable
in classInfoPanel
-
addViewIDToQuery
protected void addViewIDToQuery()Add all ViewID in each MInfoProcess to query.
If main query have subquery in SELECT, it will beak or incorrect -
addKeyViewToQuery
protected void addKeyViewToQuery()IfInfoPanel.keyColumnOfView
not null and not display, addInfoPanel.keyColumnOfView
to query -
isNeedAppendKeyViewData
public boolean isNeedAppendKeyViewData()Description copied from class:InfoPanel
need override at infoWindow to check isDisplay- Overrides:
isNeedAppendKeyViewData
in classInfoPanel
- Returns:
- true if need to append
InfoPanel.keyColumnOfView
toInfoPanel.columnDataIndex
-
addMoreColumnToQuery
Info window load infoColumns with isDisplay = true to construct the main query.
Some function uses data from hidden column as viewID in infoProcess or as parentLink of infoRelateWindow. This function is use to append the hidden column to main query. Append info window column to query.- Parameters:
sqlMain
- main SQL to append columnlistInfoColumn
- list of info column to add to query- Returns:
- SQL after append column
-
renderWindow
protected void renderWindow()layout window UI elements -
insertPagingComponent
protected void insertPagingComponent()Description copied from class:InfoPanel
add paging component for list box- Overrides:
insertPagingComponent
in classInfoPanel
-
renderContentPane
protected void renderContentPane(org.zkoss.zul.Center center) layout center content pane- Parameters:
center
-
-
renderParameterPane
protected void renderParameterPane(org.zkoss.zul.North north) layout query parameter pane- Parameters:
north
-
-
createParameterPanel
protected void createParameterPanel()create query parameter panel -
layoutParameterGrid
protected void layoutParameterGrid(boolean update) layout query parameter panel- Parameters:
update
-
-
evalDisplayLogic
protected void evalDisplayLogic()evaluate display logic for input parameters -
addSelectionColumn
Add Selection Column to first Tab- Parameters:
infoColumn
-mField
- field
-
addSearchParameter
add search parameter- Parameters:
editor
-editor2
-
-
getNoOfParameterColumns
protected int getNoOfParameterColumns()- Returns:
- number of columns for parameter grid
-
createAndCheckbox
protected void createAndCheckbox()create checkbox for AND -
findColumnIndex
- Parameters:
columnName
-- Returns:
- column index, -1 if not found
-
saveSelectionDetail
protected void saveSelectionDetail()Save Selection Details Get Location/Partner Info- Overrides:
saveSelectionDetail
in classInfoPanel
-
buildDataSQL
Description copied from class:InfoPanel
build sql clause with paging- Overrides:
buildDataSQL
in classInfoPanel
- Returns:
- sql clause
-
executeQuery
protected void executeQuery()Description copied from class:InfoPanel
Execute Query- Overrides:
executeQuery
in classInfoPanel
-
hasZoom
protected boolean hasZoom()Description copied from class:InfoPanel
Has Zoom support (default false) -
valueChange
Description copied from interface:ValueChangeListener
On value change event- Specified by:
valueChange
in interfaceValueChangeListener
-
postQueryAfterChangeEvent
protected void postQueryAfterChangeEvent()Post query event if all editor with IsQueryAfterChange=True have been populated -
dynamicDisplay
- Parameters:
editor
-
-
onEvent
public void onEvent(org.zkoss.zk.ui.event.Event event) -
resetParameters
protected void resetParameters()- Overrides:
resetParameters
in classInfoPanel
-
resetParameters
- Parameters:
editor
-
-
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 classInfoPanel
-
onClientInfo
protected void onClientInfo()handle on client info event -
testCount
protected boolean testCount()Test Row Count -
testCount
protected boolean testCount(boolean promptError) Test Row Count- Returns:
- true if display
-
hasIsActiveEditor
protected boolean hasIsActiveEditor()- Returns:
- true if there is an 'IsActive' criteria
-
getInfoColumnslayout
author xolali IDEMPIERE-1045 getInfoColumnslayout(MInfoWindow info)- Parameters:
info
-- Returns:
- list of
ColumnInfo
-
reset
reset to empty- Parameters:
relatedInfo
-
-
getGridField
author xolali IDEMPIERE-1045 GridField getGridField(InfoColumnVO infoColumn)- Parameters:
infoColumn
-- Returns:
- GridField
-
validateParameters
public boolean validateParameters()validate parameter before run query eval input value of mandatory field, if null show field in red color- Overrides:
validateParameters
in classInfoPanel
- Returns:
- true if parameters pass validation
-
validateField
Validate mandatory fields.
Display red color when a mandatory field is not fill.- Parameters:
wEditor
-- Returns:
- true if pass mandatory validation, false otherwise
-
hasNew
protected boolean hasNew()Description copied from class:InfoPanel
Support create new record (default false) -
getADWindowID
protected int getADWindowID()Get id of window link with main table of this info window- Returns:
- AD_Window_ID
-
newRecordAction
protected void newRecordAction()Description copied from class:InfoPanel
Handle user click on new record button.- Overrides:
newRecordAction
in classInfoPanel
-
setSouthVisible
protected void setSouthVisible(boolean visible) Allow to show or hide the sub panel (detail) programmatically- Parameters:
visible
-
-
getRowaAsCtx
- Parameters:
row
-editingColumn
-editingValue
-- Returns:
Properties
-
onCellEditCallback
public void onCellEditCallback(ValueChangeEvent event, int rowIndex, int colIndex, WEditor editor, GridField field) - Parameters:
event
-rowIndex
-colIndex
-editor
-field
-
-
restoreOriginalValues
protected void restoreOriginalValues(int rowIndex) - Parameters:
rowIndex
-
-
cacheOriginalValues
protected void cacheOriginalValues(int rowIndex) - Parameters:
rowIndex
-
-
tableChanged
Description copied from interface:WTableModelListener
Notify listeners the exact range of cells, rows, or columns that have changed.- Specified by:
tableChanged
in interfaceWTableModelListener
- Overrides:
tableChanged
in classInfoPanel
- Parameters:
event
- table model event
-
onQueryCallback
public void onQueryCallback(org.zkoss.zk.ui.event.Event event) Description copied from class:InfoPanel
handle echo from query event- Overrides:
onQueryCallback
in classInfoPanel
- Parameters:
event
- null to indicate reset instead of echo from query event
-
updateListSelected
protected void updateListSelected()Description copied from class:InfoPanel
Get all selected record of current page and update toInfoPanel.recordSelectedData
.
Remove unselected record and add new selected record.
We maintain value of key, and extra value append byInfoPanel.appendInfoColumnData(ResultSet, List, IInfoColumn[], List)
- Overrides:
updateListSelected
in classInfoPanel
-
restoreSelectedInPage
protected void restoreSelectedInPage()Description copied from class:InfoPanel
go through all data record, in case key value is inInfoPanel.recordSelectedData
, mark it as selected record- Overrides:
restoreSelectedInPage
in classInfoPanel
-
onRestoreSelectedItemIndexInPage
Description copied from class:InfoPanel
Hook to intercept 'restore selection' actions- Overrides:
onRestoreSelectedItemIndexInPage
in classInfoPanel
- Parameters:
keyViewValue
- row view keyrowIndex
- row indexoRow
- row- Returns:
- false to skip restore selection
-
initExport
protected void initExport()init export button -
enableExportButton
protected void enableExportButton()enable/disable export button -
getEditor
Return (if exists) the editor with the name- Parameters:
columnName
-- Returns:
- editor
-
getColumnIndex
Return (if exists) the index of the column in the grid- Parameters:
columnName
-- Returns:
- index of the column
-