Author: buildbot
Date: Sat Feb  1 16:20:40 2014
New Revision: 896086

Log:
Production update by buildbot for tapestry

Modified:
    websites/production/tapestry/content/cache/main.pageCache
    websites/production/tapestry/content/component-mixins.html

Modified: websites/production/tapestry/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/tapestry/content/component-mixins.html
==============================================================================
--- websites/production/tapestry/content/component-mixins.html (original)
+++ websites/production/tapestry/content/component-mixins.html Sat Feb  1 
16:20:40 2014
@@ -118,7 +118,7 @@
                 
                             </div>
         </li></ul>
-</div><p>You can think of a mixin as a kind of mashup for a component; it 
combines the behavior of the mixin with the behavior of the component, and 
bundles it all in one place. Mixins may be used to add validation to user input 
fields, or to add Ajax effects and behaviors to all sorts of 
components.</p><p>Tapestry comes with several mixins, such as the <a 
shape="rect" class="external-link" 
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/Autocomplete.html";>Autocomplete
 mixin</a> which adds autocomplete behavior to an ordinary TextField Component. 
In addition, you can easily create your own.</p><h2 
id="ComponentMixins-MixinClasses">Mixin Classes</h2><p>Mixin classes are stored 
in the <code>mixins</code> sub-package of your application, below the 
application (or library) root package. This parallels where your component and 
page classes are stored.</p><p>Other than that, mixin classes are the same as 
any other component class.</p><h2 id="ComponentM
 ixins-MixinLimitations">Mixin Limitations</h2><p>Currently, mixins are allowed 
to do anything a component can do, including having parameters and render phase 
methods.</p><p>Mixins may not have a template. They integrate with the 
component strictly in terms of invoking render phase methods.</p><p>Mixins may 
have persistent fields, but currently, this is not implemented perfectly (there 
is a potential for a name clash between a mixin and the component or another 
mixin). Use persistent fields with mixins with care ... or better yet, delegate 
persistence to the container using parameters.</p><p>Mixins may not, 
themselves, have mixins.</p><h2 id="ComponentMixins-UsingMixins">Using 
Mixins</h2><p>Mixins are used in two different scenarios: <em>Instance 
mixins</em> and <em>Implementation mixins</em>.</p><h3 
id="ComponentMixins-InstanceMixins">Instance Mixins</h3><p>An instance mixin is 
a mixin applied to a specific <em>instance</em> of a component. This can be 
done in the <a shape="rect" h
 ref="component-templates.html">component template</a> with the 
<code>mixins</code> attribute of the component tag. This is a comma-separated 
list of mixin names.</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+</div><p>You can think of a mixin as a kind of mashup for a component; it 
combines the new behavior of the mixin with the existing behavior of the 
component, and bundles it all in one place. Mixins may be used to add 
specialized validation to user input fields, dynamically modify the HTML output 
of a component, or to add Ajax effects and behaviors of all sorts to 
components.</p><p>Tapestry comes with several mixins, such as the <a 
shape="rect" class="external-link" 
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/Autocomplete.html";>Autocomplete
 mixin</a> which adds autocomplete behavior to an ordinary TextField Component. 
In addition, you can easily create your own.</p><h2 
id="ComponentMixins-MixinClasses">Mixin Classes</h2><p>Mixin classes are stored 
in the <code>mixins</code> sub-package of your application, below the 
application (or library) root package. This parallels where your component and 
page classes are stored.</p><p>Other than that, mi
 xin classes are the same as any other component class.</p><h2 
id="ComponentMixins-MixinLimitations">Mixin Limitations</h2><p>Currently, 
mixins are allowed to do anything a component can do, including having 
parameters and render phase methods.</p><p>Mixins may not have a template. They 
integrate with the component strictly in terms of invoking render phase 
methods.</p><p>Mixins may have persistent fields, but currently, this is not 
implemented perfectly (there is a potential for a name clash between a mixin 
and the component or another mixin). Use persistent fields with mixins with 
care ... or better yet, delegate persistence to the container using 
parameters.</p><p>Mixins may not, themselves, have mixins.</p><h2 
id="ComponentMixins-UsingMixins">Using Mixins</h2><p>Mixins are used in two 
different scenarios: <em>Instance mixins</em> and <em>Implementation 
mixins</em>.</p><h3 id="ComponentMixins-InstanceMixins">Instance 
Mixins</h3><p>An instance mixin is a mixin applied to a specific
  <em>instance</em> of a component. This can be done in the <a shape="rect" 
href="component-templates.html">component template</a> with the 
<code>mixins</code> attribute of the component tag. This is a comma-separated 
list of mixin names.</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[&lt;t:textfield t:id=&quot;accountName&quot; 
t:mixins=&quot;Autocomplete,DefaultFromCookie&quot; /&gt;
 ]]></script>
 </div></div><p>Alternately, when the @<a shape="rect" class="external-link" 
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Component.html";>Component</a>
 annotation is used to define the component type, you may specify the mixins in 
two ways:</p><ul><li>The @<a shape="rect" class="external-link" 
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Mixins.html";>Mixins</a>
 annotation allows a list of mixin names to be specified.</li><li>The @<a 
shape="rect" class="external-link" 
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/MixinClasses.html";>MixinClasses</a>
 annotation allows a set of mixin classes to be specified 
directly.</li></ul><p>The former is often less verbose, and allows core mixins 
to be overridden with application-specific mixins. The later format is more 
specific and more refactor-safe (renaming a mixin class will rename the entry 
in the MixinClasses annotation as well).</p>
 <p>Example:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">


Reply via email to