You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by an...@apache.org on 2008/06/18 10:44:45 UTC

svn commit: r669112 - in /tapestry/tapestry4/trunk/tapestry-framework/src: java/org/apache/tapestry/javascript/JavascriptManagerImpl.java java/org/apache/tapestry/javascript/SimpleAjaxShellDelegate.java js/tapestry-4.1.5/skeleton/core.js

Author: andyhot
Date: Wed Jun 18 01:44:43 2008
New Revision: 669112

URL: http://svn.apache.org/viewvc?rev=669112&view=rev
Log:
A few more js functions needed when supporting jquery, e.t.c. Javadocs + allow extension in JavascriptManager related classes

Modified:
    tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/javascript/JavascriptManagerImpl.java
    tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/javascript/SimpleAjaxShellDelegate.java
    tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry-4.1.5/skeleton/core.js

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/javascript/JavascriptManagerImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/javascript/JavascriptManagerImpl.java?rev=669112&r1=669111&r2=669112&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/javascript/JavascriptManagerImpl.java (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/javascript/JavascriptManagerImpl.java Wed Jun 18 01:44:43 2008
@@ -129,7 +129,15 @@
         _assetSource = assetSource;
     }
 
-    private List buildAssetList(String files, String name)
+    /**
+     * Builds a {@link List} of {@link IAsset} from a comma
+     * separated input string.
+     * 
+     * @param files A comma separated string.
+     * @param name Description of assets.
+     * @return
+     */
+    protected List buildAssetList(String files, String name)
     {
         String[] js = TapestryUtils.split(files);
         
@@ -141,7 +149,14 @@
         return list;
     }
 
-    private IAsset findAsset(String path, String description)
+    /**
+     * Finds the given asset (in classpath, context, e.t.c.).
+     * 
+     * @param path
+     * @param description
+     * @return
+     */
+    protected IAsset findAsset(String path, String description)
     {
         IAsset asset = null;
         if ( !HiveMind.isBlank(path) )

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/javascript/SimpleAjaxShellDelegate.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/javascript/SimpleAjaxShellDelegate.java?rev=669112&r1=669111&r2=669112&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/javascript/SimpleAjaxShellDelegate.java (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/javascript/SimpleAjaxShellDelegate.java Wed Jun 18 01:44:43 2008
@@ -30,7 +30,7 @@
 {
     private static final String SYSTEM_NEWLINE = "\n";
 
-    private JavascriptManager _javascriptManager;
+    protected JavascriptManager _javascriptManager;
 
     public SimpleAjaxShellDelegate(JavascriptManager javascriptManager)
     {

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry-4.1.5/skeleton/core.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry-4.1.5/skeleton/core.js?rev=669112&r1=669111&r2=669112&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry-4.1.5/skeleton/core.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry-4.1.5/skeleton/core.js Wed Jun 18 01:44:43 2008
@@ -5,7 +5,11 @@
  * It should be used as a reference for building implementations
  * specific to existing javascript frameworks.  
  */
-
+ 
+// dj_undef function that checks if an object is not defined in the window scope  
+if (!window.dj_undef) window.dj_undef=function(name) {
+	return (typeof this[name] == "undefined"); }
+	
 // the two required objects, dojo and tapestry
 var dojo={
     // those methods should only be needed for the dojo implementations
@@ -53,6 +57,22 @@
      * Parameters: target, event, funcName
      */
     cleanConnect: function() {tapestry.log('t.cleanConnect', arguments);},
+    
+    /**
+     * Connects the event of the given widget with the given function of
+     * the global namespace "tapestry"
+     *
+     * Parameters: widgetId, event, funcName
+     */
+    connectWidget: function() {tapestry.log('t.connectWidget', arguments);},    
+    
+    /**
+     * Disconnects the event of the given widget from the given function of
+     * the global namespace "tapestry"
+     *
+     * Parameters: widgetId, event, funcName
+     */
+    cleanConnectWidget: function() {tapestry.log('t.cleanConnectWidget', arguments);},    
 
 	/**
 	 * Perform an XHR.