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 18 Abby Graham 588-555-8222 215-555-1074
select toggle highlite 47 Abby Williams 381-555-5271 625-555-1473
select toggle highlite 4 Abner Jones 527-555-4252 485-555-8356
select toggle highlite 31 Abner Lee 844-555-1581 207-555-3132
select toggle highlite 9 Brianna Gonzalez 664-555-3204 438-555-2414
select toggle highlite 25 Brianna Moore 232-555-7315 627-555-1108
select toggle highlite 29 Brianna Gomez 218-555-3117 628-555-5087
select toggle highlite 2 Christopher Baker 207-555-3384 476-555-3580