tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andy...@apache.org
Subject svn commit: r594718 - in /tapestry/tapestry4/trunk/src/site: apt/ajax/beyonddojo.apt apt/ajax/dojotips.apt site.xml
Date Tue, 13 Nov 2007 23:42:21 GMT
Author: andyhot
Date: Tue Nov 13 15:42:21 2007
New Revision: 594718

URL: http://svn.apache.org/viewvc?rev=594718&view=rev
Log:
some tips on dojo and docs on using other libs

Added:
    tapestry/tapestry4/trunk/src/site/apt/ajax/beyonddojo.apt
    tapestry/tapestry4/trunk/src/site/apt/ajax/dojotips.apt
      - copied, changed from r594033, tapestry/tapestry4/trunk/src/site/apt/ajax/index.apt
Modified:
    tapestry/tapestry4/trunk/src/site/site.xml

Added: tapestry/tapestry4/trunk/src/site/apt/ajax/beyonddojo.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/apt/ajax/beyonddojo.apt?rev=594718&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/src/site/apt/ajax/beyonddojo.apt (added)
+++ tapestry/tapestry4/trunk/src/site/apt/ajax/beyonddojo.apt Tue Nov 13 15:42:21 2007
@@ -0,0 +1,46 @@
+ ------
+Ajax/DHTML Guide - Beyond Dojo
+ ------
+Andreas Andreou
+ ------
+13 Nov 2007
+ ------
+ 
+Beyond Dojo - Adding other javascript libraries
+
+ Starting with Tapestry 4.1.4, it is possible to completely remove dojo from the generated
+ pages, and instead use other javascript libraries. Here are the required steps:
+
+ * Create an 'adapter' javascript file that implements Tapestry's required javascript
+   functions using the js library of your choice. A simple adaptor that does nothing
+   (but is quite useful for documentation and for finding what needs to be implemented
+   is at classpath:/tapestry/skeleton/core.js
+
+ * Add an implementation for the tapestry.js.JavascriptManager service that includes references
+ to the javascript files (both the libraries and of your adaptor). You'll typically want
to set
+ the files property to a comma separated String of file references
+ (such as <<<classpath:/js/prototype.js,classpath:/js/scriptaculous.js>>>)
and the tapestryFile
+ to your adapter javascript, other properties can be left empty :
+
++-----------------------------------------------------------
+    <implementation service-id="tapestry.js.JavascriptManager">
+        <invoke-factory>
+            <construct class="org.apache.tapestry.javascript.JavascriptManagerImpl">
+                <set-service property="assetSource" service-id="tapestry.asset.AssetSource"/>
+                <set property="files"
+                    value="classpath:/yui/yahoo/yahoo-min.js,classpath:/yui/dom/dom-min.js,classpath:/yui/event/event-min.js"/>
+                <set property="formFiles" value=""/>
+                <set property="widgetFiles" value=""/>
+                <set property="path" value=""/>
+                <set property="tapestryFile" value="classpath:/yui/yui-tapestry.js"/>
+                <set property="tapestryPath" value=""/>
+            </construct>
+        </invoke-factory>
+    </implementation>
++-----------------------------------------------------------
+
+ * Use {{{../apidocs/org/apache/tapestry/javascript/SimpleAjaxShellDelegate.html}SimpleAjaxShellDelegate}}
+   with the {{{../components/general/shell.html}@Shell}} or the {{{../components/general/scriptincludes.html}@ScriptIncludes}}
+   components.
+    
+  
\ No newline at end of file

Copied: tapestry/tapestry4/trunk/src/site/apt/ajax/dojotips.apt (from r594033, tapestry/tapestry4/trunk/src/site/apt/ajax/index.apt)
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/apt/ajax/dojotips.apt?p2=tapestry/tapestry4/trunk/src/site/apt/ajax/dojotips.apt&p1=tapestry/tapestry4/trunk/src/site/apt/ajax/index.apt&r1=594033&r2=594718&rev=594718&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/src/site/apt/ajax/index.apt (original)
+++ tapestry/tapestry4/trunk/src/site/apt/ajax/dojotips.apt Tue Nov 13 15:42:21 2007
@@ -1,13 +1,34 @@
  ------
-Ajax/DHTML Guide - Introduction
+Ajax/DHTML Guide - Dojo Tips
  ------
-Jesse Kuhnert
+Andreas Andreou
  ------
-26 July 2006
+13 Nov 2007
  ------
  
-Introduction
+Dojo Tips
 
-  This section of the site is definitely a work in progress, but for now most people will
find
-  the {{{eventlistener.html}EventListener}} documentation particularly helpful.
+* Dojo and L10N
+
+  Dojo and its widgets support l10n and include by default localized messages for
+  the following locales:
+
++-----------------------------------------------------------
+"en-us", "de-de", "de", "en-gb", "es-es",
+"es", "fr-fr", "fr", "zh-cn", "zh-tw",
+"zh" , "it-it", "it", "ja-jp", "ja",
+"ko-kr", "ko", "pt-br", "pt", "en", "xx"
++-----------------------------------------------------------
+
+  Tapestry's {{{../apidocs/org/apache/tapestry/dojo/AjaxShellDelegate.html}AjaxShellDelegate}}
takes care of including the 
+  related setting in djConfig if the page's locale matches one of the above.
+
+  To support more locales, you'll need to:
+
+  * Add your translation of dojo messages in the classpath location /dojo-0.4.3/nls/dojo_*.js
+  
+  * Override {{{../apidocs/org/apache/tapestry/dojo/AjaxShellDelegate.html#isLocaleSupported(java.lang.String)}AjaxShellDelegate#isLocaleSupported(String)}}
to return true for the
+    newly added locale.
+    
+    
   

Modified: tapestry/tapestry4/trunk/src/site/site.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/site.xml?rev=594718&r1=594717&r2=594718&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/src/site/site.xml (original)
+++ tapestry/tapestry4/trunk/src/site/site.xml Tue Nov 13 15:42:21 2007
@@ -93,6 +93,8 @@
                 <item name="EventListener" href="/ajax/eventlistener.html" />
                 <item name="ResponseBuilder" href="/ajax/responsebuilder.html" />
                 <item name="JSON" href="/ajax/json.html" />
+                <item name="Dojo Tips" href="/ajax/dojotips.html" />
+                <item name="Beyond Dojo" href="/ajax/beyonddojo.html" />
             </item>
             
             <item name="JavaScript Reference" href="/javascript/index.html" collapse="true">



Mime
View raw message