deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r946131 - in /websites/staging/deltaspike/trunk/content: ./ documentation/jsf.html
Date Thu, 02 Apr 2015 21:34:21 GMT
Author: buildbot
Date: Thu Apr  2 21:34:21 2015
New Revision: 946131

Log:
Staging update by buildbot for deltaspike

Modified:
    websites/staging/deltaspike/trunk/content/   (props changed)
    websites/staging/deltaspike/trunk/content/documentation/jsf.html

Propchange: websites/staging/deltaspike/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Apr  2 21:34:21 2015
@@ -1 +1 @@
-1668654
+1670980

Modified: websites/staging/deltaspike/trunk/content/documentation/jsf.html
==============================================================================
--- websites/staging/deltaspike/trunk/content/documentation/jsf.html (original)
+++ websites/staging/deltaspike/trunk/content/documentation/jsf.html Thu Apr  2 21:34:21 2015
@@ -200,6 +200,7 @@ body {
 </li>
 <li><a href="#_use_the_module_features">Use the Module Features</a>
 <ul class="sectlevel2">
+<li><a href="#_jsf_messages">JSF Messages</a></li>
 <li><a href="#_multi_window_handling">Multi-Window Handling</a>
 <ul class="sectlevel3">
 <li><a href="#_background">Background</a>
@@ -390,6 +391,45 @@ the corresponding impact.
 </table>
 </div>
 <div class="sect2">
+<h3 id="_jsf_messages">JSF Messages</h3>
+<div class="paragraph">
+<p>DeltaSpike provides an injectable component for typesafe FacesMessages.</p>
+</div>
+<div class="paragraph">
+<p>Is provides an integration with <a href="core.html#_messages_and_i18n">MessageBundle</a>
making the use of JSF messages and I18N simple and type-safe.</p>
+</div>
+<div class="paragraph">
+<p>Usage:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="annotation">@MessageBundle</span>
+<span class="directive">public</span> <span class="type">interface</span>
<span class="class">Messages</span>
+{
+    <span class="annotation">@MessageTemplate</span>(<span class="string"><span
class="delimiter">&quot;</span><span class="content">Welcome to DeltaSpike</span><span
class="delimiter">&quot;</span></span>)
+    <span class="predefined-type">String</span> welcomeToDeltaSpike();
+}
+
+ <span class="annotation">@Model</span>
+ <span class="directive">public</span> <span class="type">class</span>
<span class="class">MyJSFBean</span>
+ {
+    <span class="annotation">@Inject</span>
+    <span class="directive">private</span> JsfMessage&lt;Messages&gt;
messages;
+
+    ...
+    messages.addInfo().welcomeToDeltaSpike();
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>MessageBundle methods which are used as JsfMessage can return a <code>org.apache.deltaspike.core.api.message.Message</code>
or a String.
+In case of a String we use it for both the summary and detail information on the FacesMessage.</p>
+</div>
+<div class="paragraph">
+<p>If a Message is returned, we lookup the 'detail' and 'summary' categories (see <code>org.apache.deltaspike.core.api.message.Message#toString(String)</code>
for creating the FacesMessage.</p>
+</div>
+</div>
+<div class="sect2">
 <h3 id="_multi_window_handling">Multi-Window Handling</h3>
 <div class="sect3">
 <h4 id="_background">Background</h4>



Mime
View raw message