You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2015/05/19 09:17:59 UTC
[4/4] wicket git commit: WICKET-5906 Use default on missing resource
does not work
WICKET-5906 Use default on missing resource does not work
Fix API breaks in wicket-extensions and wicket-examples
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/31f3acb0
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/31f3acb0
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/31f3acb0
Branch: refs/heads/master
Commit: 31f3acb0d01af7be11a85c8e611c420180f77924
Parents: dd9e5e6
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Tue May 19 10:11:41 2015 +0300
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Tue May 19 10:17:17 2015 +0300
----------------------------------------------------------------------
.../org/apache/wicket/examples/compref/LabelPage.java | 10 +++++-----
.../org/apache/wicket/extensions/rating/RatingPanel.java | 4 ++--
2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/31f3acb0/wicket-examples/src/main/java/org/apache/wicket/examples/compref/LabelPage.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/compref/LabelPage.java b/wicket-examples/src/main/java/org/apache/wicket/examples/compref/LabelPage.java
index 47007d5..e901790 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/compref/LabelPage.java
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/compref/LabelPage.java
@@ -39,7 +39,7 @@ public class LabelPage extends WicketExamplePage
// add a static label
add(new Label("staticLabel", "static text"));
- // add a dynamic label. For this example, we create an annonymous
+ // add a dynamic label. For this example, we create an anonymous
// subclass
// of Model (just because it is less work then directly implementing
// IModel)
@@ -60,13 +60,13 @@ public class LabelPage extends WicketExamplePage
// for
// parameter substitution.
StringResourceModel stringResourceModel = new StringResourceModel("label.current.locale",
- this, null, getLocale());
+ this).setParameters(getLocale());
add(new Label("resourceLabel", stringResourceModel));
// and here we add a label that contains markup. Normally, this markup
// would be converted
- // to HTML escape characters so that e.g. a & really dislays as that
- // literal char wihout
+ // to HTML escape characters so that e.g. a & really displays as that
+ // literal char without
// our browser trying to resolve it to an HTML entity. But it this case
// we actually want
// our browser to interpret it as real markup, so we set the
@@ -91,4 +91,4 @@ public class LabelPage extends WicketExamplePage
add(new ExplainPanel(html, code));
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/wicket/blob/31f3acb0/wicket-extensions/src/main/java/org/apache/wicket/extensions/rating/RatingPanel.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/rating/RatingPanel.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/rating/RatingPanel.java
index 127a386..4b4753b 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/rating/RatingPanel.java
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/rating/RatingPanel.java
@@ -362,12 +362,12 @@ public abstract class RatingPanel extends Panel
if (nrOfVotes == null)
{
Object[] parameters = new Object[] { rating };
- model = new StringResourceModel("rating.simple", this, null, parameters);
+ model = new StringResourceModel("rating.simple", this).setParameters(parameters);
}
else
{
Object[] parameters = new Object[] { rating, nrOfVotes };
- model = new StringResourceModel("rating.complete", this, null, parameters);
+ model = new StringResourceModel("rating.complete", this).setParameters(parameters);
}
return new Label(id, model);
}