[CONF] Apache Tapestry Component Mixins

2014-02-01 Thread Bob Harner (Confluence)














  


Bob Harner edited the page:
 


Component Mixins   




 Comment: Tweaks to intro paragraph 


...
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 to of all sorts of to components.
Tapestry comes with several mixins, such as the Autocomplete mixin which adds autocomplete behavior to an ordinary TextField Component. In addition, you can easily create your own.
...






 View Online   Like   View Changes  
 Stop watching space   Manage Notifications  


 


 


  This message was sent by Atlassian Confluence 5.0.3, Team Collaboration Software  






svn commit: r896086 - in /websites/production/tapestry/content: cache/main.pageCache component-mixins.html

2014-02-01 Thread buildbot
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
-/divpYou 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./ppTapestry 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./ph2 
id=ComponentMixins-MixinClassesMixin Classes/h2pMixin classes are stored 
in the codemixins/code sub-package of your application, below the 
application (or library) root package. This parallels where your component and 
page classes are stored./ppOther than that, mixin classes are the same as 
any other component class./ph2 id=ComponentM
 ixins-MixinLimitationsMixin Limitations/h2pCurrently, mixins are allowed 
to do anything a component can do, including having parameters and render phase 
methods./ppMixins may not have a template. They integrate with the 
component strictly in terms of invoking render phase methods./ppMixins 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./ppMixins may not, 
themselves, have mixins./ph2 id=ComponentMixins-UsingMixinsUsing 
Mixins/h2pMixins are used in two different scenarios: emInstance 
mixins/em and emImplementation mixins/em./ph3 
id=ComponentMixins-InstanceMixinsInstance Mixins/h3pAn instance mixin is 
a mixin applied to a specific eminstance/em of a component. This can be 
done in the a shape=rect h
 ref=component-templates.htmlcomponent template/a with the 
codemixins/code attribute of the component tag. This is a comma-separated 
list of mixin names./pdiv class=code panel pdl style=border-width: 
1px;div class=codeContent panelContent pdl
+/divpYou 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./ppTapestry 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./ph2 
id=ComponentMixins-MixinClassesMixin Classes/h2pMixin classes are stored 
in the codemixins/code sub-package of your application, below the 
application (or library) root package. This parallels where your component and 
page classes are stored./ppOther than that, mi
 xin classes are the same as any other component class./ph2 
id=ComponentMixins-MixinLimitationsMixin Limitations/h2pCurrently, 
mixins are allowed to do anything a component can do, including having 
parameters and render phase methods./ppMixins may not have a template. They 
integrate with the component strictly in terms of invoking render phase 
methods./ppMixins 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./ppMixins may not, themselves, have mixins./ph2 
id=ComponentMixins-UsingMixinsUsing Mixins/h2pMixins are used in two 
different scenarios: emInstance mixins/em and emImplementation 
mixins/em./ph3 id=ComponentMixins-InstanceMixinsInstance 
Mixins/h3pAn instance mixin is a mixin applied to a specific
  eminstance/em of a component. This can be