You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Wilhelmsen Tor Iver <To...@arrive.no> on 2009/05/18 15:05:40 UTC

Custom FeedbackPanel in portlets

I made a FeedbackPanel to apply the Portlet 2.0 CSS classes to relevant messages. In my naïvetè I assumed I could just override getCSSClass(FeedbackMessage), but that is called both to set a style on the <li> item AND on the contained <span> element. Is there any reason for this, especially since the HTML template has class attributes on both of them and thus applies it to both? I ended up making a HTML template leaving out the class attribute on the <span>, but still...

(Quoth the source:)

			final Component label = newMessageDisplayComponent("message", message);
			final AttributeModifier levelModifier = new AttributeModifier("class", replacementModel);
			label.add(levelModifier);
			listItem.add(levelModifier);
			listItem.add(label);


Med vennlig hilsen

TOR IVER WILHELMSEN
Senior systemutvikler
Arrive AS
T (+47) 48 16 06 18
E-post: toriverw@arrive.no
http://www.arrive.no
http://servicedesk.arrive.no