Add Spring autowiring support to Clara add-on

The add-on is an extension to the [Clara addon] (https://vaadin.com/directory#!addon/clara). It adds autowiring support for nested components to it.

Dependencies

Clara4Spring depends on Clara (version > 1.4.0) and Spring framework, e.g

group, artifact, version org.vaadin.addons, clara, > 1.4.0 org.springframework, spring-core org.springframework, spring-context org.springframework, spring-beans org.slf4j, slf4j-api com.vaadin, vaadin-server, > 1.7

The dependencies are not included in the distribution, intentionally, to provide you with most freedom to define the dependencies in your project with the versions of your choice.

Clara syntax for autowire

Sample of autowiring by bean id (with autowired bean id='specificTestComponent'): <a:OtherTestComponent id="testComponent" xmlns:a="urn:autowired:byId:specificTestComponent" />

Sample of autowiring by bean type (with autowired bean type = 'org.vaadin.clara.spring.TestComponent'): <a:TestComponent id="testComponent" xmlns:a="urn:autowired:byType:org.vaadin.clara.spring" />

SpringClara

To allow Clara to autowire nested components it needs to be aware of the Spring application context. For this purpose the SpringClara class is introduced. SpringClara can be autowired itself when it is instantiated itself from a Spring container.

further info

For further details of usage see sample autowired declarative UIs in the unit tests @ Github

Install

Link to this version
ExperimentalReleased 01 July 2015Apache License 2.0
Framework Support
Vaadin 7.0+
Browser Independent
Install with
Release notes - Version 0.0.3