org.sapia.gumby.view
Interface Binding

All Known Implementing Classes:
AbstractJXPathBinding

public interface Binding

A Binding is associated to a UI component and is in charge of synchronizing the state of that component with a given part of the model.

Author:
Yanick Duchesne
Copyright:
Copyright © 2002-2005 Sapia Open Source Software. All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site
See Also:
View

Method Summary
 String getId()
           
 void onBound(View owner, Object model)
          This method is called by the view to which this instance belongs when the model is first set on the view.
 void onChanged(View owner, Object model)
          This method is called by the view to which this instance belongs when the model is changed - the view currently has a model, but it is replaced by another instance.
 void onUpdated(View owner, Object model)
          This method is called by the view when its fireUpdated() method is called.
 void updateModel(View owner, Object model)
          This method is called by the view when its fireUpdateModel() method is called.
 

Method Detail

getId

public String getId()
Returns:
the ID if the widget that this instance binds to.

onBound

public void onBound(View owner,
                    Object model)
This method is called by the view to which this instance belongs when the model is first set on the view.

Parameters:
owner - the View that owns the instance.
model - the Object consisting of the model that was assigned to the given view.
See Also:
View.setModel(Object)

onChanged

public void onChanged(View owner,
                      Object model)
This method is called by the view to which this instance belongs when the model is changed - the view currently has a model, but it is replaced by another instance.

Parameters:
owner - the View that owns the instance.
model - the Object consisting of the model that was assigned to the given view.
See Also:
View.setModel(Object)

onUpdated

public void onUpdated(View owner,
                      Object model)
This method is called by the view when its fireUpdated() method is called.

Parameters:
owner - the View that owns the instance.
model - the Object consisting of the model that was assigned to the given view.
See Also:
View.fireUpdated(), View.fireUpdateModel(String)

updateModel

public void updateModel(View owner,
                        Object model)
This method is called by the view when its fireUpdateModel() method is called.

Parameters:
owner - the View that owns the instance.
model - the Object consisting of the model that was assigned to the given view.
See Also:
View.fireUpdateModel(), View.fireUpdateModel(String)


Copyright © 2002 Sapia Open Community, Inc. All Rights Reserved.