You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by ad...@apache.org on 2019/07/19 16:08:06 UTC
[wicket] branch wicket-8.x updated: Added more examples for
wicket:message and added some SEO
This is an automated email from the ASF dual-hosted git repository.
adelbene pushed a commit to branch wicket-8.x
in repository https://gitbox.apache.org/repos/asf/wicket.git
The following commit(s) were added to refs/heads/wicket-8.x by this push:
new 2e18543 Added more examples for wicket:message and added some SEO
2e18543 is described below
commit 2e1854305a36af7bfe8addd447b80a4844962eb9
Author: Andrea Del Bene <ad...@apache.org>
AuthorDate: Fri Jul 19 18:05:36 2019 +0200
Added more examples for wicket:message and added some SEO
---
.../src/main/asciidoc/i18n/i18n_2.adoc | 31 ++++++++++++++++++++++
wicket-user-guide/src/main/asciidoc/single.adoc | 2 ++
2 files changed, 33 insertions(+)
diff --git a/wicket-user-guide/src/main/asciidoc/i18n/i18n_2.adoc b/wicket-user-guide/src/main/asciidoc/i18n/i18n_2.adoc
index fb82e0c..6721042 100644
--- a/wicket-user-guide/src/main/asciidoc/i18n/i18n_2.adoc
+++ b/wicket-user-guide/src/main/asciidoc/i18n/i18n_2.adoc
@@ -152,3 +152,34 @@ If we want to specify multiple attributes at once, we can separate them with a c
<input type="submit" value="Preview value" wicket:message="value:key4value, title:key4title"/>
----
+
+Finally, we can work with more complex text templates nesting components within a wicket:message element. For example:
+
+[source,xml]
+----
+<wicket:message key="myKey">
+ This text will be replaced with text from the properties file.
+ <span wicket:id="amount">[amount]</span>.
+ <a wicket:id="link">
+ <wicket:message key="linkText"/>
+ </a>
+</wicket:message>
+----
+
+----
+myKey=Your balance is ${amount}. Click ${link} to view the details.
+linkText=here
+----
+
+and
+
+----
+add(new Label("amount",new Model("$5.00")));
+add(new BookmarkablePageLink("link",DetailsPage.class));
+----
+
+Results in:
+
+----
+Your balance is $5.00. Click <a href="...">here</a> to view the details.
+----
\ No newline at end of file
diff --git a/wicket-user-guide/src/main/asciidoc/single.adoc b/wicket-user-guide/src/main/asciidoc/single.adoc
index 0974694..95fda83 100644
--- a/wicket-user-guide/src/main/asciidoc/single.adoc
+++ b/wicket-user-guide/src/main/asciidoc/single.adoc
@@ -1,5 +1,7 @@
= Wicket 8.x Reference Guide
The Apache Software Foundation
+:description: Official User Guide for Apache Wicket framework.
+:keywords: Apache Wicket, User Guide, examples, AJAX, stateless
:toc: left
:icons: font
:sectlinks: