In a previous post I asked for some modifications related to the mechanism
wicket uses for to handle FeedbackMessages. Investigating a bit more I
discovered that the methods getFeedbackMessages() of Page and Session are
declared as final.which does not allows to plug in your own implementation
(an extension) of a FeedbackMessages class.
public final FeedbackMessages getFeedbackMessages()
{
if (feedbackMessages == null)
{
feedbackMessages = new FeedbackMessages();
}
return feedbackMessages;
}
It would be nice to have the final removed or at least provide a way to plug
in a different kind of FeedbackMessages class (e.g by making it return an
interface instead of a class). The same applies to the FeedbackMessage
class.
Well having failed to achieve my goal (just wrap FeedbackMessage with my
own extension) at the Page and Session levels I tried to do it at the
FeedbackMessagesModel level. There I discovered this method
/**
* Override this method to post process to the FeedbackMessage list.
*
* @param messages
* List of sorted and filtered FeedbackMessages for further
* processing
* @return The processed FeedbackMessage list
*/
protected List<FeedbackMessage> processMessages(final
List<FeedbackMessage>
messages)
{
return messages;
}
which would have been suitable for the task. But unfortunately it is
protected and I can't use it to wrap the FeedbackMessages with my own
ones...
Best regards,
Ernesto
--
View this message in context:
http://www.nabble.com/problems-regarding-FeedbackMessages-tf2384705.html#a6647213
Sent from the Wicket - Dev mailing list archive at Nabble.com.