You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2011/07/05 21:43:17 UTC

[jira] [Assigned] (WICKET-3868) Feedback message should be handled the same way everywhere.

     [ https://issues.apache.org/jira/browse/WICKET-3868?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov reassigned WICKET-3868:
---------------------------------------

    Assignee: Martin Grigorov

> Feedback message should be handled the same way everywhere.
> -----------------------------------------------------------
>
>                 Key: WICKET-3868
>                 URL: https://issues.apache.org/jira/browse/WICKET-3868
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Maarten Billemont
>            Assignee: Martin Grigorov
>
> Feedback messages are Serializables.  While I personally don't agree with that (since users want to see a String, not a Serializable object), it is the way it is.  However, that means we should be careful that the feedback message object is handled the same way everywhere.
> For instance, FeedbackPanel.newMessageDisplayComponent(String, FeedbackMessage) does a toString() on it, while AjaxEditableLabel.onError(AjaxRequestTarget) casts it to String if it's a String and pretends it's not there if it's not.
> Presumably, the latter is not the intended way of using the message, and it should be corrected to act like the former.
> I believe it raises the issue of danger with using the wrong type of object very well, though.  It opens the road for bugs like this one, where your feedback message that isn't a message isn't handled properly because the framework assumes it's a message.  IMO, we should make it a String and the user should put whatever their toString would generate in a feedback message, instead of the object itself.  KISS.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira