brdr.add(AttributeModifier.replace("style", new AbstractReadOnlyModel<String>()
{
@Override
public String getObject()
{
final IFeedbackMessageFilter filter = feedback.getFilter();
boolean error = new FeedbackCollector(getPage()).collect(
new IFeedbackMessageFilter()
{
@Override
public boolean accept(FeedbackMessage message)
{
return filter.accept(message) && message.isError();
}
}).size() > 0;
return "border: 1px solid " + (error ? "red" : "green");
}
}));