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.
Please provide API to allow Knockout4Java to specify description of JSON object which is passed as parameter into ko.applyBindings method. http://wiki.netbeans.org/KnockJSOut
Please review my initial API attempt associated by a unit test: http://hg.netbeans.org/ergonomics/rev/14c01973e813
Hi Jardo, just a couple clarifying questions: PJ01: Who would be the clients of this API? Do you have a diff that illustrates the usages, in existing or new code? PJ02: Where will api.knockout module be placed? Is it intended to be a part of the distribution, and if so, which cluster? Thx.
Re. PJ01: Right now I only have the unit test. It shows the API related part well. The rest is parsing Java file and finding all @net.java.html.Model annotations and depending on their content calling the API as shown in the unit test. Re. PJ02: The thing I'd like to get for 7.4 is the inclusion among list of friend modules - to be able to use html.editor API. I'd like to have the module in Hg repository and upload it to autoupdate (at least development one).
Re. PJ01: I was asking because I thought that there is a general guideline that when there are more than 3 clients, it is appropriate to consider public API, with fewer than 3, friend is more appropriate. But this of course is not a strict rule, just a guideline. Re P102: Sounds good, friend of html.editor is of course not a problem.
Maybe web/knockout is more approppriate category.
Created attachment 151083 [details] Knockout CC in HTML using BindigsProvider Attached is diff of Jarda's API prototype with small modifications + sample module with sample bindings provider implementation. In HTML where "|" marks position where CC is invoked, items from SampleBindingsProvider are offered: <div data-bind="value: |">
I have problems applying the new patch. It says something like: $ patch -p0 <~/X.diff patching file api.knockout/build.xml patching file api.knockout/manifest.mf patching file api.knockout/nbproject/project.properties patching file api.knockout/nbproject/project.xml patching file api.knockout/src/org/netbeans/api/knockout/Bundle.properties patch: **** missing line number at line 112: @@ -0,0 +1, @@ Maybe the patch is corrupted?
I have just tried to apply the patch using NetBeans and it has been applied without any problems.
I've managed to apply the change. Here are my comments: Y01 Why the api.knockout has dependency on html.editor? It seems redundant and no longer necessary. Y02 The javadoc is slightly insufficient Y03 SPIAccessor is not needed anymore in current source layout. Replace by static method.
Created attachment 151206 [details] Addressing Y01-Y03 If the improved patch seems OK to you Roman, I have nothing against integrating it. Thanks.
Patch seems OK to, if there are no objections I will proceed with the integration.
Minor comment: public void findBindings(FileObject htmlFile, Response r); can be: public Response findBindings(FileObject htmlFile); class Response { static create(Binding... bindings); static create(String id, Binding... bindings); }
Thanks. Any of the alternatives seems OK for my purposes.
What's happening? Another two weeks hiccup? I had a feeling the proposal is non-controversial and can be integrated. Why it has not been integrated yet?
Changeset: d35464431ab6 Author: Roman Svitanic <rsvitanic@netbeans.org> Date: 2015-02-20 17:46 Message: #231131: API to provide non-standard description of applyBindings( parameter )
Integrated into 'main-silver', will be available in build *201502242039* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/d35464431ab6 User: Roman Svitanic <rsvitanic@netbeans.org> Log: #231131: API to provide non-standard description of applyBindings( parameter ) Task #231131 - API to provide non-standard description of applyBindings( parameter )
I just tried to use the new API and it seems to work great. Thanks.