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.

Bug 258088 - Support constant values to allow ko4j to avoid observables
Summary: Support constant values to allow ko4j to avoid observables
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Html4j (show other bugs)
Version: 8.2
Hardware: PC Linux
: P1 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: API_REVIEW_FAST
Depends on:
Blocks:
 
Reported: 2016-02-22 05:04 UTC by Jaroslav Tulach
Modified: 2016-02-29 18:41 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2016-02-22 05:04:40 UTC
Let's introduce

 @Property(mutable=false)

to define semi-immutable property that can only be changed in construction time before the object is passed to underlaying Technology. Attempts to modify the object then yield IllegalStateException. Technologies may decide to represent such non-mutable property in more effective way - for example Knockout will use plain JavaScript values (number, string, array, boolean) rather than observables.
Comment 1 Jaroslav Tulach 2016-02-22 05:16:44 UTC
Please review the changes in the @Property and its processor:
http://source.apidesign.org/hg/html~html4j/rev/4c40ceb185e5
Comment 2 Jaroslav Tulach 2016-02-22 19:00:34 UTC
The change for ko4j module is here:
http://source.apidesign.org/hg/html~html4j/rev/c61d247f087a

Now we are missing just a note in overview.html and some real world sample in Javadoc.
Comment 3 Jaroslav Tulach 2016-02-26 20:46:25 UTC
Documentation overview fixed:
http://source.apidesign.org/hg/html~html4j/rev/a753f36c67fc

Unless there are objections, I integrate on Monday.
Comment 4 Jaroslav Tulach 2016-02-29 18:41:48 UTC
Will be part of HTML/Java 1.3:
http://hg.netbeans.org/html4j/rev/3554078c32ce