Bean import filters
Pre-release
Pre-release
New features
- When importing a bean to the template model, you can define that some of the bean properties should be excluded from the model
- The same annotations are also supported on list setters, where they will apply to each item in the imported list.
public interface MyModel extends TemplateModel {
@Exclude("id", "password") // includes all other properties
public void setUser(User user);
@Include("firstName", "lastName") // excludes all other properties
public void setPerson(Person person)
}
- View instance creation is pluggable to enable integration with e.g. Spring or CDI
- Client side exception messages are shown as a floating overlay in the browser when production mode is not active
@Idcan now be used in template classes to injectElementinstances. Previously only component instances could be injected.
Fixes
- Eliminated memory leak caused by redeploying Hummingbird
- The
$servervariable is now properly populated inside*ngFor @HtmlImportdependencies are now always loaded before@JavaScript- Atmosphere dependency updated to be compatible with Jetty 9.3
- Fixed browser version check so that the embedded browser in Eclipse on OS X is no longer considered outdated
- Renamed
Elementmethods for increased clarity:getOwnTextContentrenamed togetTextsetTextContentrenamed tosetTextgetTextContentrenamed togetTextRecursively
Demos
- Address book demo updated to only import some parts of the bean and to support editing and saving through the form Java HTML
Tutorials
Using Beans with a Template Modelupdated to show how to exclude propertiesAdding Components to a Templateupdated to mention@Idinjection for elementsCreating A Simple Component Using the Element APIupdated to mention the tag name constants in@Tag.
All changes
https://github.com/vaadin/hummingbird/issues?q=milestone%3A0.0.11