Class AbstractViewModel<T>


  • public abstract class AbstractViewModel<T>
    extends AbstractService
    Helper class to build ViewModels
    • Field Detail

      • model

        protected T model
      • parentWindow

        protected org.zkoss.zul.Window parentWindow
      • view

        protected org.zkoss.zk.ui.Component view
    • Constructor Detail

      • AbstractViewModel

        public AbstractViewModel()
    • 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)
      • postGlobalCommand

        protected void postGlobalCommand​(String command,
                                         Map<String,​Object> params)
      • closeWindow

        protected void closeWindow()
        Close current parent window without confirmation. If parent window is null nothing happens
      • getArg

        public Object getArg​(String name)
        Return an execution argument
        Parameters:
        name -
        Returns:
      • getRequestParam

        public String getRequestParam​(String name)
        Return a request parameter
        Parameters:
        name -
        Returns: