The NetBeans Team has announced the upcoming new version of the HTML for Java APIs. Version 1.1 brings one major change with it: You can now bind models to a specific Element of the DOM tree identified by it’s id. This makes it easier to structure your ViewModel.
Here’s a simple example:
And your model class looks like this:
Then you can bind different ViewModel Instances to the different parts of the View:
Check out the API doc with all changes here.