Package org.adempiere.webui.adwindow
Class AbstractADWindowContent
- java.lang.Object
-
- org.adempiere.webui.part.AbstractUIPart
-
- org.adempiere.webui.adwindow.AbstractADWindowContent
-
- All Implemented Interfaces:
EventListener,ActionListener,ToolbarListener,ISupportMask,ITabOnSelectHandler,UIPart,DataStatusListener,org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
- Direct Known Subclasses:
ADWindowContent
public abstract class AbstractADWindowContent extends AbstractUIPart implements ToolbarListener, org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>, DataStatusListener, ActionListener, ITabOnSelectHandler
This class is based on org.compiere.apps.APanel written by Jorg Janke.- Version:
- $Revision: 0.10 $
- Author:
- Jorg Janke, Ashley G Ramdass, Low Heng Sin, Cristina Ghita, www.arhipac.ro
see FR [ 2877111 ] See identifiers columns when delete records https://sourceforge.net/p/adempiere/feature-requests/855/, hengsin, hengsin.low@idalica.com
see FR [2887701] https://sourceforge.net/p/adempiere/feature-requests/866/, Teo Sarca, teo.sarca@gmail.com
- BF [ 2992540 ] Grid/Panel not refreshed after process run https://sourceforge.net/p/adempiere/zk-web-client/418/
- BF [ 2985892 ] Opening a window using a new record query is not working https://sourceforge.net/p/adempiere/zk-web-client/411/
-
-
Field Summary
Fields Modifier and Type Field Description protected IADTabboxadTabboxprotected ADWindowadwindowprotected BreadCrumbbreadCrumbprotected StatusBarstatusBarprotected StatusBarstatusBarQFQuick Form Status barprotected Stringtitleprotected ADWindowToolbartoolbar-
Fields inherited from class org.adempiere.webui.part.AbstractUIPart
page, showMaskWrapper
-
Fields inherited from interface org.adempiere.webui.ISupportMask
READY_SHOW_MASK_FLAG
-
Fields inherited from interface org.adempiere.webui.part.ITabOnSelectHandler
ATTRIBUTE_KEY
-
-
Constructor Summary
Constructors Constructor Description AbstractADWindowContent(Properties ctx, int windowNo, int adWindowId)Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(ActionEvent event)voidcloseQuickFormTab(Integer AD_Tab_ID)Close Quick form to remove tabID from the listprotected abstract IADTabboxcreateADTab()org.zkoss.zk.ui.ComponentcreatePart(Object parent)voiddataStatusChanged(DataStatusEvent e)Data ChangedvoiddoOnQueryChange()Simulate opening the Find Window, selecting a user query and click okprotected voiddoOnRefresh(boolean fireEvent)voidexecuteASync(ProcessInfo pi)voidexecuteButtonProcess(IProcessButton wButton, boolean startWOasking, int table_ID, int record_ID, boolean isProcessMandatory)IADTabpanelfindADTabpanel(IProcessButton button)voidfocusToActivePanel()set focus to active panelGridTabgetActiveGridTab()IADTabboxgetADTab()ADWindowgetADWindow()BreadCrumbgetBreadCrumb()FindWindowgetCurrentFindWindow()QuickGridViewgetCurrQGV()booleangetFindWindow(GridField[] findFields)GridWindowgetGridWindow()MImagegetImage()ArrayList<Integer>getOpenQuickFormTabs()Get list of open quick form tabsStatusBargetStatusBar()StatusBargetStatusBarQF()StringgetTitle()ADWindowToolbargetToolbar()intgetWindowNo()voidhideBusyMask()booleaninitPanel(MQuery query)protected GridTabinitTab(MQuery query, int tabIndex)booleanisBlock()booleanisFirstTab()booleanisPendingChanges()voidonActiveWorkflows()Show active workflow for current recordvoidonArchive()Open the archive dialogvoidonAttachment()Open the attachment dialogvoidonChat()open chat windowvoidonCopy()Copy current record as a new recordvoidonCSVImport()CSV import datavoidonCustomize()show dialog to customize fields (hidden, display, order of field) in grid modevoidonDelete()Delete current recordvoidonDetailRecord()Navigate to detail record, i.e next tabvoidonEvent(org.zkoss.zk.ui.event.Event event)voidonExit(Callback<Boolean> callback)voidonExport()Export grid datavoidonFileImport()File import datavoidonFind()Open the find/search dialogvoidonFirst()Navigate to first recordvoidonHelp()Open the help windowvoidonIgnore()Ignore user changesvoidonLast()Navigate to last recordvoidonLock()Personal lockvoidonNew()Create new recordvoidonNext()Navigate to next recordvoidonParentRecord()Navigate to parent record, i.e previous tabvoidonPostIt()voidonPrevious()Navigate to previous recordvoidonPrint()Print documentvoidonProcess()voidonProductInfo()View product infovoidonQuickForm()Invoke when quick form is clickvoidonRefresh()Refresh current recordvoidonRefresh(boolean fireEvent)refresh all rowvoidonRefresh(boolean fireEvent, boolean saveCurrentRow)refresh all rowvoidonReport()View available report for current tabvoidonRequests()Open the request menu where user can view available request or create a new requestvoidonSave()Save current recordvoidonSave(boolean onSaveEvent, boolean onNavigationEvent, Callback<Boolean> callback)voidonSaveCreate()Save and createvoidonSavePayment()voidonSearchQuery()Select query from the user query listvoidonSelect()handle tab on_select eventvoidonToggle()Toggle record presentation between free form and tabularvoidonTreeNavigate(GridTab gt, int rowIndex)voidonZoomAcross()Zoom to window where current record is usebooleanregisterQuickFormTab(Integer AD_Tab_ID)Register Quick form against tabIDvoidsaveAndNavigate(Callback<Boolean> callback)voidsetADWindow(ADWindow adwindow)voidsetCurrQGV(QuickGridView currQGV)voidsetStatusBarQF(StatusBar statusBar)voidshowBusyMask(Window window)protected abstract voidswitchEditStatus(boolean editStatus)-
Methods inherited from class org.adempiere.webui.part.AbstractUIPart
doCreatePart, getMaskComponent, getMaskObj, hideMask, showMask
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.adempiere.webui.part.UIPart
getComponent
-
-
-
-
Field Detail
-
statusBar
protected StatusBar statusBar
-
adTabbox
protected IADTabbox adTabbox
-
toolbar
protected ADWindowToolbar toolbar
-
title
protected String title
-
breadCrumb
protected BreadCrumb breadCrumb
-
statusBarQF
protected StatusBar statusBarQF
Quick Form Status bar
-
adwindow
protected ADWindow adwindow
-
-
Constructor Detail
-
AbstractADWindowContent
public AbstractADWindowContent(Properties ctx, int windowNo, int adWindowId)
Constructor- Parameters:
ctx-windowNo-adWindowId-
-
-
Method Detail
-
createPart
public org.zkoss.zk.ui.Component createPart(Object parent)
- Specified by:
createPartin interfaceUIPart- Overrides:
createPartin classAbstractUIPart- Parameters:
parent-- Returns:
- Component
-
getBreadCrumb
public BreadCrumb getBreadCrumb()
-
getStatusBar
public StatusBar getStatusBar()
- Returns:
- StatusBarPanel
-
createADTab
protected abstract IADTabbox createADTab()
- Returns:
- IADTab
-
switchEditStatus
protected abstract void switchEditStatus(boolean editStatus)
-
focusToActivePanel
public void focusToActivePanel()
set focus to active panel
-
initPanel
public boolean initPanel(MQuery query)
- Parameters:
query-- Returns:
- boolean
-
getTitle
public String getTitle()
-
getImage
public MImage getImage()
-
onDetailRecord
public void onDetailRecord()
Description copied from interface:ToolbarListenerNavigate to detail record, i.e next tab- Specified by:
onDetailRecordin interfaceToolbarListener- See Also:
ToolbarListener.onDetailRecord()
-
onParentRecord
public void onParentRecord()
Description copied from interface:ToolbarListenerNavigate to parent record, i.e previous tab- Specified by:
onParentRecordin interfaceToolbarListener- See Also:
ToolbarListener.onParentRecord()
-
onFirst
public void onFirst()
Description copied from interface:ToolbarListenerNavigate to first record- Specified by:
onFirstin interfaceToolbarListener- See Also:
ToolbarListener.onFirst()
-
onLast
public void onLast()
Description copied from interface:ToolbarListenerNavigate to last record- Specified by:
onLastin interfaceToolbarListener- See Also:
ToolbarListener.onLast()
-
onNext
public void onNext()
Description copied from interface:ToolbarListenerNavigate to next record- Specified by:
onNextin interfaceToolbarListener- See Also:
ToolbarListener.onNext()
-
onPrevious
public void onPrevious()
Description copied from interface:ToolbarListenerNavigate to previous record- Specified by:
onPreviousin interfaceToolbarListener- See Also:
ToolbarListener.onPrevious()
-
onTreeNavigate
public void onTreeNavigate(GridTab gt, int rowIndex)
- See Also:
ToolbarListener.onPrevious()
-
onLock
public void onLock()
Description copied from interface:ToolbarListenerPersonal lock- Specified by:
onLockin interfaceToolbarListener- See Also:
ToolbarListener.onLock()
-
onAttachment
public void onAttachment()
Description copied from interface:ToolbarListenerOpen the attachment dialog- Specified by:
onAttachmentin interfaceToolbarListener- See Also:
ToolbarListener.onAttachment()
-
onChat
public void onChat()
Description copied from interface:ToolbarListeneropen chat window- Specified by:
onChatin interfaceToolbarListener
-
onPostIt
public void onPostIt()
-
onToggle
public void onToggle()
Description copied from interface:ToolbarListenerToggle record presentation between free form and tabular- Specified by:
onTogglein interfaceToolbarListener- See Also:
ToolbarListener.onToggle()
-
onQuickForm
public void onQuickForm()
Invoke when quick form is click
-
onEvent
public void onEvent(org.zkoss.zk.ui.event.Event event)
- Specified by:
onEventin interfaceorg.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>- Parameters:
event-- See Also:
EventListener.onEvent(Event)
-
dataStatusChanged
public void dataStatusChanged(DataStatusEvent e)
Description copied from interface:DataStatusListenerData Changed- Specified by:
dataStatusChangedin interfaceDataStatusListener- Parameters:
e-- See Also:
DataStatusListener.dataStatusChanged(DataStatusEvent)
-
isFirstTab
public boolean isFirstTab()
- Returns:
- boolean
-
onRefresh
public void onRefresh(boolean fireEvent)
refresh all row- Parameters:
fireEvent-
-
onRefresh
public void onRefresh(boolean fireEvent, boolean saveCurrentRow)refresh all row- Parameters:
fireEvent-saveCurrentRow-
-
doOnRefresh
protected void doOnRefresh(boolean fireEvent)
- Parameters:
fireEvent-
-
onRefresh
public void onRefresh()
Description copied from interface:ToolbarListenerRefresh current record- Specified by:
onRefreshin interfaceToolbarListener- See Also:
ToolbarListener.onRefresh()
-
onHelp
public void onHelp()
Description copied from interface:ToolbarListenerOpen the help window- Specified by:
onHelpin interfaceToolbarListener- See Also:
ToolbarListener.onHelp()
-
onNew
public void onNew()
Description copied from interface:ToolbarListenerCreate new record- Specified by:
onNewin interfaceToolbarListener
-
onCopy
public void onCopy()
Description copied from interface:ToolbarListenerCopy current record as a new record- Specified by:
onCopyin interfaceToolbarListener
-
onFind
public void onFind()
Description copied from interface:ToolbarListenerOpen the find/search dialog- Specified by:
onFindin interfaceToolbarListener- See Also:
ToolbarListener.onFind()
-
onIgnore
public void onIgnore()
Description copied from interface:ToolbarListenerIgnore user changes- Specified by:
onIgnorein interfaceToolbarListener
-
onSave
public void onSave()
Description copied from interface:ToolbarListenerSave current record- Specified by:
onSavein interfaceToolbarListener- See Also:
ToolbarListener.onSave()
-
onSave
public void onSave(boolean onSaveEvent, boolean onNavigationEvent, Callback<Boolean> callback)
-
onSavePayment
public void onSavePayment()
-
onSaveCreate
public void onSaveCreate()
Description copied from interface:ToolbarListenerSave and create- Specified by:
onSaveCreatein interfaceToolbarListener- See Also:
ToolbarListener.onSaveCreate()
-
onDelete
public void onDelete()
Description copied from interface:ToolbarListenerDelete current record- Specified by:
onDeletein interfaceToolbarListener
-
onPrint
public void onPrint()
Description copied from interface:ToolbarListenerPrint document- Specified by:
onPrintin interfaceToolbarListener
-
onReport
public void onReport()
Description copied from interface:ToolbarListenerView available report for current tab- Specified by:
onReportin interfaceToolbarListener- See Also:
ToolbarListener.onReport()
-
onZoomAcross
public void onZoomAcross()
Description copied from interface:ToolbarListenerZoom to window where current record is use- Specified by:
onZoomAcrossin interfaceToolbarListener- See Also:
ToolbarListener.onZoomAcross()
-
onActiveWorkflows
public void onActiveWorkflows()
Description copied from interface:ToolbarListenerShow active workflow for current record- Specified by:
onActiveWorkflowsin interfaceToolbarListener- See Also:
ToolbarListener.onActiveWorkflows()
-
onRequests
public void onRequests()
Description copied from interface:ToolbarListenerOpen the request menu where user can view available request or create a new request- Specified by:
onRequestsin interfaceToolbarListener- See Also:
ToolbarListener.onRequests()
-
onProductInfo
public void onProductInfo()
Description copied from interface:ToolbarListenerView product info- Specified by:
onProductInfoin interfaceToolbarListener- See Also:
ToolbarListener.onProductInfo()
-
onArchive
public void onArchive()
Description copied from interface:ToolbarListenerOpen the archive dialog- Specified by:
onArchivein interfaceToolbarListener- See Also:
ToolbarListener.onArchive()
-
onExport
public void onExport()
Description copied from interface:ToolbarListenerExport grid data- Specified by:
onExportin interfaceToolbarListener
-
onFileImport
public void onFileImport()
Description copied from interface:ToolbarListenerFile import data- Specified by:
onFileImportin interfaceToolbarListener
-
onCSVImport
public void onCSVImport()
Description copied from interface:ToolbarListenerCSV import data- Specified by:
onCSVImportin interfaceToolbarListener
-
onSearchQuery
public void onSearchQuery()
Description copied from interface:ToolbarListenerSelect query from the user query list- Specified by:
onSearchQueryin interfaceToolbarListener
-
doOnQueryChange
public void doOnQueryChange()
Simulate opening the Find Window, selecting a user query and click ok
-
hideBusyMask
public void hideBusyMask()
-
showBusyMask
public void showBusyMask(Window window)
-
isBlock
public boolean isBlock()
- Returns:
- true if window is block by mask or highlighted window
-
executeButtonProcess
public void executeButtonProcess(IProcessButton wButton, boolean startWOasking, int table_ID, int record_ID, boolean isProcessMandatory)
-
actionPerformed
public void actionPerformed(ActionEvent event)
- Specified by:
actionPerformedin interfaceActionListener- Parameters:
event-- See Also:
ActionListener.actionPerformed(ActionEvent)
-
findADTabpanel
public IADTabpanel findADTabpanel(IProcessButton button)
-
getADTab
public IADTabbox getADTab()
- Returns:
- IADTab
-
executeASync
public void executeASync(ProcessInfo pi)
- Parameters:
pi-
-
getToolbar
public ADWindowToolbar getToolbar()
- Returns:
- toolbar instance
-
getActiveGridTab
public GridTab getActiveGridTab()
- Returns:
- active grid tab
-
getWindowNo
public int getWindowNo()
- Returns:
- windowNo
-
onCustomize
public void onCustomize()
show dialog to customize fields (hidden, display, order of field) in grid mode- Specified by:
onCustomizein interfaceToolbarListener- See Also:
CustomizeGridViewDialog,ToolbarListener.onCustomize()
-
onProcess
public void onProcess()
- Specified by:
onProcessin interfaceToolbarListener- See Also:
ToolbarListener.onProcess()
-
onSelect
public void onSelect()
Description copied from interface:ITabOnSelectHandlerhandle tab on_select event- Specified by:
onSelectin interfaceITabOnSelectHandler
-
isPendingChanges
public boolean isPendingChanges()
-
setADWindow
public void setADWindow(ADWindow adwindow)
-
getADWindow
public ADWindow getADWindow()
-
getFindWindow
public boolean getFindWindow(GridField[] findFields)
-
getCurrentFindWindow
public FindWindow getCurrentFindWindow()
-
getStatusBarQF
public StatusBar getStatusBarQF()
- Returns:
- Quick Form StatusBar
-
setStatusBarQF
public void setStatusBarQF(StatusBar statusBar)
- Parameters:
statusBar-
-
getCurrQGV
public QuickGridView getCurrQGV()
- Returns:
-
setCurrQGV
public void setCurrQGV(QuickGridView currQGV)
- Parameters:
currQGV-
-
closeQuickFormTab
public void closeQuickFormTab(Integer AD_Tab_ID)
Close Quick form to remove tabID from the list- Parameters:
AD_Tab_ID-
-
getOpenQuickFormTabs
public ArrayList<Integer> getOpenQuickFormTabs()
Get list of open quick form tabs- Returns:
- list of tabIDs
-
registerQuickFormTab
public boolean registerQuickFormTab(Integer AD_Tab_ID)
Register Quick form against tabID- Parameters:
AD_Tab_ID-- Returns:
- False when already quick form opens for same tab
-
getGridWindow
public GridWindow getGridWindow()
- Returns:
GridWindow
-
-