deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r869513 - in /websites/staging/deltaspike/trunk/content: ./ bean-validation.html
Date Mon, 15 Jul 2013 00:23:24 GMT
Author: buildbot
Date: Mon Jul 15 00:23:23 2013
New Revision: 869513

Log:
Staging update by buildbot for deltaspike

Modified:
    websites/staging/deltaspike/trunk/content/   (props changed)
    websites/staging/deltaspike/trunk/content/bean-validation.html

Propchange: websites/staging/deltaspike/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon Jul 15 00:23:23 2013
@@ -1 +1 @@
-1503087
+1503088

Modified: websites/staging/deltaspike/trunk/content/bean-validation.html
==============================================================================
--- websites/staging/deltaspike/trunk/content/bean-validation.html (original)
+++ websites/staging/deltaspike/trunk/content/bean-validation.html Mon Jul 15 00:23:23 2013
@@ -93,16 +93,17 @@
 <h2 id="scoping">Scoping</h2>
 <p><code>ConstraintValidator</code>s will inherit whatever scope as defined
in the bean class.  Inherently, a <code>ConstraintValidator</code> may be invoked
by multiple threads so please keep that in mind when using them.  You should consider using
at least <code>RequestScoped</code> validators.</p>
 <h2 id="code-requirements">Code Requirements</h2>
-<p>There are no compile dependencies to use the Bean Validation module.  You simply
need to override the factory, either in XML or in Java:</p>
+<p>There are no compile dependencies to use the Bean Validation module.  You simply
need to override the factory, either in Java:</p>
 <div class="codehilite"><pre><span class="n">Validation</span><span
class="o">.</span><span class="na">byDefaultProvider</span><span class="o">().</span><span
class="na">configure</span><span class="o">().</span><span class="na">constraintValidatorFactory</span><span
class="o">(</span><span class="k">new</span> <span class="n">CDIAwareConstraintValidatorFactory</span><span
class="o">()).</span><span class="na">buildValidatorFactory</span><span
class="o">()</span>
+</pre></div>
 
 
-<span class="o">:::</span><span class="n">xml</span>
-<span class="o">&lt;</span><span class="n">validation</span><span
class="o">-</span><span class="n">config</span> <span class="n">xmlns</span><span
class="o">=</span><span class="s">&quot;http://jboss.org/xml/ns/javax/validation/configuration&quot;</span>
- <span class="nl">xmlns:</span><span class="n">xsi</span><span
class="o">=</span><span class="s">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span>
- <span class="nl">xsi:</span><span class="n">schemaLocation</span><span
class="o">=</span><span class="s">&quot;http://jboss.org/xml/ns/javax/validation/configuration&quot;</span><span
class="o">&gt;</span>
-    <span class="o">&lt;</span><span class="n">constraint</span><span
class="o">-</span><span class="n">validator</span><span class="o">-</span><span
class="n">factory</span><span class="o">&gt;</span><span class="n">org</span><span
class="o">.</span><span class="na">apache</span><span class="o">.</span><span
class="na">deltaspike</span><span class="o">.</span><span class="na">beanValidation</span><span
class="o">.</span><span class="na">impl</span><span class="o">.</span><span
class="na">CDIAwareConstraintValidatorFactory</span><span class="o">&lt;/</span><span
class="n">constraint</span><span class="o">-</span><span class="n">validator</span><span
class="o">-</span><span class="n">factory</span><span class="o">&gt;</span>
-<span class="o">&lt;/</span><span class="n">validation</span><span
class="o">-</span><span class="n">config</span><span class="o">&gt;</span>
+<p>Or in XML:</p>
+<div class="codehilite"><pre><span class="nt">&lt;validation-config</span>
<span class="na">xmlns=</span><span class="s">&quot;http://jboss.org/xml/ns/javax/validation/configuration&quot;</span>
+ <span class="na">xmlns:xsi=</span><span class="s">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span>
+ <span class="na">xsi:schemaLocation=</span><span class="s">&quot;http://jboss.org/xml/ns/javax/validation/configuration&quot;</span><span
class="nt">&gt;</span>
+    <span class="nt">&lt;constraint-validator-factory&gt;</span>org.apache.deltaspike.beanValidation.impl.CDIAwareConstraintValidatorFactory<span
class="nt">&lt;/constraint-validator-factory&gt;</span>
+<span class="nt">&lt;/validation-config&gt;</span>
 </pre></div>
 
 



Mime
View raw message