This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
The knockout.js allows people to applyBindings of their models only to particular subtree of the DOM identified by its topmost element. There is no Java only way to access this useful functionality from Java and it limits the usefulness of HTML/Java knockout bindings.
The envisioned proposal is to let @Model(...) annotation processor generate not only applyBindings(), but also public ModelClass applyBindings(String elementId); which could be used to apply the model to element with given id. Mimics closely the "Activating Knockout" section at http://knockoutjs.com/documentation/observables.html
The "sub-tree" only application of data will be useful for example for wizards, that always manipulate just a piece of the page.
Created attachment 151070 [details] Introduces applyBindings(String) at various places
Created attachment 151170 [details] @Model(targetId="xyz") Rather than the previous patch, I'd like to integrate this one, which introduces new "targetId" attribute (and associated incompatible change with respect to applyBindings() method). With this change it will be easier to use the benefits of issue 231131.
OK. Applied the "targetId" version. Will be part of 1.1 release: http://hg.netbeans.org/html4j/rev/117b732d42d0