You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by jk...@apache.org on 2006/08/27 03:48:39 UTC
svn commit: r437269 - in /tapestry/tapestry4/trunk: pom.xml
src/site/apt/ajax/EventListener.apt tapestry-annotations/pom.xml
tapestry-contrib/pom.xml tapestry-framework/pom.xml tapestry-portlet/pom.xml
Author: jkuhnert
Date: Sat Aug 26 18:48:39 2006
New Revision: 437269
URL: http://svn.apache.org/viewvc?rev=437269&view=rev
Log:
Copying Howard's use of cobetura for test coverage reports. (yay! no license install necessary..) I'm sure
copying things from T5 will be a common theme in the months ahead ;)
Also added new section in EventListener documentation covering capitol vs lowercase event naming conventions
and when one should be used vs the other.
Modified:
tapestry/tapestry4/trunk/pom.xml
tapestry/tapestry4/trunk/src/site/apt/ajax/EventListener.apt
tapestry/tapestry4/trunk/tapestry-annotations/pom.xml
tapestry/tapestry4/trunk/tapestry-contrib/pom.xml
tapestry/tapestry4/trunk/tapestry-framework/pom.xml
tapestry/tapestry4/trunk/tapestry-portlet/pom.xml
Modified: tapestry/tapestry4/trunk/pom.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/pom.xml?rev=437269&r1=437268&r2=437269&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/pom.xml (original)
+++ tapestry/tapestry4/trunk/pom.xml Sat Aug 26 18:48:39 2006
@@ -240,29 +240,14 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.0-SNAPSHOT</version>
<inherited>true</inherited>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-clover-plugin</artifactId>
- <version>2.2</version>
+ <artifactId>maven-source-plugin</artifactId>
<inherited>true</inherited>
- <configuration>
- <licenseLocation>
- ${user.home}/.m2/repository/com/cenqua/clover/clover.license
- </licenseLocation>
- <jdk>1.5</jdk>
- </configuration>
- <executions>
- <execution>
- <phase>pre-site</phase>
- <goals>
- <goal>instrument</goal>
- <goal>aggregate</goal>
- </goals>
- </execution>
- </executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -277,6 +262,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
+ <version>2.1.1-SNAPSHOT</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -315,18 +301,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.1-SNAPSHOT</version>
<inherited>true</inherited>
</plugin>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-clover-plugin</artifactId>
- <version>2.2</version>
- <inherited>true</inherited>
- <configuration>
- <licenseLocation>
- ${user.home}/.m2/repository/com/cenqua/clover/clover.license
- </licenseLocation>
- </configuration>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Modified: tapestry/tapestry4/trunk/src/site/apt/ajax/EventListener.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/apt/ajax/EventListener.apt?rev=437269&r1=437268&r2=437269&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/src/site/apt/ajax/EventListener.apt (original)
+++ tapestry/tapestry4/trunk/src/site/apt/ajax/EventListener.apt Sat Aug 26 18:48:39 2006
@@ -13,7 +13,7 @@
Tapestry 4.1. It offers an awful lot, and is based around the functionality now familiar to many
in {{{http://dojotoolkit.org}dojo}}'s {{{http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book10}event API}}.
- <<See also:>> {{{../tapestry-annotations/index.html#EventListener}EventListener}} core annotation documentation.
+ <<See also:>> {{{../tapestry-annotations/index.html#EventListener}EventListener}} core annotation documentation., {{{http://www.quirksmode.org/js/introevents.html}Quircksmode}}
At its core this new annotation allows you to bind client side events to page/component
{{{../UsersGuide/listenermethods.html}listener}} methods. "Client Side" events can have a lot
@@ -41,7 +41,7 @@
+-------------------------------------------------------------
....
-@EventListener(elements = "myFavoriteDiv", events = "onMouseOver")
+@EventListener(elements = "myFavoriteDiv", events = "onmouseover")
public void watchText()
{
// do something
@@ -58,7 +58,7 @@
+-------------------------------------------------------------
....
-@EventListener(elements = "myFavoriteDiv", events = "onMouseOver")
+@EventListener(elements = "myFavoriteDiv", events = "onmouseover")
public void watchText(BrowserEvent event)
{
// do something
@@ -99,8 +99,7 @@
+-----------------------------------------------------------------------
....
-@Component(type = "Autocompleter", id = "projectSelect",
- bindings = { "model=projectModel", "value=selectedProject",
+@Component(bindings = { "model=projectModel", "value=selectedProject",
"displayName=message:choose.project", "filterOnChange=true",
"validators=validators:required"})
public abstract Autocompleter getProjectSelection();
@@ -144,3 +143,21 @@
As an added bonus, form validation is turned off by default with the {{{../tapestry-annotations/index.html#EventListener}EventListener}}
annotation as the majority use case is likely to be one off individual events where invoking
client side validation would be a cumbersome experience for users.
+
+* A note about event names
+
+ One common misunderstanding with EventListener is the exact syntax to use when listening to events.
+ The rules aren't very complicated, but there are two important differences:
+
+ * <<Native Events>> : These are events generated by actions people take in the web browser. Such events
+ might be Mouse,Keyboard,Focus,or any combination within. All are covered in the handy reference at
+ {{{http://www.quirksmode.org/js/introevents.html}Quircksmode.org}}. These events should almost always be
+ specified in all lowercase. Event though it is perfectly legal to do something like
+ <<<window.onScroll=function doMyBidding(evt){}>>>, this is not the same thing that happens when you call
+ <<<window.addEventListener('onscroll',function(e){});>>> - which is more or less what Dojo is doing. Just keep
+ all of your event names in lowercase and you'll be ok.
+
+ * <<Function Names>> : Because the Dojo event connection system is so powerful it allows you to bind to more
+ than just native javascript events, like function calls on javascript functions. The example above referenced
+ the <<<selectOption>>> function for the Autocompleter widget. It <is> valid/correct to use proper capital case
+ when referencing actual javascript functions on the client side.
\ No newline at end of file
Modified: tapestry/tapestry4/trunk/tapestry-annotations/pom.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/pom.xml?rev=437269&r1=437268&r2=437269&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-annotations/pom.xml (original)
+++ tapestry/tapestry4/trunk/tapestry-annotations/pom.xml Sat Aug 26 18:48:39 2006
@@ -114,27 +114,6 @@
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-clover-plugin</artifactId>
- <version>2.1</version>
- <inherited>true</inherited>
- <configuration>
- <licenseLocation>
- ${user.home}/.m2/repository/com/cenqua/clover/clover.license
- </licenseLocation>
- <jdk>1.5</jdk>
- </configuration>
- <executions>
- <execution>
- <phase>pre-site</phase>
- <goals>
- <goal>instrument</goal>
- <goal>aggregate</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
Modified: tapestry/tapestry4/trunk/tapestry-contrib/pom.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/pom.xml?rev=437269&r1=437268&r2=437269&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-contrib/pom.xml (original)
+++ tapestry/tapestry4/trunk/tapestry-contrib/pom.xml Sat Aug 26 18:48:39 2006
@@ -109,27 +109,6 @@
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-clover-plugin</artifactId>
- <version>2.1</version>
- <inherited>true</inherited>
- <configuration>
- <licenseLocation>
- ${user.home}/.m2/repository/com/cenqua/clover/clover.license
- </licenseLocation>
- <jdk>1.5</jdk>
- </configuration>
- <executions>
- <execution>
- <phase>pre-site</phase>
- <goals>
- <goal>instrument</goal>
- <goal>aggregate</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
Modified: tapestry/tapestry4/trunk/tapestry-framework/pom.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/pom.xml?rev=437269&r1=437268&r2=437269&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/pom.xml (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/pom.xml Sat Aug 26 18:48:39 2006
@@ -193,6 +193,7 @@
</execution>
</executions>
</plugin>
+ <!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clover-plugin</artifactId>
@@ -214,6 +215,7 @@
</execution>
</executions>
</plugin>
+ -->
</plugins>
</build>
Modified: tapestry/tapestry4/trunk/tapestry-portlet/pom.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-portlet/pom.xml?rev=437269&r1=437268&r2=437269&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-portlet/pom.xml (original)
+++ tapestry/tapestry4/trunk/tapestry-portlet/pom.xml Sat Aug 26 18:48:39 2006
@@ -117,27 +117,6 @@
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-clover-plugin</artifactId>
- <version>2.1</version>
- <inherited>true</inherited>
- <configuration>
- <licenseLocation>
- ${user.home}/.m2/repository/com/cenqua/clover/clover.license
- </licenseLocation>
- <jdk>1.5</jdk>
- </configuration>
- <executions>
- <execution>
- <phase>pre-site</phase>
- <goals>
- <goal>instrument</goal>
- <goal>aggregate</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>