Spring UI Scope - Vaadin Add-on Directory
Spring UI ScopeThe add-on has defined custom Spring scope: UI.
Please analyze sample application 'Simple Bank' to see how scope UI is used to create Spring powered Vaadin application in Model-View-Presenter architecture
Keep the following rules:
1. Model (pojo) usually is singleton Spring bean
2. Presenter (pojo) is UI-scope proxy Spring bean
3. View (Vaadin component) is UI-scope Spring bean
Restrictions are cause by circular dependency between View and Presenter. Spring allows that only if one party is a proxy. If View is a proxy, Vaadin framework fails. Possible reason is that the framework use protected or package methods, which are not handled by proxy; only public methods are handled.
Therefore, View must be UI-scope normal class and Presenter must be UI-scope proxy bean.
Example Source codeSource Code
Spring UI Scope version 0.0.1
null
Spring UI Scope version 0.0.2
Just removed SNAPSHOT from uploaded files