Package org.adempiere.webui.apps
Class AbstractProcessDialog
- 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.apps.AbstractProcessDialog
-
- All Implemented Interfaces:
Serializable
,Cloneable
,IProcessUI
,ISupportMask
,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
- Direct Known Subclasses:
ProcessDialog
,ProcessModalDialog
public abstract class AbstractProcessDialog extends Window implements IProcessUI, org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Button
bCancel
protected Button
bOK
protected org.zkoss.zk.ui.HtmlBasedComponent
bottomParameterLayout
protected WTableDirEditor
fPrintFormat
protected Listbox
freportType
protected Combobox
fSavedName
protected int
m_WindowNo
protected org.zkoss.zk.ui.HtmlBasedComponent
mainParameterLayout
protected org.zkoss.zk.ui.HtmlBasedComponent
topParameterLayout
-
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, showMaskWrapper
-
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, 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
Constructors Modifier Constructor Description protected
AbstractProcessDialog()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
ask(String message, Callback<Boolean> callback)
Prompt for user input.void
askForInput(String message, Callback<String> callback)
void
askForInput(String message, MLookup lookup, int editorType, Callback<Object> callback)
Prompt user for input with a configurable DisplayType (String, Number, TableDir or Search) Usage is the same from ask and askForInput methods with some additional parameters muriloht - devCoffee #3390protected void
autoStart()
protected void
bottomLayout(org.zkoss.zk.ui.HtmlBasedComponent bottomParameterLayout)
protected void
buttonLayout(org.zkoss.zk.ui.HtmlBasedComponent bottomParameterLayout)
protected void
cancelProcess()
protected void
chooseSaveParameter(String saveName, boolean lastRun)
protected void
closeBusyDialog()
protected BusyDialog
createBusyDialog()
protected void
deleteSaveParameter(String saveName)
void
dispose()
alias for detach, to ease porting of swing formvoid
download(File file)
add to list of file available for download after process endvoid
focus()
int
getAD_Process_ID()
org.zkoss.zul.Comboitem
getComboItem(String value)
Properties
getCtx()
List<File>
getDownloadFiles()
String
getInitialMessage()
String
getName()
String
getNotificationType()
ProcessParameterPanel
getParameterPanel()
ProcessInfo
getProcessInfo()
String
getShowHelp()
int
getWindowNo()
abstract void
hideBusyDialog()
protected boolean
init(Properties ctx, int WindowNo, int AD_Process_ID, ProcessInfo pi, boolean autoStart, boolean isDisposeOnComplete)
layout as belowprotected void
inputParameterLayout(org.zkoss.zk.ui.HtmlBasedComponent parent)
boolean
isBackgroundJob()
boolean
isCancel()
protected boolean
isJasperReport()
protected boolean
isReport()
boolean
isUILocked()
Is the UI lockedboolean
isValid()
is dialog still validprotected void
layout()
void
lockUI(ProcessInfo pi)
Lock User Interface.void
onEvent(org.zkoss.zk.ui.event.Event event)
protected void
overalLayout()
protected void
querySaved()
protected void
reportOptionLayout(org.zkoss.zk.ui.HtmlBasedComponent bottomParameterLayout)
void
runBackgroundJob()
void
runProcess()
protected void
savePrameterLayout(org.zkoss.zk.ui.HtmlBasedComponent bottomParameterLayout)
protected void
saveReportOption()
protected void
saveReportOptionToInstance(MPInstance instance)
protected org.zkoss.zk.ui.HtmlBasedComponent
setHeadMessage(org.zkoss.zk.ui.HtmlBasedComponent parent, String contentMsg)
void
setProcessInfo(ProcessInfo pi)
abstract void
showBusyDialog()
void
showInfoWindow(int WindowNo, String tableName, String keyColumn, String queryValue, boolean multipleSelection, String whereClause, Integer AD_InfoWindow_ID, boolean lookup)
show an info window from inside a process with user defined parameters gustavo.francisco - devCoffee #7094void
showReports(List<File> pdfList)
show reports from a given file list matheus.marcelino - devCoffee #5561protected void
startProcess()
void
statusUpdate(String message)
Provide status feedback to userprotected void
topLayout(org.zkoss.zk.ui.HtmlBasedComponent topParameterLayout)
void
unlockUI(ProcessInfo pi)
Unlock User Interface.protected void
updateSaveParameter(String saveName)
abstract void
updateUI()
-
Methods inherited from class org.adempiere.webui.component.Window
getMaskComponent, getMaskObj, getModeAttribute, hideMask, onPageDetached, showMask
-
Methods inherited from class org.zkoss.zul.Window
beforeChildAdded, clone, doEmbedded, doHighlighted, doModal, doOverlapped, doPopup, getBorder, getCaption, getContentSclass, getContentStyle, getDefaultActionOnShow, 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, setDefaultActionOnShow, 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, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, removeSclass, removeSclass, setAction, setClass, 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, 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, invalidate, invalidatePartial, isChildable, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onPageAttached, 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, 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
-
-
-
-
Field Detail
-
m_WindowNo
protected int m_WindowNo
-
topParameterLayout
protected org.zkoss.zk.ui.HtmlBasedComponent topParameterLayout
-
bottomParameterLayout
protected org.zkoss.zk.ui.HtmlBasedComponent bottomParameterLayout
-
mainParameterLayout
protected org.zkoss.zk.ui.HtmlBasedComponent mainParameterLayout
-
fPrintFormat
protected WTableDirEditor fPrintFormat
-
freportType
protected Listbox freportType
-
bOK
protected Button bOK
-
bCancel
protected Button bCancel
-
fSavedName
protected Combobox fSavedName
-
-
Method Detail
-
init
protected boolean init(Properties ctx, int WindowNo, int AD_Process_ID, ProcessInfo pi, boolean autoStart, boolean isDisposeOnComplete)
layout as below- Parameters:
ctx
-WindowNo
-AD_Process_ID
-pi
-autoStart
-isDisposeOnComplete
-- Returns:
-
layout
protected void layout()
-
overalLayout
protected void overalLayout()
-
topLayout
protected void topLayout(org.zkoss.zk.ui.HtmlBasedComponent topParameterLayout)
-
setHeadMessage
protected org.zkoss.zk.ui.HtmlBasedComponent setHeadMessage(org.zkoss.zk.ui.HtmlBasedComponent parent, String contentMsg)
-
inputParameterLayout
protected void inputParameterLayout(org.zkoss.zk.ui.HtmlBasedComponent parent)
-
bottomLayout
protected void bottomLayout(org.zkoss.zk.ui.HtmlBasedComponent bottomParameterLayout)
-
reportOptionLayout
protected void reportOptionLayout(org.zkoss.zk.ui.HtmlBasedComponent bottomParameterLayout)
-
isReport
protected boolean isReport()
-
isJasperReport
protected boolean isJasperReport()
-
savePrameterLayout
protected void savePrameterLayout(org.zkoss.zk.ui.HtmlBasedComponent bottomParameterLayout)
-
querySaved
protected void querySaved()
-
buttonLayout
protected void buttonLayout(org.zkoss.zk.ui.HtmlBasedComponent bottomParameterLayout)
-
saveReportOption
protected void saveReportOption()
-
autoStart
protected void autoStart()
-
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>
-
updateSaveParameter
protected void updateSaveParameter(String saveName)
-
saveReportOptionToInstance
protected void saveReportOptionToInstance(MPInstance instance)
-
getComboItem
public org.zkoss.zul.Comboitem getComboItem(String value)
-
deleteSaveParameter
protected void deleteSaveParameter(String saveName)
-
chooseSaveParameter
protected void chooseSaveParameter(String saveName, boolean lastRun)
-
startProcess
protected void startProcess()
-
cancelProcess
protected void cancelProcess()
-
createBusyDialog
protected BusyDialog createBusyDialog()
-
closeBusyDialog
protected void closeBusyDialog()
-
dispose
public void dispose()
Description copied from class:Window
alias for detach, to ease porting of swing form
-
runProcess
public void runProcess()
-
runBackgroundJob
public void runBackgroundJob()
-
lockUI
public void lockUI(ProcessInfo pi)
Description copied from interface:IProcessUI
Lock User Interface. Called from the Worker before processing- Specified by:
lockUI
in interfaceIProcessUI
- Parameters:
pi
- process info
-
showBusyDialog
public abstract void showBusyDialog()
-
unlockUI
public void unlockUI(ProcessInfo pi)
Description copied from interface:IProcessUI
Unlock User Interface. Called from the Worker when processing is done- Specified by:
unlockUI
in interfaceIProcessUI
- Parameters:
pi
- process info
-
hideBusyDialog
public abstract void hideBusyDialog()
-
updateUI
public abstract void updateUI()
-
isUILocked
public boolean isUILocked()
Description copied from interface:IProcessUI
Is the UI locked- Specified by:
isUILocked
in interfaceIProcessUI
- Returns:
- true, if UI is locked
-
statusUpdate
public void statusUpdate(String message)
Description copied from interface:IProcessUI
Provide status feedback to user- Specified by:
statusUpdate
in interfaceIProcessUI
-
ask
public void ask(String message, Callback<Boolean> callback)
Description copied from interface:IProcessUI
Prompt for user input. Example Usage in process:final StringBuffer answer = new StringBuffer(); aProcessMonitor.ask(adMessage, new Callback
() { - Specified by:
ask
in interfaceIProcessUI
-
download
public void download(File file)
Description copied from interface:IProcessUI
add to list of file available for download after process end- Specified by:
download
in interfaceIProcessUI
-
getProcessInfo
public ProcessInfo getProcessInfo()
- Returns:
- ProcessInfo
-
setProcessInfo
public void setProcessInfo(ProcessInfo pi)
-
isValid
public boolean isValid()
is dialog still valid- Returns:
- boolean
-
isCancel
public boolean isCancel()
- Returns:
- true if user have press the cancel button to close the dialog
-
getCtx
public Properties getCtx()
-
getWindowNo
public int getWindowNo()
-
getAD_Process_ID
public int getAD_Process_ID()
-
getParameterPanel
public ProcessParameterPanel getParameterPanel()
-
getName
public String getName()
-
getShowHelp
public String getShowHelp()
-
getInitialMessage
public String getInitialMessage()
-
isBackgroundJob
public boolean isBackgroundJob()
-
getNotificationType
public String getNotificationType()
-
askForInput
public void askForInput(String message, Callback<String> callback)
- Specified by:
askForInput
in interfaceIProcessUI
-
askForInput
public void askForInput(String message, MLookup lookup, int editorType, Callback<Object> callback)
Description copied from interface:IProcessUI
Prompt user for input with a configurable DisplayType (String, Number, TableDir or Search) Usage is the same from ask and askForInput methods with some additional parameters muriloht - devCoffee #3390- Specified by:
askForInput
in interfaceIProcessUI
-
showReports
public void showReports(List<File> pdfList)
Description copied from interface:IProcessUI
show reports from a given file list matheus.marcelino - devCoffee #5561- Specified by:
showReports
in interfaceIProcessUI
-
showInfoWindow
public void showInfoWindow(int WindowNo, String tableName, String keyColumn, String queryValue, boolean multipleSelection, String whereClause, Integer AD_InfoWindow_ID, boolean lookup)
Description copied from interface:IProcessUI
show an info window from inside a process with user defined parameters gustavo.francisco - devCoffee #7094- Specified by:
showInfoWindow
in interfaceIProcessUI
-
focus
public void focus()
- Overrides:
focus
in classorg.zkoss.zk.ui.HtmlBasedComponent
-
-