public interface Technology<Data>
Model)
and particular technology like knockout.js
in a browser window, etc.| Modifier and Type | Interface and Description |
|---|---|
static interface |
Technology.BatchInit<D>
For certain rendering technologies it may be more efficient to register
property and function bindings for one instance of the model at once,
rather then doing it incrementally via
expose(org.apidesign.html.json.spi.FunctionBinding, java.lang.Object, java.lang.Object)
and
bind(org.apidesign.html.json.spi.PropertyBinding, java.lang.Object, java.lang.Object). |
| Modifier and Type | Method and Description |
|---|---|
void |
applyBindings(Data data)
Applies given data to current context (usually an HTML page).
|
void |
bind(PropertyBinding b,
Object model,
Data data)
Binds a property between the model and the data as used by the technology.
|
void |
expose(FunctionBinding fb,
Object model,
Data d) |
void |
runSafe(Runnable r)
Run given runnable in a safe mode.
|
<M> M |
toModel(Class<M> modelClass,
Object data)
Converts an element potentially representing a model into the model.
|
void |
valueHasMutated(Data data,
String propertyName)
Model for given data has changed its value.
|
Object |
wrapArray(Object[] arr)
Some technologies may require wrapping a Java array into a special
object.
|
Data |
wrapModel(Object model)
Creates an object to wrap the provided model object.
|
Data wrapModel(Object model)
Model annotation.model - the model generated from Model<M> M toModel(Class<M> modelClass, Object data)
modelClass - expected class to convert the data todata - the current data provided from the browsernullvoid bind(PropertyBinding b, Object model, Data data)
b - the description of the requested bindingmodel - the original instance of the modeldata - the data to bind with the modelvoid valueHasMutated(Data data, String propertyName)
data - technology's own representation of the modelpropertyName - name of the model property that changedvoid expose(FunctionBinding fb, Object model, Data d)
void applyBindings(Data data)
data - the data to applyObject wrapArray(Object[] arr)
arr - original arrayvoid runSafe(Runnable r)
r - the runnable to executeCopyright © 2014 NetBeans. All Rights Reserved.