Fork me on GitHub

Indicates that a domain object is intended to be used as a view model.

API

public interface ViewModel {

    @Hidden
    public String viewModelMemento();

    @Hidden
    public void viewModelInit(String memento);
}

Where:

Usage

Used in the example todo app, for example the ToDoAppDashboard that is rendered on the home page.

Related Services

The MementoService provides a convenient mechanism for view models to build up and parse memento strings (for the implementation of the viewModelMemento() and viewModelInit() methods.