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 2009/02/09 23:54:28 UTC

svn commit: r742780 - in /myfaces/core/branches/2_0_0/api/src/main/javascript/META-INF/resources/javax/faces: _util/_TrinidadFrameworkAdapter.js _util/_trinidad/_TrinidadFrameworkAdapter.js ajax/jsf.js

Author: werpu
Date: Mon Feb  9 22:54:28 2009
New Revision: 742780

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

forgot one file to move, also forgot to commit jsf.js, jsf.js has new factory code in place
which allows to switch between the simple transport layer and the trinidad layer depending
which system is included!


Added:
    myfaces/core/branches/2_0_0/api/src/main/javascript/META-INF/resources/javax/faces/_util/_trinidad/_TrinidadFrameworkAdapter.js   (props changed)
      - copied unchanged from r742776, myfaces/core/branches/2_0_0/api/src/main/javascript/META-INF/resources/javax/faces/_util/_TrinidadFrameworkAdapter.js
Removed:
    myfaces/core/branches/2_0_0/api/src/main/javascript/META-INF/resources/javax/faces/_util/_TrinidadFrameworkAdapter.js
Modified:
    myfaces/core/branches/2_0_0/api/src/main/javascript/META-INF/resources/javax/faces/ajax/jsf.js

Propchange: myfaces/core/branches/2_0_0/api/src/main/javascript/META-INF/resources/javax/faces/_util/_trinidad/_TrinidadFrameworkAdapter.js
------------------------------------------------------------------------------
    svn:mergeinfo = 

Modified: myfaces/core/branches/2_0_0/api/src/main/javascript/META-INF/resources/javax/faces/ajax/jsf.js
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/javascript/META-INF/resources/javax/faces/ajax/jsf.js?rev=742780&r1=742779&r2=742780&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/javascript/META-INF/resources/javax/faces/ajax/jsf.js (original)
+++ myfaces/core/branches/2_0_0/api/src/main/javascript/META-INF/resources/javax/faces/ajax/jsf.js Mon Feb  9 22:54:28 2009
@@ -61,8 +61,8 @@
 jsf.ajax._AJAX_STAGE_COMPLETE = "complete";
 jsf.ajax._AJAX_STAGE_HTTPERROR = "httpError";
 
-/*Event queues*/
-jsf.ajax._xhrAdapter = new myfaces._TrinidadFrameworkAdapter();
+/*Transports including queues and adapters!*/
+jsf.ajax._xhrAdapter = ('undefined' != typeof (myfaces._SimpleXHRFrameworkAdapter)) ? new myfaces._SimpleXHRFrameworkAdapter() :  new myfaces._TrinidadFrameworkAdapter();
 
 /**
  * external event listener queue!
@@ -121,7 +121,7 @@
     if('undefined' == typeof( element ) || null == element) {
         throw new Exception("jsf.ajax, element must be set!");
     }
-    if(!JSF2Utils.isString(element) && Node != typeof element) {
+    if(!JSF2Utils.isString(element) && !(element instanceof Node)) {
         throw new Exception("jsf.ajax, element either must be a string or a dom node");
     }