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 7 Christopher Smiith 674-555-6134 278-555-2888
select toggle highlite 4 Debra Smiith 548-555-2248 400-555-7320
select toggle highlite 23 Debra Ortiz 484-555-6003 871-555-6082
select toggle highlite 50 Douglas Baker 421-555-2803 226-555-7004
select toggle highlite 36 Gerald Ortiz 845-555-3432 684-555-7681
select toggle highlite 10 Hailey Johnson 877-555-2438 404-555-2308
select toggle highlite 14 Hailey Lee 553-555-3870 228-555-5608
select toggle highlite 45 Hailey Allen 606-555-3587 735-555-1316