Skip navigation links
org.netbeans.api.knockout 1.5.1

Knockout Model Provider API
Official

See: Description

Knockout Model Provider API 
Package Description
org.netbeans.spi.knockout
Java model class to describe JSON-like Knockout bindings and register a provider used by the editor infrastructure to query for the model.

Java model class to describe JSON-like Knockout bindings and register a provider used by the editor infrastructure to query for the model.

What is New (see all changes)?

Use Cases

Register a provider

This is the code to register a sample provider:

@ServiceProvider(service = BindingsProvider.class)
public class SampleBindingsProvider implements BindingsProvider {
    @Override
    public void findBindings(FileObject htmlFile, Response r) {
        Bindings tweet = Bindings.create("Tweet").
                stringProperty("from_user", false).
                intProperty("from_user_id", false);

        Bindings tweeters = Bindings.create("Tweeters").
                stringProperty("name", false).
                stringProperty("userNames", true);

        Bindings twitterClient = Bindings.create("TwitterClient");
        twitterClient.
                stringProperty("activeTweetersName", false).
                stringProperty("activeTweeters", true).
                stringProperty("userNameToAdd", false).
                booleanProperty("loading", false).
                modelProperty("currentTweets", tweet, true).
                modelProperty("savedLists", tweeters, true);

        r.applyBindings(twitterClient);
    }
}

This sample has been used when testing the module.

Exported Interfaces

This table lists all of the module exported APIs with defined stability classifications. It is generated based on answers to questions about the architecture of the module. Read them all...
Group of java interfaces
Interface NameIn/OutStabilitySpecified in What Document?
api.knockoutExportedOfficial

API for registering additional providers that help the HTML editor to offer better code completion for certain HTML files based on the produced description of a JSON-like structure.

Implementation Details

Where are the sources for the module?

The sources for the module are in the NetBeans Mercurial repositories.

What do other modules need to do to declare a dependency on this one, in addition to or instead of a plain module dependency?

XXX no answer for deploy-dependencies

Read more about the implementation in the answers to architecture questions.

Skip navigation links
org.netbeans.api.knockout 1.5.1