Directory

← Back

MCont

Bean Container that supports mixed bean types

Author

Rating

Popularity

<100

MCont is an extension to Vaadin BeanContainer where the contained beans can have different types (inheriting from a common base class) and consequently different sets of properties available.

MCont is also more efficient than BeanContainer in that more metadata is shared and Property instances are initialized lazily. This can lead to a significant reduction in memory usage in many cases.

Sample code

public class DemoContainer extends ExtensibleBeanContainer<String, Person> {

   public DemoContainer() {
        super(Person.class, Employee.class, Child.class);
        
        setBeanIdProperty("name");

        addBean(new Person("person"));
        addBean(new Employee("employee", "employer"));
        addBean(new Child("child", "rubber duck"));
    }
}

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Initial release to the Directory

Released
2014-02-23
Maturity
EXPERIMENTAL
License
Apache License 2.0

Compatibility

Framework
Vaadin 7.0+
Browser
Browser Independent

MCont - Vaadin Add-on Directory

Bean Container that supports mixed bean types MCont - Vaadin Add-on Directory
MCont is an extension to Vaadin BeanContainer where the contained beans can have different types (inheriting from a common base class) and consequently different sets of properties available. MCont is also more efficient than BeanContainer in that more metadata is shared and Property instances are initialized lazily. This can lead to a significant reduction in memory usage in many cases.
Online