Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Code Block
summ: You, and $\{otherCount\} others, reviewed '$\{title\}' and rated it $\{rate\}.

MyPanel.html:

Code Block
<span wicket:id="summary">Text that will be replaced.</span>

...

Code Block
summ.short: Thanks!
summ.long: You, and $\{otherCount\} others, reviewed '$\{title\}' and rated it $\{rate\}. Thanks!

MyPanel.html:

Code Block
<span wicket:id="summary">Text that will be replaced.</span>

...

Code Block
// summary.getMsgPrefs().getStyle() returns "short" or "long"
add(new Label("summary", new StringResourceModel("summ.$\{msgPrefs.style\}", this, new Model(summary))));

...

Code Block
add(new Label("summary", getString("summ.$\{msgPrefs.style\}", new Model(summary))));

...

Code Block
summ: You, and $\{othersLink\}, reviewed $\{titleLink\} and rated it $\{rate\}.
others: $\{otherCount\} others

MyPanel.html:

Code Block
<wicket:message key="summ">Text that will be replaced.
<span wicket:id="rate">rate</span>
<a href="#" wicket:id="titleLink">
<span wicket:id="titleLabel">label</span></a>
<a href="#" wicket:id="othersLink">
<span wicket:id="othersLabel">label<</span></a>
</wicket:message>

...

Code Block
// Note, we directly add the embedded components
// rate, othersLink and titleLink

add(new Label("rate", new PropertyModel(summary, "rate")));

Link othLink = new Link("othersLink") \{ .... \}
add(othLink);
othLink.add(new Label("othersLabel", new StringResourceModel(
"others", this, new Model(summary))));

ExternalLink titleLink = new ExternalLink(
"titleLink", summary.getTitleUrl());
add(titleLink);
titleLink.add(new Label("titleLabel",
new PropertyModel(summary, "title")));

...

Code Block
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<entry key="Required">ข้อมูลใน $\{label\} เป็นที่ต้องการ.</entry>
</properties>

...