incubator-xap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmarga...@apache.org
Subject svn commit: r580994 - /incubator/xap/trunk/codebase/src/xap/data/datasource/ObjectDataSource.js
Date Mon, 01 Oct 2007 15:43:04 GMT
Author: jmargaris
Date: Mon Oct  1 08:43:03 2007
New Revision: 580994

URL: http://svn.apache.org/viewvc?rev=580994&view=rev
Log:
allow them to set null data source to roll back
to default value

Modified:
    incubator/xap/trunk/codebase/src/xap/data/datasource/ObjectDataSource.js

Modified: incubator/xap/trunk/codebase/src/xap/data/datasource/ObjectDataSource.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/data/datasource/ObjectDataSource.js?rev=580994&r1=580993&r2=580994&view=diff
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/data/datasource/ObjectDataSource.js (original)
+++ incubator/xap/trunk/codebase/src/xap/data/datasource/ObjectDataSource.js Mon Oct  1 08:43:03
2007
@@ -76,11 +76,14 @@
  * do something like 'this.employees' not just 'employees'
  */
 xap.data.datasource.ObjectDataSource.prototype.evalOnObject = function( evalText, object){
+	if (object===null){ //allows them to re-null data source
+		return null;
+	}
 	//if the text is just "this" return, this will work with strings
-	if (evalText=='this'){
+	else if (evalText==='this'){
 		return object;
 	}
-	if (!object._eval){
+	else if (!object._eval){
 		object._eval = function( text ){
 			return eval(text);
 		}



Mime
View raw message