You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2010/03/05 12:00:40 UTC

svn commit: r919373 - /myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/api/jsf.js

Author: werpu
Date: Fri Mar  5 11:00:39 2010
New Revision: 919373

URL: http://svn.apache.org/viewvc?rev=919373&view=rev
Log:
https://issues.apache.org/jira/browse/MYFACES-2587

I also used the opportunity to shift the definitions of the single namespaced functions into their correct if blocks...



Modified:
    myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/api/jsf.js

Modified: myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/api/jsf.js
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/api/jsf.js?rev=919373&r1=919372&r2=919373&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/api/jsf.js (original)
+++ myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/api/jsf.js Fri Mar  5 11:00:39 2010
@@ -31,16 +31,33 @@
 //under normal circumstances this should not happen
 if ('undefined' == typeof jsf || null == jsf) {
     jsf = new Object();
-}
 
-/**
- * just to make sure no questions arise, I simply prefer here a weak
- * typeless comparison just in case some frameworks try to interfere
- * by overriding null or fiddeling around with undefined or typeof in some ways
- * it is safer in this case than the standard way of doing a strong comparison
- **/
-if ('undefined' == typeof jsf.ajax || null == jsf.ajax) {
-    jsf.ajax = new Object();
+    /*
+     * specified by the spec symbols/jsf.html#.specversion
+     * as specified left two digits major release number
+     * middle two digits minor spec release number
+     * right two digits bug release number
+     */
+    jsf.specversion = 200000;
+    /**
+     * specified by the spec symbols/jsf.html#.specversion
+     * a number increased with every implementation version
+     * and reset by moving to a new spec release number
+     *
+     * Due to the constraints that we cannot put
+     * non jsf.<namespace> references outside of functions in the api
+     * we have to set the version here instead of the impl.
+     */
+    jsf.implversion = 0;
+    
+    /**
+     * @return the current project state emitted by the server side method:
+     * javax.faces.application.Application.getProjectStage()
+     */
+    jsf.getProjectStage = function() {
+        var impl = myfaces._impl._util._Utils.getGlobalConfig("jsfAjaxImpl", myfaces.ajax);
+        return impl.getProjectStage();
+    };
 
     /**
      * collect and encode data for a given form element (must be of type form)
@@ -55,6 +72,17 @@
         var impl = myfaces._impl._util._Utils.getGlobalConfig("jsfAjaxImpl", myfaces.ajax);
         return impl.getViewState(formElement);
     };
+}
+
+/**
+ * just to make sure no questions arise, I simply prefer here a weak
+ * typeless comparison just in case some frameworks try to interfere
+ * by overriding null or fiddeling around with undefined or typeof in some ways
+ * it is safer in this case than the standard way of doing a strong comparison
+ **/
+if ('undefined' == typeof jsf.ajax || null == jsf.ajax) {
+    jsf.ajax = new Object();
+
 
     /**
      * this function has to send the ajax requests
@@ -99,14 +127,6 @@
         var impl = myfaces._impl._util._Utils.getGlobalConfig("jsfAjaxImpl", myfaces.ajax);
         return impl.response(request, context);
     };
-    /**
-     * @return the current project state emitted by the server side method:
-     * javax.faces.application.Application.getProjectStage()
-     */
-    jsf.getProjectStage = function() {
-        var impl = myfaces._impl._util._Utils.getGlobalConfig("jsfAjaxImpl", myfaces.ajax);
-        return impl.getProjectStage();
-    };
 }
 
 if ('undefined' == typeof jsf.util || null == jsf.util) {