Component API
Pre-release
Pre-release
New features
Component- a way of defining reusable classes for using an element or a collection of elements.- Based on a root
Element, defined using@Tag - Component hierarchy is derived from the element hierarchy
- Similar to
Componentin Vaadin 7
- Based on a root
- Attach/detach events for
ElementandComponentandComponent.onAttach/onDetachwhich can be overridden ComponentEventBusfor listening to and firing component events- Connecting DOM events to Component events to have the
Componentevent fired automatically with selected DOM event data - Each event has information about origin (server or client)
- Connecting DOM events to Component events to have the
- Built-in components
HTML- encapsulates a HTML fragmentText- encapsulates a text in a text nodeRouterLink- handles view navigation without page reloadsComposite- for wrapping existing components while hiding their API
- HTML components in a separate package
Div,Button,Inputand more
- Using a
StreamResourceas an element attribute to e.g. generate dynamic images
Fixes
- API improved based on user feedback
New tutorials
- Creating A Simple Component Using the Element API
- Creating a Component Based on Many Elements
- Creating a Component Using Existing Components
- Using Events with Components
- Creating a Component with External Dependencies