Package tools.dynamia.zk
Class AbstractViewModel<T>
- java.lang.Object
-
- tools.dynamia.domain.services.AbstractService
-
- tools.dynamia.zk.AbstractViewModel<T>
-
public abstract class AbstractViewModel<T> extends AbstractService
Helper class to build ViewModels
-
-
Field Summary
Fields Modifier and Type Field Description protected Tmodelprotected org.zkoss.zul.WindowparentWindowprotected org.zkoss.zk.ui.Componentview
-
Constructor Summary
Constructors Constructor Description AbstractViewModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterCompose(org.zkoss.zk.ui.Component view)protected voidafterInitDefaults()protected voidafterViewCompose()protected voidcloseWindow()Close current parent window without confirmation.protected voidenableOnCloseWindowConfirmation(String message)Enable if a question confirmation dialog when user close parent window.ObjectgetArg(String name)Return an execution argumentTgetModel()StringgetRequestParam(String name)Return a request parametervoidinitDefaults()protected voidnotifyChanges()protected voidnotifyChanges(String property)protected voidnotifyChanges(String... properties)protected voidpostGlobalCommand(String command)protected voidpostGlobalCommand(String command, Map<String,Object> params)voidsetModel(T model)protected voidshowDialog(String uri, String title, Object data)-
Methods inherited from class tools.dynamia.domain.services.AbstractService
appParams, crudService, graphCrudService, log, log, logWarn, validate, validateAll
-
-
-
-
Field Detail
-
model
protected T model
-
parentWindow
protected org.zkoss.zul.Window parentWindow
-
view
protected org.zkoss.zk.ui.Component view
-
-
Method Detail
-
afterCompose
public void afterCompose(org.zkoss.zk.ui.Component view)
-
initDefaults
public void initDefaults()
-
afterInitDefaults
protected void afterInitDefaults()
-
afterViewCompose
protected void afterViewCompose()
-
enableOnCloseWindowConfirmation
protected void enableOnCloseWindowConfirmation(String message)
Enable if a question confirmation dialog when user close parent window. If parent window is null nothing happens- Parameters:
message-
-
getModel
public T getModel()
-
setModel
public void setModel(T model)
-
notifyChanges
protected void notifyChanges()
-
notifyChanges
protected void notifyChanges(String property)
-
notifyChanges
protected void notifyChanges(String... properties)
-
postGlobalCommand
protected void postGlobalCommand(String command)
-
closeWindow
protected void closeWindow()
Close current parent window without confirmation. If parent window is null nothing happens
-
-