Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tapestry Wiki" for 
change notification.

The "Tapestry5AndJavaScriptExplained" page has been changed by LeonardLu.
http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplained?action=diff&rev1=5&rev2=6

--------------------------------------------------

  
  This article assumes that you have some basic knowledge of Tapestry 5. You 
don't need intimate knowledge of /how/ it works, just an understanding of how 
to develop applications with it. In addition you should also be acquainted with 
the following concepts:
  
-  * Component 
[[http://tapestry.apache.org/tapestry5/tapestry-core/guide/mixins.html|mixins]].
+  * Component 
[[http://tapestry.apache.org/tapestry5/guide/mixins.html|mixins]].
   * Some javascript knowledge. You should at least have a basic understanding 
of client-side objects and how they are created.
   * Understanding of the [[http://json.org/|JSON]] format and the 
[[http://www.prototypejs.org/|prototype]] library would be very helpful, but 
not required. A good starting point for modern JS programming (prototype 
oriented, but still generally useful) is http://www.prototypejs.org/learn.
  
@@ -74, +74 @@

  }
  }}}
  
- The first thing you may ask is "What does the 
[[http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/annotations/IncludeJavaScriptLibrary.html|@IncludeJavaScriptLibrary]]
 do"? Naturally, it includes a javascript library, but we'll have a closer look 
at it later. For now let's look at the `afterRender` method.
+ The first thing you may ask is "What does the 
[[http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/annotations/IncludeJavaScriptLibrary.html|@IncludeJavaScriptLibrary]]
 do"? Naturally, it includes a javascript library, but we'll have a closer look 
at it later. For now let's look at the `afterRender` method.
  
  {{{
        @AfterRender
@@ -89, +89 @@

  
  == Creating the Mixin's Javascript File ==
  
- Now let's create our javascript class to accompany our mixin. Following the 
convention, we'll place this file in the same package as our mixin class, such 
that it becomes a resource on the classpath. This is useful because when we 
pass a relative name to the 
[[http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/annotations/IncludeJavaScriptLibrary.html|@IncludeJavaScriptLibrary]],
 Tapestry will start in the package of the annotated class.
+ Now let's create our javascript class to accompany our mixin. Following the 
convention, we'll place this file in the same package as our mixin class, such 
that it becomes a resource on the classpath. This is useful because when we 
pass a relative name to the 
[[http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/annotations/IncludeJavaScriptLibrary.html|@IncludeJavaScriptLibrary]],
 Tapestry will start in the package of the annotated class.
  
  ''Maven location: src/main/resources/net/godcode/jsclarity/mixins/confirm.js 
(notice this is in `src/main/resources`)''
  
@@ -225, +225 @@

  
  == RenderSupport ==
  
- The last missing piece is the 
[[http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/RenderSupport.html|RenderSupport]]
 service. Look again at the `afterRender` method of the mixin class:
+ The last missing piece is the 
[[http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/RenderSupport.html|RenderSupport]]
 service. Look again at the `afterRender` method of the mixin class:
  
  {{{
        @AfterRender

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to