[ 
https://issues.apache.org/jira/browse/WICKET-1760?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov resolved WICKET-1760.
-------------------------------------

    Resolution: Later

This ticket has no activity for 4 years. Closing it.
                
> Add an additional item reuse strategy to reuse items if an identified 
> feedback message type occurs.
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-1760
>                 URL: https://issues.apache.org/jira/browse/WICKET-1760
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>            Reporter: Louis Savoldy
>         Attachments: FeedbackMessageReuseStrategy.java
>
>   Original Estimate: 6h
>  Remaining Estimate: 6h
>
> Note:  the implementation is attached.
> Add an additional item reuse strategy to reuse items if an identified 
> feedback message type occurs.  As an example, this reuse strategy can be used 
> with a refreshing view to set the items back to their original values in the 
> event of a page validation error.  Although the existing 
> ReuseIfModelsEqualStrategy can also be used to accomplish this, you must 
> override the model's equals/hashcode for proper implementation (which is not 
> always feasible based on the models complexity and depth).  
> *All that is required to use this strategy is to set the item reuse (i.e. no 
> need to override equals/hashcode)
> The usage of the new strategy would be as follows:
> Usage Example 1: If you want to redisplay the existing items of the 
> refreshing view if a feed back message is generated of type warning or higher 
> (warning, error, or fatal), you could do the following: 
> refreshingViewInstance.setItemReuseStrategy(new 
> FeedbackMessageReuseStrategy(FeedbackMessageReuseStrategy.Operator.GTE, 
> FeedbackMessage.WARNING));
> Usage Example 2: For feedback message types that  falls between (and 
> including) INFO and ERROR, you could do the following: 
> refreshingViewInstance.setItemReuseStrategy(new 
> FeedbackMessageReuseStrategy(FeedbackMessageReuseStrategy.Operator.BETWEEN, 
> FeedbackMessage.INFO, FeedbackMessage.ERROR));

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to