Skip to content

Instantly share code, notes, and snippets.

@jthomerson
Created September 17, 2013 15:13
Show Gist options
  • Save jthomerson/6595716 to your computer and use it in GitHub Desktop.
Save jthomerson/6595716 to your computer and use it in GitHub Desktop.
written in vim quickly - ignore compile errors
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java
index 968a93c..3272cc1 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java
@@ -333,7 +333,7 @@ public class FeedbackPanel extends Panel implements IFeedback
protected Component newMessageDisplayComponent(String id, FeedbackMessage message)
{
Serializable serializable = message.getMessage();
- Label label = new Label(id, (serializable == null) ? "" : serializable.toString());
+ Label label = new Label(id, (serializable instanceof IModel<?> ? ((IModel<?>) serializable) : (serializable == null) ? "" : serializable.toString()));
label.setEscapeModelStrings(FeedbackPanel.this.getEscapeModelStrings());
return label;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment