Wicket Remove

Welcome to Repeater View Examples

[go back]

Selected Contact: No Contact Selected
This example demonstrates the use of ReuseIfModelsEqualStrategy implementation of IItemReuseStrategy interface for the dataview. IItemReuseStrategy is responsible for how the child item components of the dataview are recycled between requests. The default strategy simply discards all previous items. The ReuseIfModelsEqualStrategy strategy will keep items if the model of the item matches one of the models that is to be displayed in the current request - this allows reuse of items that did not leave the page. This is useful when there is a need to keep state across requests for items that are visible within the page. Notice that when you click the 'toggle highlite' link the item stays highlited until it leaves the page or you click the link again. If the default strategy would have been used instead, the item would not have been highlited because it would have been replaced by a new item and thus would not have known that it should be highlited.

<< 1 2 3 4 5 6 7 >>
Actions ID First Name Last Name Home Phone Cell Phone
select toggle highlite 3 Michael Allen 782-555-1751 520-555-5843
select toggle highlite 11 Willie Bailey 368-555-2064 754-555-7682
select toggle highlite 19 Matthew Bailey 585-555-6641 244-555-5727
select toggle highlite 33 Emily Bailey 847-555-7716 878-555-7240
select toggle highlite 40 Jose Bailey 445-555-4810 606-555-5068
select toggle highlite 28 Larry Baker 222-555-2382 667-555-8688
select toggle highlite 7 Matthew Brown 267-555-6844 583-555-2657
select toggle highlite 29 Douglas Brown 788-555-3548 811-555-4262