IBinder.TemplateConverter, IBinder.Value| Constructor and Description |
|---|
GenericBinder() |
GenericBinder(M model) |
| Modifier and Type | Method and Description |
|---|---|
Function<?,?> |
choice(Object... choices)
Returns a lambda function that returns one of a choice of values depending on the input
value.
|
IBinding |
dual(String modelProperty,
Function<?,?> readConverter,
Function<?,?> writeConverter)
Establishes a read and write binding for the given model property.
|
M |
getModel()
Returns the bound model.
|
Function<?,?> |
lambda(Object instance,
String methodName,
Object... args)
Returns a lambda function (for use in spEL).
|
void |
modelChanged()
Call when the model has changed to update bindings.
|
void |
modelChanged(String propertyName)
Call when a specific model property has changed.
|
IBinding |
read(String modelProperty,
Function<?,?> converter)
Establishes a read binding for the given model property.
|
void |
setModel(M model)
Sets the model to bind.
|
void |
update(Observable o,
Object arg) |
IBinding |
write(String modelProperty,
Function<?,?> converter)
Establishes a write binding for the given model property.
|
public GenericBinder()
public GenericBinder(M model)
public void setModel(M model)
IBinderpublic IBinding read(String modelProperty, Function<?,?> converter)
IBinderpublic IBinding write(String modelProperty, Function<?,?> converter)
IBinderpublic IBinding dual(String modelProperty, Function<?,?> readConverter, Function<?,?> writeConverter)
IBinderpublic void update(Observable o, Object arg)
public void modelChanged()
public void modelChanged(String propertyName)
propertyName - Name of the changed property (or null if unspecified).public Function<?,?> lambda(Object instance, String methodName, Object... args)
instance - Object instance that is target of method invocation.methodName - Name of the method to invoke.args - Optional additional arguments.Copyright © 2018 Fujion Framework. All rights reserved.