public class ModelBindings extends Object implements IModelBinding, Iterable<IModelBinding>
IModelBindings. Each binding connects a UI Control
(the input component) with a given property of the data model. This list can be used
to collect all of the component-property bindings for an entire form, so that the
data from the model can be moved into the controls that edit that model in one
call. And of course the reverse, moving all edited control data back to the model
is possible too.
A ModelBindings list is itself an IModelBinding too, so you can add this list to another list of bindings too.
| Constructor and Description |
|---|
ModelBindings() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(IModelBinding b)
Add a binding to the list.
|
void |
clear()
Remove all bindings from this list.
|
IModelBinding |
get(int ix)
Get the nth binding stored in this list.
|
Iterator<IModelBinding> |
iterator()
Get an iterator to pass over all bindings in this list.
|
void |
moveControlToModel()
Move the data from the controls to the data model.
|
void |
moveModelToControl()
Move the data from model to the controls for all controls added to the list.
|
void |
setControlsEnabled(boolean on)
Enable or disable all bound components.
|
int |
size()
Return the #of bindings present in the list.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic void add(@Nonnull IModelBinding b)
b - public void moveControlToModel()
throws Exception
moveControlToModel in interface IModelBindingExceptionIModelBinding.moveControlToModel()public void moveModelToControl()
throws Exception
moveModelToControl in interface IModelBindingExceptionIModelBinding.moveModelToControl()public int size()
public void clear()
public void setControlsEnabled(boolean on)
setControlsEnabled in interface IModelBindingIModelBinding.setControlsEnabled(boolean)@Nonnull public Iterator<IModelBinding> iterator()
iterator in interface Iterable<IModelBinding>Iterable.iterator()@Nonnull public IModelBinding get(int ix)
ix - Copyright © 2017 etc.to. All rights reserved.