[jira] Commented: (WICKET-911) refactor feedback to allow users to easily add custom levels
[ https://issues.apache.org/jira/browse/WICKET-911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12577837#action_12577837 ] Will Hoover commented on WICKET-911: I disagree... Wicket currently makes it convenient to generically define the message levels for underlying components that use them. For example, in a FeedbackPanel I can check the message level stored in the FeedbackMessage and determine how I need to format the message for display: protected final String getFeedbackResourcePrefix() { java.util.IteratorFeedbackMessage it = Session.get().getFeedbackMessages().iterator(); FeedbackMessage fbm; int level = -1; while (it.hasNext()) { fbm = it.next(); if (fbm.isFatal() || fbm.isError()) { return label.error; } else if (fbm.isWarning()) { level = FeedbackMessage.WARNING; } else if (level FeedbackMessage.WARNING fbm.isInfo()) { level = FeedbackMessage.INFO; } } switch (level) { case FeedbackMessage.WARNING: return label.warning; case FeedbackMessage.INFO: return label.info; default: return label.success; } } However, I do see an advantage to removing the bloat... Why not remove all of the error(message), info(message), etc. and replace them with one method message(message, level) or component.addFeedbackMessage(message, level)? Then any message level is accommodated for and the message levels themselves can be removed from the FeedbackMessage class. The level will become just a placeholder. refactor feedback to allow users to easily add custom levels Key: WICKET-911 URL: https://issues.apache.org/jira/browse/WICKET-911 Project: Wicket Issue Type: Improvement Components: wicket Affects Versions: 1.3.0-final Reporter: Igor Vaynberg Fix For: 1.4-M1 we have preset levels of fatal/error/warn/info, but users keep asking for more, such as sucess, see WICKET-907. we should probably refactor feedback to have component.addfeedback(feedbackmessage) instead of having ten methods for prebuild levels. as far as i can see wicket doesnt need to know if the message is error or success so there is no point in having a more complicated system. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-911) refactor feedback to allow users to easily add custom levels
[ https://issues.apache.org/jira/browse/WICKET-911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524153 ] Eelco Hillenius commented on WICKET-911: I'm fine with having a generic method, and I would be fine with removing fatal and warn, but I'd really like to keep error and info, partially because they are convenient, and partially because they'll be all over Wicket In Action. refactor feedback to allow users to easily add custom levels Key: WICKET-911 URL: https://issues.apache.org/jira/browse/WICKET-911 Project: Wicket Issue Type: Improvement Components: wicket Affects Versions: 1.3.0-final Reporter: Igor Vaynberg Fix For: 1.4.0-alpha we have preset levels of fatal/error/warn/info, but users keep asking for more, such as sucess, see WICKET-907. we should probably refactor feedback to have component.addfeedback(feedbackmessage) instead of having ten methods for prebuild levels. as far as i can see wicket doesnt need to know if the message is error or success so there is no point in having a more complicated system. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-911) refactor feedback to allow users to easily add custom levels
[ https://issues.apache.org/jira/browse/WICKET-911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524155 ] Igor Vaynberg commented on WICKET-911: -- this isnt scheduled till 1.4 so i dont think wia argument applies. convinience vs bloat we will have to evaluate when the time comes. refactor feedback to allow users to easily add custom levels Key: WICKET-911 URL: https://issues.apache.org/jira/browse/WICKET-911 Project: Wicket Issue Type: Improvement Components: wicket Affects Versions: 1.3.0-final Reporter: Igor Vaynberg Fix For: 1.4.0-alpha we have preset levels of fatal/error/warn/info, but users keep asking for more, such as sucess, see WICKET-907. we should probably refactor feedback to have component.addfeedback(feedbackmessage) instead of having ten methods for prebuild levels. as far as i can see wicket doesnt need to know if the message is error or success so there is no point in having a more complicated system. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.