@Documented @Target(value={FIELD,PARAMETER}) @Retention(value=RUNTIME) public @interface Model
DataBinder
and therefore
automatically bound to all enclosing widgets.
The widgets are inferred from all enclosing fields and methods annotated with Bound
of
the class that defines the Model
and all its super classes.
The annotated model can be a field and a method or constructor parameter. The following
example shows all use cases for the Model
annotation.
public class MyBean {There can only be one@Inject
@Model
private MyModel model;@Inject
public MyBean(@Model
MyModel model) { this.model = model; }@Inject
public void setModel(@Model
MyModel model) { this.model = model; } }
Model
per class.
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.