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 34 Larry Allen 265-555-2731 402-555-3083
select toggle highlite 39 Larry Moore 627-555-1154 361-555-6012
select toggle highlite 16 Linda Wilson 587-555-2286 241-555-3865
select toggle highlite 18 Linda Johnson 568-555-7805 446-555-4357
select toggle highlite 22 Maria Graham 433-555-2100 751-555-6454
select toggle highlite 5 Matthew Nelson 552-555-1625 208-555-3881
select toggle highlite 7 Matthew Graham 767-555-5634 875-555-8763
select toggle highlite 15 Matthew Gonzalez 686-555-1567 378-555-7014