wicket.model
Class BoundCompoundPropertyModel

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

public class BoundCompoundPropertyModel
extends CompoundPropertyModel

A compound property model that supports type conversions and OGNL 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 ognlExpression)
          Adds a property binding.
 Component bind(Component component, java.lang.String ognlExpression, java.lang.Class type)
          Adds a property and type conversion binding.
protected  java.lang.String ognlExpression(Component component)
           
protected  void onDetach()
          Unsets this property model's instance variables and detaches the model.
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 ognlExpression)
Adds a property binding.

Parameters:
component - The component to bind
ognlExpression - An OGNL 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 ognlExpression,
                      java.lang.Class type)
Adds a property and type conversion binding.

Parameters:
component - The component to bind
ognlExpression - An OGNL 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()

ognlExpression

protected java.lang.String ognlExpression(Component component)
Overrides:
ognlExpression in class CompoundPropertyModel
See Also:
AbstractPropertyModel.ognlExpression(wicket.Component)

propertyType

protected java.lang.Class propertyType(Component component)
Overrides:
propertyType in class CompoundPropertyModel
See Also:
AbstractPropertyModel.propertyType(wicket.Component)

toString

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


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