Updated Branches: refs/heads/master 9ffee0027 -> 8fe07e5de
Improve the javadoc for WicketMessageResolver. >From users@ mailing list thread with subject: <wicket:message> throws if key >not found, contrary to what's in docs Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/8fe07e5d Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/8fe07e5d Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/8fe07e5d Branch: refs/heads/master Commit: 8fe07e5ded038062a209c042084f4946919424bc Parents: 9ffee00 Author: Martin Tzvetanov Grigorov <[email protected]> Authored: Mon Oct 1 11:56:03 2012 +0300 Committer: Martin Tzvetanov Grigorov <[email protected]> Committed: Mon Oct 1 11:57:52 2012 +0300 ---------------------------------------------------------------------- .../markup/resolver/WicketMessageResolver.java | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/8fe07e5d/wicket-core/src/main/java/org/apache/wicket/markup/resolver/WicketMessageResolver.java ---------------------------------------------------------------------- diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/resolver/WicketMessageResolver.java b/wicket-core/src/main/java/org/apache/wicket/markup/resolver/WicketMessageResolver.java index 1dac20f..f147539 100644 --- a/wicket-core/src/main/java/org/apache/wicket/markup/resolver/WicketMessageResolver.java +++ b/wicket-core/src/main/java/org/apache/wicket/markup/resolver/WicketMessageResolver.java @@ -42,8 +42,7 @@ import org.slf4j.LoggerFactory; /** * This is a tag resolver which handles <wicket:message key="myKey">Default * Text</wicket:message>. The resolver will replace the whole tag with the message found in - * the properties file associated with the Page. If no message is found, the default body text will - * remain. + * the properties file associated with the Page. * <p> * You can also nest child components inside a wicket:message and then reference them from the * properties file. For example in the html @@ -85,7 +84,8 @@ import org.slf4j.LoggerFactory; * * It is possible to switch between logging a warning and throwing an exception if either the * property key/value or any of the variables can not be found. - * + * + * @see org.apache.wicket.settings.IResourceSettings#setThrowExceptionOnMissingResource(boolean) * @author Juergen Donnerstag * @author John Ray */ @@ -218,10 +218,10 @@ public class WicketMessageResolver implements IComponentResolver log.warn("No value found for wicket:message tag with key: {}", key); - String formatedNotFound = String.format(NOT_FOUND, key); // If open tag was open-close if (markupStream.hasMore() == false) { + String formatedNotFound = String.format(NOT_FOUND, key); getResponse().write(formatedNotFound); } super.onComponentTagBody(markupStream, openTag);
