wicket.markup.html.list
Class ListItemModel

java.lang.Object
  extended by wicket.model.AbstractDetachableModel
      extended by wicket.markup.html.list.ListItemModel
All Implemented Interfaces:
java.io.Serializable, IDetachable, IModel

public class ListItemModel
extends AbstractDetachableModel

Model for list items.

See Also:
Serialized Form

Constructor Summary
ListItemModel(ListView listView, int index)
          Construct
 
Method Summary
 IModel getNestedModel()
          Gets the nested model.
protected  void onAttach()
          Attaches to the current request.
protected  void onDetach()
          Detaches from the current request.
protected  java.lang.Object onGetObject(Component component)
          Called when getObject is called in order to retrieve the detachable object.
protected  void onSetObject(Component component, java.lang.Object object)
          Called when setObject is called in order to change the detachable object.
 
Methods inherited from class wicket.model.AbstractDetachableModel
attach, detach, getObject, isAttached, setObject, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ListItemModel

public ListItemModel(ListView listView,
                     int index)
Construct

Parameters:
listView - The ListView
index - The index of this model
Method Detail

getNestedModel

public IModel getNestedModel()
Description copied from interface: IModel
Gets the nested model.

Specified by:
getNestedModel in interface IModel
Specified by:
getNestedModel in class AbstractDetachableModel
Returns:
The nested model object.
See Also:
IModel.getNestedModel()

onAttach

protected void onAttach()
Description copied from class: AbstractDetachableModel
Attaches to the current request. Implement this method with custom behavior, such as loading the model object.

Specified by:
onAttach in class AbstractDetachableModel
See Also:
AbstractDetachableModel.onAttach()

onDetach

protected void onDetach()
Description copied from class: AbstractDetachableModel
Detaches from the current request. Implement this method with custom behavior, such as setting the model object to null.

Specified by:
onDetach in class AbstractDetachableModel
See Also:
AbstractDetachableModel.onDetach()

onGetObject

protected java.lang.Object onGetObject(Component component)
Description copied from class: AbstractDetachableModel
Called when getObject is called in order to retrieve the detachable object. Before this method is called, getObject() always calls attach() to ensure that the object is attached.

Specified by:
onGetObject in class AbstractDetachableModel
Parameters:
component - The component asking for the object
Returns:
The object
See Also:
AbstractDetachableModel.onGetObject(wicket.Component)

onSetObject

protected void onSetObject(Component component,
                           java.lang.Object object)
Description copied from class: AbstractDetachableModel
Called when setObject is called in order to change the detachable object. Before this method is called, setObject() always calls attach() to ensure that the object is attached.

Specified by:
onSetObject in class AbstractDetachableModel
Parameters:
component - The component asking for replacement of the model object
object - The new model object
See Also:
AbstractDetachableModel.onSetObject(wicket.Component, java.lang.Object)


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