public StyleValidationFeedback(String styleName) {
this.styleName = styleName;
}
public void handleException(Object source, ValidationException exception) {
UIObject object = (UIObject) source;
if(this.styleName.equals(object.getStyleName()) ){
return;
}
String previousStyle = object.getStyleName() == null ||
object.getStyleName().length() == 0 ?
"default" :
object.getStyleName();
if( !this.previousStyles.containsKey(source) )
this.previousStyles.put( source, previousStyle );
Logger.getAnonymousLogger().log( Level.SPAM, "Previous style: "+ previousStyle, null );
object.setStyleName( this.styleName );
Logger.getAnonymousLogger().log( Level.SPAM, "Current style: "+ object.getStyleName(), null );
}