On Thu, Dec 2, 2010 at 5:52 AM, Joseph Pachod <j...@thomas-daily.de> wrote:
> Hi > > I'm trying to apply the behaviors presented by Alastair Maw in his > presentation Wicket Forms > with Flair (cf > http://code.google.com/p/londonwicket/downloads/detail?name=LondonWicket-FormsWithFlair.pdf&can=2&q=) > > Basically, Alastair uses behavior to display feedback message specific to > some components next to the component in question. > > We use our components in form with feedback panel, for non component > specific messages. > > Overall, we would like these functionalities: > A - no message should be rendered twice > B - no message should be left unrendered (safety net) > C - component specific message should be rendered next to their component > D - when some messages were displayed next to their components, the > feedback panel should display a message for it (like "one of more input > didn't validate, please check them) > > In order to try to achieve that, I used the FeedbackMessage.isRendered() > method in both the behaviors and the feedback panel IFeedbackMessageFilter. > As you've discovered, using the isRendered() method for this really is difficult because it depends on the order of traversal. This makes it brittle to use this for your "safety net" or "catch all" feedback panel. I had encountered this issue and for one of my training classes, I threw together a solution. Your post prodded me to go ahead and post my solution as a blog post. After dusting off my long-forgotten blog, here it is: http://www.jeremythomerson.com/blog/2011/01/catching-all-feedback-messages-that-arent-rendered-by-other-feedback-panels/(or http://bit.ly/eHUEuN if that gets chopped up). Hopefully that helps someone. -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*