wicket.model
Class BoundCompoundPropertyModel

java.lang.Object
  extended by wicket.model.AbstractDetachableModel
      extended by wicket.model.AbstractPropertyModel
          extended by wicket.model.CompoundPropertyModel
              extended by wicket.model.BoundCompoundPropertyModel
All Implemented Interfaces:
java.io.Serializable, ICompoundModel, IDetachable, IModel

public class BoundCompoundPropertyModel
extends CompoundPropertyModel

A compound property model that supports type conversions and property expression bindings.

Author:
Jonathan Locke
See Also:
Serialized Form

Constructor Summary
BoundCompoundPropertyModel(java.lang.Object model)
          Constructor
 
Method Summary
 Component bind(Component component, java.lang.Class type)
          Adds a type conversion binding.
 Component bind(Component component, java.lang.String propertyExpression)
          Adds a property binding.
 Component bind(Component component, java.lang.String propertyExpression, java.lang.Class type)
          Adds a property and type conversion binding.
protected  void onDetach()
          Unsets this property model's instance variables and detaches the model.
protected  java.lang.String propertyExpression(Component component)
           
protected  java.lang.Class propertyType(Component component)
           
 java.lang.String toString()
           
 
Methods inherited from class wicket.model.AbstractPropertyModel
getNestedModel, modelObject, onAttach, onGetObject, onSetObject
 
Methods inherited from class wicket.model.AbstractDetachableModel
attach, detach, getObject, isAttached, setObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface wicket.model.IModel
getNestedModel, getObject, setObject
 
Methods inherited from interface wicket.model.IDetachable
detach
 

Constructor Detail

BoundCompoundPropertyModel

public BoundCompoundPropertyModel(java.lang.Object model)
Constructor

Parameters:
model - The model object, which may or may not implement IModel
Method Detail

bind

public Component bind(Component component,
                      java.lang.String propertyExpression)
Adds a property binding.

Parameters:
component - The component to bind
propertyExpression - A property expression pointing to the property in this model
Returns:
The component, for convenience in adding components

bind

public Component bind(Component component,
                      java.lang.Class type)
Adds a type conversion binding.

Parameters:
component - The component to bind
type - The type of the property
Returns:
The component, for convenience in adding components

bind

public Component bind(Component component,
                      java.lang.String propertyExpression,
                      java.lang.Class type)
Adds a property and type conversion binding.

Parameters:
component - The component to bind
propertyExpression - A property expression pointing to the property in this model
type - The type of the property
Returns:
The component, for convenience in adding components

onDetach

protected void onDetach()
Description copied from class: AbstractPropertyModel
Unsets this property model's instance variables and detaches the model.

Overrides:
onDetach in class AbstractPropertyModel
See Also:
AbstractPropertyModel.onDetach()

propertyExpression

protected java.lang.String propertyExpression(Component component)
Overrides:
propertyExpression in class CompoundPropertyModel
Parameters:
component - The component to get a property expression for
Returns:
The property expression for the component
See Also:
AbstractPropertyModel.propertyExpression(wicket.Component)

propertyType

protected java.lang.Class propertyType(Component component)
Overrides:
propertyType in class CompoundPropertyModel
Parameters:
component - The component
Returns:
The property type
See Also:
AbstractPropertyModel.propertyType(wicket.Component)

toString

public java.lang.String toString()
Overrides:
toString in class CompoundPropertyModel
See Also:
AbstractDetachableModel.toString()


Copyright © 2004-2007 Wicket developers. All Rights Reserved.