Updated Branches: refs/heads/wicket-1.5.x 8c6c9e052 -> 22223e20b
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/22223e20 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/22223e20 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/22223e20 Branch: refs/heads/wicket-1.5.x Commit: 22223e20b83a950577d0bb585d2e1d258c009324 Parents: 8c6c9e0 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:58:12 2012 +0300 ---------------------------------------------------------------------- .../markup/resolver/WicketMessageResolver.java | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/22223e20/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 ef929fa..24086f7 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 */ @@ -216,10 +216,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);
