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 38 Jacob Smiith 310-555-3337 646-555-8335
select toggle highlite 43 Jacob Nelson 505-555-3227 443-555-8647
select toggle highlite 23 Jose Moore 327-555-8028 514-555-2325
select toggle highlite 48 Joshua Donahue 866-555-7016 382-555-5683
select toggle highlite 24 Kathleen Lee 437-555-5838 373-555-7610
select toggle highlite 33 Kathleen Lee 421-555-1418 607-555-1114
select toggle highlite 25 Keith Ortiz 224-555-4380 226-555-2810
select toggle highlite 35 Keith Allen 458-555-1376 437-555-6202