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 IADTabbox
adTabbox
protected ADWindow
adwindow
protected BreadCrumb
breadCrumb
protected StatusBar
statusBar
protected StatusBar
statusBarQF
Quick Form Status barprotected String
title
protected ADWindowToolbar
toolbar
-
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 void
actionPerformed(ActionEvent event)
void
closeQuickFormTab(Integer AD_Tab_ID)
Close Quick form to remove tabID from the listprotected abstract IADTabbox
createADTab()
org.zkoss.zk.ui.Component
createPart(Object parent)
void
dataStatusChanged(DataStatusEvent e)
Data Changedvoid
doOnQueryChange()
Simulate opening the Find Window, selecting a user query and click okprotected void
doOnRefresh(boolean fireEvent)
void
executeASync(ProcessInfo pi)
void
executeButtonProcess(IProcessButton wButton, boolean startWOasking, int table_ID, int record_ID, boolean isProcessMandatory)
IADTabpanel
findADTabpanel(IProcessButton button)
void
focusToActivePanel()
set focus to active panelGridTab
getActiveGridTab()
IADTabbox
getADTab()
ADWindow
getADWindow()
BreadCrumb
getBreadCrumb()
FindWindow
getCurrentFindWindow()
QuickGridView
getCurrQGV()
boolean
getFindWindow(GridField[] findFields)
GridWindow
getGridWindow()
MImage
getImage()
ArrayList<Integer>
getOpenQuickFormTabs()
Get list of open quick form tabsStatusBar
getStatusBar()
StatusBar
getStatusBarQF()
String
getTitle()
ADWindowToolbar
getToolbar()
int
getWindowNo()
void
hideBusyMask()
boolean
initPanel(MQuery query)
protected GridTab
initTab(MQuery query, int tabIndex)
boolean
isBlock()
boolean
isFirstTab()
boolean
isPendingChanges()
void
onActiveWorkflows()
Show active workflow for current recordvoid
onArchive()
Open the archive dialogvoid
onAttachment()
Open the attachment dialogvoid
onChat()
open chat windowvoid
onCopy()
Copy current record as a new recordvoid
onCSVImport()
CSV import datavoid
onCustomize()
show dialog to customize fields (hidden, display, order of field) in grid modevoid
onDelete()
Delete current recordvoid
onDetailRecord()
Navigate to detail record, i.e next tabvoid
onEvent(org.zkoss.zk.ui.event.Event event)
void
onExit(Callback<Boolean> callback)
void
onExport()
Export grid datavoid
onFileImport()
File import datavoid
onFind()
Open the find/search dialogvoid
onFirst()
Navigate to first recordvoid
onHelp()
Open the help windowvoid
onIgnore()
Ignore user changesvoid
onLast()
Navigate to last recordvoid
onLock()
Personal lockvoid
onNew()
Create new recordvoid
onNext()
Navigate to next recordvoid
onParentRecord()
Navigate to parent record, i.e previous tabvoid
onPostIt()
void
onPrevious()
Navigate to previous recordvoid
onPrint()
Print documentvoid
onProcess()
void
onProductInfo()
View product infovoid
onQuickForm()
Invoke when quick form is clickvoid
onRefresh()
Refresh current recordvoid
onRefresh(boolean fireEvent)
refresh all rowvoid
onRefresh(boolean fireEvent, boolean saveCurrentRow)
refresh all rowvoid
onReport()
View available report for current tabvoid
onRequests()
Open the request menu where user can view available request or create a new requestvoid
onSave()
Save current recordvoid
onSave(boolean onSaveEvent, boolean onNavigationEvent, Callback<Boolean> callback)
void
onSaveCreate()
Save and createvoid
onSavePayment()
void
onSearchQuery()
Select query from the user query listvoid
onSelect()
handle tab on_select eventvoid
onToggle()
Toggle record presentation between free form and tabularvoid
onTreeNavigate(GridTab gt, int rowIndex)
void
onZoomAcross()
Zoom to window where current record is useboolean
registerQuickFormTab(Integer AD_Tab_ID)
Register Quick form against tabIDvoid
saveAndNavigate(Callback<Boolean> callback)
void
setADWindow(ADWindow adwindow)
void
setCurrQGV(QuickGridView currQGV)
void
setStatusBarQF(StatusBar statusBar)
void
showBusyMask(Window window)
protected abstract void
switchEditStatus(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:
createPart
in interfaceUIPart
- Overrides:
createPart
in 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:ToolbarListener
Navigate to detail record, i.e next tab- Specified by:
onDetailRecord
in interfaceToolbarListener
- See Also:
ToolbarListener.onDetailRecord()
-
onParentRecord
public void onParentRecord()
Description copied from interface:ToolbarListener
Navigate to parent record, i.e previous tab- Specified by:
onParentRecord
in interfaceToolbarListener
- See Also:
ToolbarListener.onParentRecord()
-
onFirst
public void onFirst()
Description copied from interface:ToolbarListener
Navigate to first record- Specified by:
onFirst
in interfaceToolbarListener
- See Also:
ToolbarListener.onFirst()
-
onLast
public void onLast()
Description copied from interface:ToolbarListener
Navigate to last record- Specified by:
onLast
in interfaceToolbarListener
- See Also:
ToolbarListener.onLast()
-
onNext
public void onNext()
Description copied from interface:ToolbarListener
Navigate to next record- Specified by:
onNext
in interfaceToolbarListener
- See Also:
ToolbarListener.onNext()
-
onPrevious
public void onPrevious()
Description copied from interface:ToolbarListener
Navigate to previous record- Specified by:
onPrevious
in 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:ToolbarListener
Personal lock- Specified by:
onLock
in interfaceToolbarListener
- See Also:
ToolbarListener.onLock()
-
onAttachment
public void onAttachment()
Description copied from interface:ToolbarListener
Open the attachment dialog- Specified by:
onAttachment
in interfaceToolbarListener
- See Also:
ToolbarListener.onAttachment()
-
onChat
public void onChat()
Description copied from interface:ToolbarListener
open chat window- Specified by:
onChat
in interfaceToolbarListener
-
onPostIt
public void onPostIt()
-
onToggle
public void onToggle()
Description copied from interface:ToolbarListener
Toggle record presentation between free form and tabular- Specified by:
onToggle
in 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:
onEvent
in 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:DataStatusListener
Data Changed- Specified by:
dataStatusChanged
in 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:ToolbarListener
Refresh current record- Specified by:
onRefresh
in interfaceToolbarListener
- See Also:
ToolbarListener.onRefresh()
-
onHelp
public void onHelp()
Description copied from interface:ToolbarListener
Open the help window- Specified by:
onHelp
in interfaceToolbarListener
- See Also:
ToolbarListener.onHelp()
-
onNew
public void onNew()
Description copied from interface:ToolbarListener
Create new record- Specified by:
onNew
in interfaceToolbarListener
-
onCopy
public void onCopy()
Description copied from interface:ToolbarListener
Copy current record as a new record- Specified by:
onCopy
in interfaceToolbarListener
-
onFind
public void onFind()
Description copied from interface:ToolbarListener
Open the find/search dialog- Specified by:
onFind
in interfaceToolbarListener
- See Also:
ToolbarListener.onFind()
-
onIgnore
public void onIgnore()
Description copied from interface:ToolbarListener
Ignore user changes- Specified by:
onIgnore
in interfaceToolbarListener
-
onSave
public void onSave()
Description copied from interface:ToolbarListener
Save current record- Specified by:
onSave
in 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:ToolbarListener
Save and create- Specified by:
onSaveCreate
in interfaceToolbarListener
- See Also:
ToolbarListener.onSaveCreate()
-
onDelete
public void onDelete()
Description copied from interface:ToolbarListener
Delete current record- Specified by:
onDelete
in interfaceToolbarListener
-
onPrint
public void onPrint()
Description copied from interface:ToolbarListener
Print document- Specified by:
onPrint
in interfaceToolbarListener
-
onReport
public void onReport()
Description copied from interface:ToolbarListener
View available report for current tab- Specified by:
onReport
in interfaceToolbarListener
- See Also:
ToolbarListener.onReport()
-
onZoomAcross
public void onZoomAcross()
Description copied from interface:ToolbarListener
Zoom to window where current record is use- Specified by:
onZoomAcross
in interfaceToolbarListener
- See Also:
ToolbarListener.onZoomAcross()
-
onActiveWorkflows
public void onActiveWorkflows()
Description copied from interface:ToolbarListener
Show active workflow for current record- Specified by:
onActiveWorkflows
in interfaceToolbarListener
- See Also:
ToolbarListener.onActiveWorkflows()
-
onRequests
public void onRequests()
Description copied from interface:ToolbarListener
Open the request menu where user can view available request or create a new request- Specified by:
onRequests
in interfaceToolbarListener
- See Also:
ToolbarListener.onRequests()
-
onProductInfo
public void onProductInfo()
Description copied from interface:ToolbarListener
View product info- Specified by:
onProductInfo
in interfaceToolbarListener
- See Also:
ToolbarListener.onProductInfo()
-
onArchive
public void onArchive()
Description copied from interface:ToolbarListener
Open the archive dialog- Specified by:
onArchive
in interfaceToolbarListener
- See Also:
ToolbarListener.onArchive()
-
onExport
public void onExport()
Description copied from interface:ToolbarListener
Export grid data- Specified by:
onExport
in interfaceToolbarListener
-
onFileImport
public void onFileImport()
Description copied from interface:ToolbarListener
File import data- Specified by:
onFileImport
in interfaceToolbarListener
-
onCSVImport
public void onCSVImport()
Description copied from interface:ToolbarListener
CSV import data- Specified by:
onCSVImport
in interfaceToolbarListener
-
onSearchQuery
public void onSearchQuery()
Description copied from interface:ToolbarListener
Select query from the user query list- Specified by:
onSearchQuery
in 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:
actionPerformed
in 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:
onCustomize
in interfaceToolbarListener
- See Also:
CustomizeGridViewDialog
,ToolbarListener.onCustomize()
-
onProcess
public void onProcess()
- Specified by:
onProcess
in interfaceToolbarListener
- See Also:
ToolbarListener.onProcess()
-
onSelect
public void onSelect()
Description copied from interface:ITabOnSelectHandler
handle tab on_select event- Specified by:
onSelect
in 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
-
-