Skip to content
Browse files

DOH mobile demo test and required data binding engine change.

  • Loading branch information...
1 parent 29a1e99 commit 7c2e614048d93f5c8496652a0b4dfe702d7a92cb @asudoh asudoh committed Feb 22, 2012
Showing with 650 additions and 202 deletions.
  1. +2 −2 EditModelRefControllerMixin.js
  2. +91 −46 Generate.js
  3. +93 −50 ListControllerMixin.js
  4. +62 −21 ModelRefControllerMixin.js
  5. +2 −2 Repeat.js
  6. +12 −43 _atBindingMixin.js
  7. +344 −0 tests/doh_mvc_mobile-demo.html
  8. +1 −0 tests/module.js
  9. +43 −38 tests/moduleFullSet.js
View
4 EditModelRefControllerMixin.js
@@ -12,7 +12,7 @@ define([
// The data serving as the data source.
this.set(this._refOriginalModelProp, this.holdModelUntilCommit ? value : this.cloneModel(value));
- this.set(this._refModelProp, this.holdModelUntilCommit ? this.cloneModel(value) : value);
+ this.set(this._refInModelProp, this.holdModelUntilCommit ? this.cloneModel(value) : value);
this._set(this._refSourceModelProp, value);
}
@@ -76,7 +76,7 @@ define([
// Send the change back to the data source.
this.set(this.holdModelUntilCommit ? this._refSourceModelProp : this._refOriginalModelProp,
- this.holdModelUntilCommit ? this.get(this._refModelProp) : this.cloneModel(this.get(this._refModelProp)));
+ this.holdModelUntilCommit ? this.get(this._refInModelProp) : this.cloneModel(this.get(this._refInModelProp)));
},
reset: function(){
View
137 Generate.js
@@ -1,10 +1,12 @@
define([
+ "dojo/_base/array",
"dojo/_base/lang",
"dojo/_base/declare",
"./_Container",
+ "./at",
"./Group",
"dijit/form/TextBox"
-], function(lang, declare, Container){
+], function(array, lang, declare, Container){
/*=====
Container = dojox.mvc._Container;
declare = dojo.declare;
@@ -39,115 +41,158 @@ define([
// The mapping of id and name to use. Set idNameMapping to override this. A count will be added to the id and name
//
_defaultIdNameMapping: {"String" : "textbox_t"},
-
+
+ // children: dojo.Stateful
+ // The array of data model that is used to render child nodes.
+ children: null,
+
+ // _relTargetProp: String
+ // The name of the property that is used by child widgets for relative data binding.
+ _relTargetProp : "children",
+
////////////////////// PRIVATE METHODS ////////////////////////
-
- _updateBinding: function(){
+
+ _setChildrenAttr: function(/*dojo.Stateful*/ value){
// summary:
- // Regenerate if the binding changes.
- this.inherited(arguments);
- this._buildContained();
+ // Handler for calls to set("children", val).
+ // description:
+ // Sets "ref" property so that child widgets can refer to, and then rebuilds the children.
+
+ var children = this.children;
+ this._set("children", value);
+ // this.binding is the resolved ref, so not matching with the new value means change in repeat target.
+ if(this.binding != value){
+ this.set("ref", value);
+ }
+ if(this._started && (!this._builtOnce || children != value)){
+ this._builtOnce = true;
+ this._buildContained(value);
+ }
},
- _buildContained: function(){
+ _buildContained: function(/*dojo.Stateful*/ children){
// summary:
// Destroy any existing generated view, recreate it from scratch
// parse the new contents.
+ // children: dojo.Stateful
+ // The array of child widgets.
// tags:
// private
+
+ if(!children){ return; }
+
this._destroyBody();
this._counter = 0;
- this.srcNodeRef.innerHTML = this._generateBody(this.get("binding"));
+ this.srcNodeRef.innerHTML = this._generateBody(children);
this._createBody();
},
- _generateBody: function(binding, hideHeading){
+ _generateBody: function(/*dojo.Stateful*/ children, /*Boolean*/ hideHeading){
// summary:
// Generate the markup for the view associated with this generate
// container.
- // binding:
- // The associated data binding to generate a view for.
- // hideHeading:
+ // children: dojo.Stateful
+ // The associated data to generate a view for.
+ // hideHeading: Boolean
// Whether the property name should be displayed as a heading.
// tags:
// private
- var body = "";
- for(var prop in binding){
- if(binding[prop] && lang.isFunction(binding[prop].toPlainObject)){
- if(binding[prop].get(0)){
- body += this._generateRepeat(binding[prop], prop);
- }else if(binding[prop].value){
+
+ if(children === void 0){ return ""; }
+
+ var body = [];
+ var isStatefulModel = lang.isFunction(children.toPlainObject);
+
+ function generateElement(value, prop){
+ if(isStatefulModel ? (value && lang.isFunction(value.toPlainObject)) : !lang.isFunction(value)){
+ if(lang.isArray(value)){
+ body.push(this._generateRepeat(value, prop));
+ }else if(isStatefulModel ? value.value : ({}.toString.call(value) != "[object Object]" && (!(value || {}).set || !(value || {}).watch))){
// TODO: Data types based widgets
- body += this._generateTextBox(prop);
+ body.push(this._generateTextBox(prop, isStatefulModel));
}else{
- body += this._generateGroup(binding[prop], prop, hideHeading);
+ body.push(this._generateGroup(value, prop, hideHeading));
+ }
+ }
+ }
+
+ if(lang.isArray(children)){
+ array.forEach(children, generateElement, this);
+ }else{
+ for(var s in children){
+ if(children.hasOwnProperty(s)){
+ generateElement.call(this, children[s], s);
}
}
}
- return body;
+
+ return body.join("");
},
- _generateRepeat: function(binding, repeatHeading){
+ _generateRepeat: function(/*dojox.mvc.StatefulArray*/ children, /*String*/ repeatHeading){
// summary:
// Generate a repeating model-bound view.
- // binding:
+ // children: dojox.mvc.StatefulArray
// The bound node (a collection/array node) to generate a
// repeating UI/view for.
- // repeatHeading:
+ // repeatHeading: String
// The heading to be used for this portion.
// tags:
// private
+
var headingClass = (this.classMapping && this.classMapping["Heading"]) ? this.classMapping["Heading"] : this._defaultClassMapping["Heading"];
- var repeat = '<div data-dojo-type="dojox.mvc.Group" data-dojo-props="ref: \'' + repeatHeading + '\'" + id="' + this.id + '_r' + this._counter++ + '">' +
- '<div class="' + headingClass + '\">' + repeatHeading + '</div>';
- repeat += this._generateBody(binding, true);
- repeat += '</div>';
- return repeat;
+ return '<div data-dojo-type="dojox.mvc.Group" data-dojo-props="target: dojox.mvc.at(\'rel:\', \'' + repeatHeading + '\')" + id="' + this.id + '_r' + this._counter++ + '">'
+ + '<div class="' + headingClass + '\">' + repeatHeading + '</div>'
+ + this._generateBody(children, true)
+ + '</div>';
},
- _generateGroup: function(binding, groupHeading, hideHeading){
+ _generateGroup: function(/*dojo.Stateful*/ model, /*String*/ groupHeading, /*Boolean*/ hideHeading){
// summary:
// Generate a hierarchical model-bound view.
- // binding:
- // The bound (intermediate) node to generate a hierarchical
- // view portion for.
- // groupHeading:
+ // model: dojo.Stateful
+ // The bound (intermediate) model to generate a hierarchical view portion for.
+ // groupHeading: String
// The heading to be used for this portion.
- // hideHeading:
+ // hideHeading: Boolean
// Whether the heading should be hidden for this portion.
// tags:
// private
- var group = '<div data-dojo-type="dojox.mvc.Group" data-dojo-props="ref: \'' + groupHeading + '\'" + id="' + this.id + '_g' + this._counter++ + '">';
+
+ var html = ['<div data-dojo-type="dojox.mvc.Group" data-dojo-props="target: dojox.mvc.at(\'rel:\', \'' + groupHeading + '\')" + id="' + this.id + '_g' + this._counter++ + '">'];
if(!hideHeading){
var headingClass = (this.classMapping && this.classMapping["Heading"]) ? this.classMapping["Heading"] : this._defaultClassMapping["Heading"];
- group += '<div class="' + headingClass + '\">' + groupHeading + '</div>';
+ html.push('<div class="' + headingClass + '\">' + groupHeading + '</div>');
}
- group += this._generateBody(binding);
- group += '</div>';
- return group;
+ html.push(this._generateBody(model) + '</div>');
+ return html.join("");
},
- _generateTextBox: function(prop){
+ _generateTextBox: function(/*String*/ prop, /*Boolean*/ referToValue){
// summary:
// Produce a widget for a simple value.
- // prop:
+ // prop: String
// The data model property name.
+ // referToValue: Boolean
+ // True if the property is dojox.mvc.StatefulModel with "value" attribute.
// tags:
// private
// TODO: Data type based widget generation / enhanced meta-data
+
var idname = this.idNameMapping ? this.idNameMapping["String"] : this._defaultIdNameMapping["String"];
idname = idname + this._counter++;
var widClass = this.widgetMapping ? this.widgetMapping["String"] : this._defaultWidgetMapping["String"];
var labelClass = (this.classMapping && this.classMapping["Label"]) ? this.classMapping["Label"] : this._defaultClassMapping["Label"];
var stringClass = (this.classMapping && this.classMapping["String"]) ? this.classMapping["String"] : this._defaultClassMapping["String"];
var rowClass = (this.classMapping && this.classMapping["Row"]) ? this.classMapping["Row"] : this._defaultClassMapping["Row"];
-
+ var bindingSyntax = 'value: dojox.mvc.at(\'rel:' + (referToValue && prop || '') + '\', \'' + (referToValue ? 'value' : prop) + '\')';
+
return '<div class="' + rowClass + '\">' +
'<label class="' + labelClass + '\">' + prop + ':</label>' +
- '<input class="' + stringClass + '\" data-dojo-type="' + widClass + '\" data-dojo-props="name: \'' + idname + "', ref: '" + prop + '\'" id="' +
- idname + '\"></input>' +
+ '<input class="' + stringClass + '\" data-dojo-type="' + widClass + '\"' +
+ ' data-dojo-props="name: \'' + idname + '\', ' + bindingSyntax + '" id="' + idname + '\"></input>' +
'</div>';
}
});
View
143 ListControllerMixin.js
@@ -1,39 +1,58 @@
define([
"dojo/_base/array",
+ "dojo/_base/lang",
"dojo/_base/declare",
"./ModelRefControllerMixin"
-], function(darray, declare, ModelRefControllerMixin){
- function setRefListModel(/*dojox.mvc.StatefulArray*/ value){
+], function(array, lang, declare, ModelRefControllerMixin){
+ function unwatchHandles(/*dojox.mvc.ListControllerMixin*/ c){
+ // summary:
+ // Unwatch model watch handles.
+
+ for(var s in {"_listModelWatchHandle": 1, "_tableModelWatchHandle": 1}){
+ if(c[s]){
+ c[s].unwatch();
+ c[s] = null;
+ }
+ }
+ }
+
+ function setRefInModel(/*dojox.mvc.StatefulArray*/ value){
// summary:
// A function called when this controller gets newer value as the list data.
// value: Anything
// The data serving as the list data.
- if(this._listModelWatchHandle){
- this._listModelWatchHandle.unwatch();
- this._listModelWatchHandle = null;
- }
+ unwatchHandles(this);
var _self = this;
if(value){
- this._listModelWatchHandle = value.watchElements(function(idx, removals, adds){
- if(removals && adds){
- var curIdx = _self.get("cursorIndex");
- // If selected element is removed, make "no selection" state
- if(removals && curIdx >= idx && curIdx < idx + removals.length){
- _self.set("cursorIndex", -1);
- return;
+ if(value.watchElements){
+ this._listModelWatchHandle = value.watchElements(function(idx, removals, adds){
+ if(removals && adds){
+ var curIdx = _self.get("cursorIndex");
+ // If selected element is removed, make "no selection" state
+ if(removals && curIdx >= idx && curIdx < idx + removals.length){
+ _self.set("cursorIndex", -1);
+ return;
+ }
+ // If selected element is equal to or larger than the removals/adds point, update the selected index
+ if((removals.length || adds.length) && curIdx >= idx){
+ _self.set("cursor", _self.get("cursor"));
+ }
+ }else{
+ // If there is a update to the whole array, update the selected index
+ _self.set("cursor", _self.get("cursor"));
}
- // If selected element is equal to or larger than the removals/adds point, update the selected index
- if((removals.length || adds.length) && curIdx >= idx){
- _self.set("cursor", this.get("cursor"));
+ });
+ }else{
+ if(_self.get("cursorIndex") < 0){ _self._set("cursorIndex", ""); }
+ this._tableModelWatchHandle = value.watch(function(name, old, current){
+ if(old !== current && name == _self.get("cursorIndex")){
+ _self.set("cursor", current);
}
- }else{
- // If there is a update to the whole array, update the selected index
- _self.set("cursor", _self.get("cursor"));
- }
- });
+ });
+ }
}
- this._set(this._refListModelProp, value);
+ this._set(this._refInModelProp, value);
this._setCursorIndexAttr(this.cursorIndex);
}
@@ -50,8 +69,8 @@ define([
// The ID of the selected element in the model array.
cursorId: null,
- // cursorIndex: Number
- // The index of the selected element in the model array.
+ // cursorIndex: Number|String
+ // The index of the selected element in the model.
cursorIndex: -1,
// cursor: dojo.Stateful
@@ -63,31 +82,28 @@ define([
model: null,
// _listModelWatchHandle: Object
- // The watch handle of model.
+ // The watch handle of model, watching for array elements.
_listModelWatchHandle: null,
- // _refListModelProp: String
- // The property name for the data model of the list.
- _refListModelProp: "model",
+ // _tableModelWatchHandle: Object
+ // The watch handle of model.
+ _tableModelWatchHandle: null,
// _refModelProp: String
// The property name for the data model.
_refModelProp: "cursor",
postscript: function(/*Object?*/ params, /*DomNode|String?*/ srcNodeRef){
// summary:
- // Sets the setter for _refListModelProp.
+ // Sets the setter for _refInModelProp.
- var setterName = "_set" + this._refListModelProp.replace(/^[a-z]/, function(c){ return c.toUpperCase(); }) + "Attr";
- this[setterName] = setRefListModel;
+ var setterName = "_set" + this._refInModelProp.replace(/^[a-z]/, function(c){ return c.toUpperCase(); }) + "Attr";
+ this[setterName] = setRefInModel;
this.inherited(arguments);
},
destroy: function(){
- if(this._listModelWatchHandle){
- this._listModelWatchHandle.unwatch();
- this._listModelWatchHandle = null;
- }
+ unwatchHandles(this);
this.inherited(arguments);
},
@@ -97,14 +113,25 @@ define([
// description:
// Finds the index associated with the given cursor ID, and updates cursorIndex property.
- if(!this[this._refListModelProp]){ return; }
- for(var i = 0; i < this[this._refListModelProp].length; i++){
- if(this[this._refListModelProp][i][this.idProperty] == value){
- this.set("cursorIndex", i);
- return;
+ var model = this[this._refInModelProp];
+ if(!model){ return; }
+ if(lang.isArray(model)){
+ for(var i = 0; i < model.length; i++){
+ if(model[i][this.idProperty] == value){
+ this.set("cursorIndex", i);
+ return;
+ }
+ }
+ this._set("cursorIndex", -1);
+ }else{
+ for(var s in model){
+ if(model[s][this.idProperty] == value){
+ this.set("cursorIndex", s);
+ return;
+ }
}
+ this._set("cursorIndex", "");
}
- this._set("cursorIndex", -1);
},
_setCursorIndexAttr: function(/*Number*/ value){
@@ -114,9 +141,9 @@ define([
// Updates cursor, cursorId, cursorIndex properties internally and call watch callbacks for them.
this._set("cursorIndex", value);
- if(!this[this._refListModelProp]){ return; }
- this._set("cursor", this[this._refListModelProp][value]);
- this._set("cursorId", this[this._refListModelProp][value] && this[this._refListModelProp][value][this.idProperty]);
+ if(!this[this._refInModelProp]){ return; }
+ this._set("cursor", this[this._refInModelProp][value]);
+ this._set("cursorId", this[this._refInModelProp][value] && this[this._refInModelProp][value][this.idProperty]);
},
_setCursorAttr: function(/*dojo.Stateful*/ value){
@@ -125,15 +152,31 @@ define([
// description:
// Finds the index associated with the given element, and updates cursorIndex property.
- var foundIdx = darray.indexOf(this[this._refListModelProp], value);
- if(foundIdx < 0){
- var targetIdx = this.get("cursorIndex");
- if(targetIdx >= 0 && targetIdx < this[this._refListModelProp].length){
- this[this._refListModelProp].set(targetIdx, value);
+ var model = this[this._refInModelProp];
+ if(!model){ return; }
+ if(lang.isArray(model)){
+ var foundIdx = array.indexOf(model, value);
+ if(foundIdx < 0){
+ var targetIdx = this.get("cursorIndex");
+ if(targetIdx >= 0 && targetIdx < model.length){
+ model.set(targetIdx, value);
+ }
+ }else{
+ this.set("cursorIndex", foundIdx);
}
}else{
- this.set("cursorIndex", foundIdx);
+ for(var s in model){
+ if(model[s] == value){
+ this.set("cursorIndex", s);
+ return;
+ }
+ }
+ var targetIdx = this.get("cursorIndex");
+ if(targetIdx){
+ model.set(targetIdx, value);
+ }
}
+
}
});
});
View
83 ModelRefControllerMixin.js
@@ -1,8 +1,9 @@
define([
+ "dojo/_base/array",
"dojo/_base/declare",
"dojo/_base/lang",
"dojo/Stateful"
-], function(declare, lang, Stateful){
+], function(array, declare, lang, Stateful){
return declare("dojox.mvc.ModelRefControllerMixin", null, {
// summary:
// A controller, used as a mixin to dojox.mvc._Controller or dijit._WidgetBase descendants, working with a data model as a reference.
@@ -17,6 +18,11 @@ define([
// The property name for the data model.
_refModelProp: "model",
+ // _refInModelProp: String
+ // The property name for the data model, used as the input.
+ // Used when this controller needs data model (as input) that is different from the data model this controller provides.
+ _refInModelProp: "model",
+
// model: dojo.Stateful
// The data model.
model: null,
@@ -78,30 +84,65 @@ define([
var hm = null, hp = null;
- function watchModel(old, current){
+ function watchPropertiesInModel(/*dojo.Stateful*/ model){
+ // summary:
+ // Watch properties in referred model.
+ // model: dojo.Stateful
+ // The model to watch for.
+
+ // Unwatch properties of older model.
if(hp){ hp.unwatch(); }
- if(old){
- var props = {};
- if(!name){
- var oldProps = old.get("properties");
- if(oldProps){ array.forEach(oldProps, function(item){ if(this.hasControllerProperty(item)){ props[item] = 1; } }); }
- else{ for(var s in old){ if(old.hasOwnProperty(s) && this.hasControllerProperty(s)){ props[s] = 1; } } }
- var currentProps = current && current.get("properties");
- if(currentProps){ array.forEach(currentProps, function(item){ if(this.hasControllerProperty(item)){ props[item] = 1; } }); }
- else{ for(var s in current){ if(current.hasOwnProperty(s) && this.hasControllerProperty(s)){ props[s] = 1; } } }
- }else{
- props[name] = 1;
- }
- for(var s in props){
- callback(s, old.get ? old.get(s) : old[s], current && (current.get ? current.get(s) : current[s]));
- }
+ // Watch properties of newer model.
+ if(model && lang.isFunction(model.set) && lang.isFunction(model.watch)){
+ hp = model.watch.apply(model, (name ? [name] : []).concat([function(name, old, current){ callback(name, old, current); }]));
+ }
+ }
+
+ function reflectChangeInModel(/*dojo.Stateful*/ old, /*dojo.Stateful*/ current){
+ // summary:
+ // Upon change in model, detect change in properties, and call watch callbacks.
+ // old: dojo.Stateful
+ // The older model.
+ // current: dojo.Stateful
+ // The newer model.
+
+ // Gather list of properties to notify change in value as model changes.
+ var props = {};
+ if(!name){
+ // If all properties are being watched, find out all properties from older model as well as from newer model.
+ array.forEach([old, current], function(model){
+ var props = model && model.get("properties");
+ if(props){
+ // If the model explicitly specifies the list of properties, use it.
+ array.forEach(props, function(item){
+ if(this.hasControllerProperty(item)){ props[item] = 1; }
+ });
+ }else{
+ // Otherwise, iterate through own properties.
+ for(var s in model){
+ if(model.hasOwnProperty(s) && this.hasControllerProperty(s)){ props[s] = 1; }
+ }
+ }
+ });
+ }else{
+ props[name] = 1;
+ }
+
+ // Call watch callbacks for properties.
+ for(var s in props){
+ callback(s, old && (old.get ? old.get(s) : old[s]), current && (current.get ? current.get(s) : current[s]));
}
- var args = (name ? [name] : []).concat([function(name, old, current){ callback(name, old, current); }]);
- hp = current && lang.isFunction(current.set) && lang.isFunction(current.watch) && current.watch.apply(current, args);
}
- hm = Stateful.prototype.watch.call(this, this._refModelProp, function(name, old, current){ if(old !== current){ watchModel(old, current); } });
- watchModel(null, this[this._refModelProp]);
+ // Watch for change in model.
+ hm = Stateful.prototype.watch.call(this, this._refModelProp, function(name, old, current){
+ if(old === current){ return; }
+ reflectChangeInModel(old, current);
+ watchPropertiesInModel(current);
+ });
+
+ // Watch for properties in model.
+ watchPropertiesInModel(this.get(this._refModelProp));
return {
unwatch: function(){
View
4 Repeat.js
@@ -126,11 +126,11 @@ define([
}
},
- _buildContained: function(/*dojo.Stateful*/ children){
+ _buildContained: function(/*dojox.mvc.StatefulArray*/ children){
// summary:
// Destroy any existing contained view, recreate the repeating UI
// markup and parse the new contents.
- // children: dojo.Stateful
+ // children: dojox.mvc.StatefulArray
// The array of child widgets.
// tags:
// private
View
55 _atBindingMixin.js
@@ -56,10 +56,8 @@ define([
var _handles = {}, parent = getParent(source), relTargetProp = parent && parent._relTargetProp || "target";
function resolveAndBind(){
- for(var s in {Two: 1, refTargetModel: 1, refSourceModel: 1}){
- _handles[s] && _handles[s].unwatch();
- delete _handles[s];
- }
+ _handles["Two"] && _handles["Two"].unwatch();
+ delete _handles["Two"];
var relTarget = parent && (lang.isFunction(parent.get) ? parent.get(relTargetProp) : parent[relTargetProp]),
resolvedTarget = resolve(target, relTarget),
@@ -73,46 +71,17 @@ define([
return;
}
- function bindResolved(){
- _handles["Two"] && _handles["Two"].unwatch();
- delete _handles["Two"];
- if(targetProp == null){
- // If target property is not specified, it means this handle is just for resolving data binding target.
- // (For dojox.mvc.Group and dojox.mvc.Repeat)
- // Do not perform data binding synchronization in such case.
- lang.isFunction(resolvedSource.set) ? resolvedSource.set(sourceProp, resolvedTarget) : resolvedSource[sourceProp] = resolvedTarget;
- if(dojox.debugDataBinding){
- console.log("dojox.mvc._atBindingMixin set " + resolvedTarget + " to: " + getLogContent(resolvedSource, sourceProp));
- }
- }else{
- // Start data binding
- _handles["Two"] = BindTwo(resolvedTarget, targetProp, resolvedSource, sourceProp, options); // dojox.mvc.BindTwo.handle
- }
- }
-
- bindResolved();
-
- var map = {
- refTargetModel: {
- resolved: resolvedTarget,
- prop: targetProp
- },
- refSourceModel: {
- resolved: resolvedSource,
- prop: sourceProp
- }
- }
-
- for(var s in map){
- var resolved = map[s].resolved, refModelProp = resolved && resolved._refModelProp;
- if(refModelProp && resolved.hasControllerProperty && (map[s].prop == "*" || !resolved.hasControllerProperty(map[s].prop))){
- _handles[s] = resolved.watch(refModelProp, function(name, old, current){
- if(old !== current){
- if(dojox.debugDataBinding){ console.log("Change in referenced model of: " + (resolved._setIdAttr || !resolved.declaredClass ? resolved : resolved.declaredClass)); }
- resolveAndBind();
- }
- });
+ if(targetProp == null){
+ // If target property is not specified, it means this handle is just for resolving data binding target.
+ // (For dojox.mvc.Group and dojox.mvc.Repeat)
+ // Do not perform data binding synchronization in such case.
+ lang.isFunction(resolvedSource.set) ? resolvedSource.set(sourceProp, resolvedTarget) : (resolvedSource[sourceProp] = resolvedTarget);
+ if(dojox.debugDataBinding){
+ console.log("dojox.mvc._atBindingMixin set " + resolvedTarget + " to: " + getLogContent(resolvedSource, sourceProp));
}
+ }else{
+ // Start data binding
+ _handles["Two"] = BindTwo(resolvedTarget, targetProp, resolvedSource, sourceProp, options); // dojox.mvc.BindTwo.handle
}
}
View
344 tests/doh_mvc_mobile-demo.html
@@ -0,0 +1,344 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+ <title>DOH MVC Mobile Demo Test</title>
+ <link rel="stylesheet" type="text/css" href="./regression/mobile/demo/demo.css"/>
+ <style>
+ html, body{
+ height: 100%;
+ overflow: hidden;
+ position: relative;
+ }
+ .mblEdgeToEdgeList {
+ background-color: #DBDDE2;
+ }
+ </style>
+ <script type="text/javascript" djConfig="parseOnLoad:0,isDebug:1,async:1" src="../../../dojo/dojo.js"></script>
+ <script type="text/javascript">
+ var ctrl, listCtrl;
+ var updateView, updateModel;
+
+ require([
+ "doh/runner",
+ "dojo/_base/declare",
+ "dojo/_base/json",
+ "dojo/_base/Deferred",
+ "dojo/dom",
+ "dojo/store/JsonRest",
+ "dojo/store/Memory",
+ "dijit/registry",
+ "dojox/mobile/parser",
+ "dojox/mvc/getPlainValue",
+ "dojox/mvc/getStateful",
+ "dojox/mvc/EditModelRefController",
+ "dojox/mvc/ListController",
+ "dojox/mvc/StoreRefController",
+ "dojox/mvc/at",
+ "dojox/mobile",
+ "dojox/mobile/compat",
+ "dojox/mobile/ScrollableView",
+ "dojox/mobile/Button",
+ "dojox/mobile/TextArea",
+ "dojox/mobile/TextBox",
+ "dojox/mobile/ViewController",
+ "dojox/mobile/FixedSplitter",
+ "dojox/mobile/EdgeToEdgeList",
+ "dojox/mobile/EdgeToEdgeCategory",
+ "dojox/mobile/deviceTheme",
+ "dojox/mobile/RoundRectCategory",
+ "dojox/mobile/Heading",
+ "dojox/mvc/Group",
+ "dojox/mvc/Generate",
+ "dojox/mvc/Repeat",
+ "dojo/domReady!"
+ ], function(doh, declare, djson, Deferred, ddom, JsonRest, Memory, registry, parser, getPlainValue, getStateful, EditModelRefController, ListController, StoreRefController){
+ dojox.debugDataBinding = true;
+
+ ctrlClass = declare([EditModelRefController, ListController], {});
+ ctrl = new ctrlClass({sourceModel: getStateful({
+ Serial: "360324",
+ First: "John",
+ Last: "Doe",
+ Email: "jdoe@us.ibm.com",
+ ShipTo: {
+ Street: "123 Valley Rd",
+ City: "Katonah",
+ State: "NY",
+ Zip: "10536"
+ },
+ BillTo: {
+ Street: "17 Skyline Dr",
+ City: "Hawthorne",
+ State: "NY",
+ Zip: "10532"
+ }
+ })});
+ ctrl.set("cursorIndex", "ShipTo");
+
+ // used in the Generate View demo
+ var genmodel;
+ updateView = function() {
+ try {
+ genmodel = getStateful(djson.fromJson(ddom.byId("modelArea").value));
+ registry.byId("view").set("children", genmodel);
+ ddom.byId("outerModelArea").style.display = "none";
+ ddom.byId("viewArea").style.display = "";
+ }catch(err){
+ console.error("Error parsing json from model: "+err);
+ }
+ };
+
+ // used in the Generate View demo
+ updateModel = function() {
+ ddom.byId("outerModelArea").style.display = "";
+ try {
+ ddom.byId("modelArea").focus(); // hack: do this to force focus off of the textbox, bug on mobile?
+ ddom.byId("viewArea").style.display = "none";
+ registry.byId("modelArea").set("value", djson.toJson(getPlainValue(genmodel), true));
+ } catch(e) {
+ console.log(e);
+ };
+ };
+
+ var listCtrlClass = declare([StoreRefController, EditModelRefController, ListController], {
+ addEmpty: function(){
+ var modelToInsert = getStateful({
+ First: "",
+ Last: "",
+ Location: "CA",
+ Office: "",
+ Email: "",
+ Tel: "",
+ Fax: ""
+ });
+ this.model.push(modelToInsert);
+ this.set("cursor", modelToInsert);
+ }
+ });
+
+ listCtrl = new listCtrlClass({cursorIndex: 0});
+
+ parser.parse();
+ ddom.byId("wholepage").style.display = "";
+
+ Deferred.when((new JsonRest({target: require.toUrl("dojox/mvc/tests/regression/_data/mvcRepeatData.json")})).query({}), function(results){
+ listCtrl.set("store", new Memory({data: results.items}));
+ Deferred.when(listCtrl.queryStore({Location: "CA"}), function(results){
+ doh.register("Ship to - Bill to Address page", [{
+ name: "Initial",
+ runTest: function(){
+ registry.byId("settings").show();
+ doh.is("360324", registry.byId("serialInput").get("value"), "Order# should be set");
+ doh.is("123 Valley Rd", registry.byId("streetInput").get("value"), "Street should be set of Ship To");
+ }
+ }, {
+ name: "TestBillTo",
+ runTest : function(){
+ ctrl.set("cursorIndex", "BillTo");
+ doh.is("17 Skyline Dr", registry.byId("streetInput").get("value"), "Street should be set of Bill To");
+ }
+ }, {
+ name: "TestReset",
+ runTest: function(){
+ var addr1 = registry.byId("streetInput");
+ addr1.set("value", "Foo");
+ doh.is("Foo", ctrl.get("Street"), "Street should be Foo");
+ ctrl.reset();
+ doh.is("17 Skyline Dr", addr1.get("value"), "Street should be set back to of Bill To");
+ }
+ }]);
+
+ doh.register("Repeat Data Binding Example page", [{
+ name: "Initial",
+ runTest: function(){
+ registry.byId("repeat").show();
+ doh.is("Chad", registry.byId("nameInput0").get("value"), "nameInput0 should be Chad");
+ doh.is("Hunter", registry.byId("nameInput1").get("value"), "nameInput1 should be Hunter");
+ doh.is("John", registry.byId("nameInput2").get("value"), "nameInput2 should be John");
+ }
+ }, {
+ name: "ChangeCursor",
+ runTest: function(){
+ listCtrl.set("cursorIndex", 1);
+ doh.is("Hunter", registry.byId("firstnameInputDetail").get("value"), "firstnameInputDetail should be Hunter");
+ }
+ }, {
+ name : "ResetAll",
+ runTest : function(){
+ var first = registry.byId("firstnameInputDetail");
+ first.set("value", "Foo");
+ doh.is("Foo", listCtrl.get("First"), "First should be Foo");
+ listCtrl.reset();
+ doh.is("Hunter", registry.byId("firstnameInputDetail").get("value"), "firstnameInputDetail should be Hunter");
+ }
+ }]);
+
+ doh.register("Simple Form Generate Example page", [{
+ name: "Initial",
+ runTest: function(){
+ registry.byId("generate").show();
+ updateView();
+ var tb0 = registry.byId("TB0");
+ doh.is("11111", tb0 && tb0.get("value"), "Serial should be 11111");
+ var tb6 = registry.byId("TB6");
+ doh.is("111-111-1111", tb6 && tb6.get("value"), "Office should be 111-111-1111");
+ tb6.set("value", "333-333-3333");
+ updateModel();
+ doh.t(ddom.byId("modelArea").value.indexOf("\"Office\": \"333-333-3333\""), "Model should be updated with newer Office phone number");
+ }
+ }]);
+
+ doh.run();
+ });
+ });
+ }); // end function
+ </script>
+ </head>
+ <body>
+ <div id="wholepage" style="display:none">
+ <div id="foo" data-dojo-type="dojox.mobile.View" selected="true">
+ <h1 data-dojo-type="dojox.mobile.Heading">Mobile MVC Demo</h1>
+ <h2 data-dojo-type="dojox.mobile.RoundRectCategory">Mobile MVC Views</h2>
+ <ul data-dojo-type="dojox.mobile.RoundRectList">
+ <li id="sdb" data-dojo-type="dojox.mobile.ListItem" icon="./regression/mobile/demo/images/i-icon-1.png" transition="slide" moveTo="settings">
+ Simple Data Binding
+ </li>
+ <li id="rdb" data-dojo-type="dojox.mobile.ListItem" icon="./regression/mobile/demo/images/i-icon-2.png" transition="slide" moveTo="repeat">
+ Repeat Data Binding
+ </li>
+ <li id="sfg" data-dojo-type="dojox.mobile.ListItem" icon="./regression/mobile/demo/images/i-icon-3.png" transition="slide" moveTo="generate">
+ Simple Form Generate
+ </li>
+ </ul>
+ </div>
+ <div id="settings" data-dojo-type="dojox.mobile.ScrollableView">
+ <h1 id="home" data-dojo-type="dojox.mobile.Heading" back="Home" moveTo="foo">Data Binding Example</h1>
+ <form name="testForm" id="testForm">
+ <div class="field-title">Ship to - Bill to Address</div>
+ <div class="fieldset" data-dojo-type="dojox.mvc.Group" data-dojo-props="target: dojox.mvc.at(ctrl, 'model')">
+ <div class="field-row">
+ <span>Order #</span>
+ <input id="serialInput" placeholder="Order #" data-dojo-type="dojox.mobile.TextBox" data-dojo-props="value: dojox.mvc.at('rel:', 'Serial')" />
+ </div>
+ <div class="field-row">
+ <span>Last</span>
+ <input placeholder="Last" data-dojo-type="dojox.mobile.TextBox" data-dojo-props="value: dojox.mvc.at('rel:', 'Last')" />
+ </div>
+ <div class="field-row">
+ <span>Email</span>
+ <input placeholder="Last" data-dojo-type="dojox.mobile.TextBox" data-dojo-props="value: dojox.mvc.at('rel:', 'Email')" />
+ </div>
+ </div>
+ <div class="spacer"></div>
+ <button id="shipto" type="button" data-dojo-type="dojox.mobile.Button" class="mblBlueButton" onclick="ctrl.set('cursorIndex', 'ShipTo');">Ship To</button>
+ <button id="billto" type="button" data-dojo-type="dojox.mobile.Button" class="mblBlueButton" onclick="ctrl.set('cursorIndex', 'BillTo');">Bill To</button>
+ <br/>
+ <div class="fieldset" id="addrGroup" data-dojo-type="dojox.mvc.Group" data-dojo-props="target: dojox.mvc.at(ctrl, 'cursor')">
+ <div class="field-row">
+ <span>Street</span>
+ <input id="streetInput" placeholder="Street" data-dojo-type="dojox.mobile.TextBox" data-dojo-props="value: dojox.mvc.at('rel:', 'Street')" />
+ </div>
+ <div class="field-row">
+ <span>City</span>
+ <input placeholder="City" data-dojo-type="dojox.mobile.TextBox" data-dojo-props="value: dojox.mvc.at('rel:', 'City')" />
+ </div>
+ <div class="field-row">
+ <span>State</span>
+ <input placeholder="State" data-dojo-type="dojox.mobile.TextBox" data-dojo-props="value: dojox.mvc.at('rel:', 'State')" />
+ </div>
+ <div class="field-row">
+ <span>ZIP Code</span>
+ <input placeholder="ZIP Code" data-dojo-type="dojox.mobile.TextBox" data-dojo-props="value: dojox.mvc.at('rel:', 'Zip')" />
+ </div>
+ </div>
+ <div class="spacer"></div>
+ <button id="reset1" type="button" data-dojo-type="dojox.mobile.Button" class="mblBlueButton" onclick="ctrl.reset()">Reset</button>
+ </form>
+ </div>
+ <div id="repeat" data-dojo-type="dojox.mobile.ScrollableView">
+ <h1 data-dojo-type="dojox.mobile.Heading" back="Home" moveTo="foo">Repeat Data Binding Example</h1>
+ <form name="repeatTestForm" id="repeatTestForm">
+ <div class="field-title">Search Results</div>
+ <div class="fieldset" class="row" data-dojo-type="dojox.mvc.Repeat" data-dojo-props="children: dojox.mvc.at(listCtrl, 'model')">
+ <div data-dojo-type="dojox.mvc.Group" data-dojo-props="target: dojox.mvc.at('rel:', '${this.index}')">
+ <div class="row">
+ <input id="nameInput${this.index}" placeHolder="First Name" data-dojo-type="dojox.mobile.TextBox" data-dojo-props="value: dojox.mvc.at('rel:', 'First')" />
+ <button id="details${this.index}" type="button" data-dojo-type="dojox.mobile.Button" class="mblBlueButton" onclick="listCtrl.set('cursorIndex', '${this.index}')">Details</button>
+ </div>
+ </div>
+ </div>
+ <div class="spacer"></div>
+ <div id="detailsBanner">Details for selected index:</div>
+ <div class="fieldset" id="detailsGroup" data-dojo-type="dojox.mvc.Group" data-dojo-props="target: dojox.mvc.at(listCtrl, 'cursor')">
+ <div class="field-row">
+ <span>First Name</span>
+ <input id="firstnameInputDetail" placeholder="First Name" data-dojo-type="dojox.mobile.TextBox" data-dojo-props="value: dojox.mvc.at('rel:', 'First')" />
+ </div>
+ <div class="field-row">
+ <span>Last Name</span>
+ <input placeholder="Last Name" data-dojo-type="dojox.mobile.TextBox" data-dojo-props="value: dojox.mvc.at('rel:', 'Last') "/>
+ </div>
+ <div class="field-row">
+ <span>Email</span>
+ <input placeholder="Email" data-dojo-type="dojox.mobile.TextBox" data-dojo-props="value: dojox.mvc.at('rel:', 'Email')" />
+ </div>
+ <div class="field-row">
+ <span>Telephone</span>
+ <input placeholder="Telephone" data-dojo-type="dojox.mobile.TextBox" data-dojo-props="value: dojox.mvc.at('rel:', 'Tel')" />
+ </div>
+ </div>
+ <div class="spacer"></div>
+ <button id="add" type="button" data-dojo-type="dojox.mobile.Button" class="mblBlueButton" onclick="listCtrl.addEmpty();">Add</button>
+ <button id="save" type="button" data-dojo-type="dojox.mobile.Button" class="mblBlueButton" onclick="listCtrl.commit();">Save</button>
+ <button id="reset2" type="button" data-dojo-type="dojox.mobile.Button" class="mblBlueButton" onclick="listCtrl.reset();">Reset</button>
+ </form>
+ </div>
+ <div id="generate" data-dojo-type="dojox.mobile.ScrollableView">
+ <h1 data-dojo-type="dojox.mobile.Heading" back="Home" moveTo="foo">Simple Form Generate Example</h1>
+ <div class="field-title"></div>
+ <div id="main">
+ <div id="leftNav"></div>
+ <div id="mainContent" class="generate-maincontent">
+ <div id="outerModelArea">
+ <h3 data-dojo-type="dojox.mobile.RoundRectCategory">Model</h3>
+ <div class="generate-textarea-row">
+ <textarea class="generate-textarea-cell" data-dojo-type="dojox.mobile.TextArea" id="modelArea">
+{
+ "Serial": "11111",
+ "First": "John",
+ "Last": "Doe",
+ "Email": "jdoe@example.com",
+ "Phones": [
+ {
+ "Office": "111-111-1111"
+ },
+ {
+ "Mobile": "222-222-2222"
+ }
+ ]
+}
+ </textarea>
+ </div>
+ <div class="fieldset">
+ <div class="spacer"></div>
+ <button id="generate1" type="button" data-dojo-type="dojox.mobile.Button" class="mblBlueButton" onclick="updateView()">Generate Form</button>
+ </div>
+ </div>
+ <div id="viewArea" style="display:none">
+ <h3 data-dojo-type="dojox.mobile.RoundRectCategory">Generated View</h3>
+ <div class="fieldset">
+ <div id="view" data-dojo-type="dojox.mvc.Generate" data-dojo-props="widgetMapping: {'String': 'dojox.mobile.TextBox'}, idNameMapping: {'String' : 'TB'}"></div>
+ </div>
+ <div class="fieldset">
+ <div class="spacer"></div>
+ <button id="updateModel" type="button" data-dojo-type="dojox.mobile.Button" class="mblBlueButton" onclick="updateModel()">Update Model</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
View
1 tests/module.js
@@ -8,6 +8,7 @@ define(["doh/runner"], function(doh){
doh.registerUrl("dojox.mvc.tests.doh_mvc_search-results-repeat", require.toUrl("dojox/mvc/tests/doh_mvc_search-results-repeat.html" + userArgs), 999999);
doh.registerUrl("dojox.mvc.tests.doh_new-mvc_input-output-simple", require.toUrl("dojox/mvc/tests/doh_new-mvc_input-output-simple.html" + userArgs), 999999);
doh.registerUrl("dojox.mvc.tests.doh_new-mvc_label_and_totals", require.toUrl("dojox/mvc/tests/doh_new-mvc_label_and_totals.html" + userArgs), 999999);
+ doh.registerUrl("dojox.mvc.tests.doh_mvc_mobile-demo", require.toUrl("dojox/mvc/tests/doh_mvc_mobile-demo.html" + userArgs), 999999);
// Robot
doh.registerUrl("dojox.mvc.tests.regression.robot.mvc_loan-stateful", require.toUrl("dojox/mvc/tests/regression/robot/mvc_loan-stateful.html" + userArgs), 999999);
}catch(e){
View
81 tests/moduleFullSet.js
@@ -1,39 +1,44 @@
-dojo.provide("dojox.mvc.tests.module");
+define(["doh/runner"], function(doh){
+ try{
+ var userArgs = window.location.search.replace(/[\?&](dojoUrl|testUrl|testModule)=[^&]*/g, "").replace(/^&/, "?");
-try{
- var userArgs = window.location.search.replace(/[\?&](dojoUrl|testUrl|testModule)=[^&]*/g,"").replace(/^&/,"?");
- // DOH
- doh.registerUrl("dojox.mvc.tests.doh_mvc_new_shipto-billto-simple", dojo.moduleUrl("dojox.mvc","tests/doh_mvc_new_shipto-billto-simple.html"+userArgs), 999999);
- doh.registerUrl("dojox.mvc.tests.doh_mvc_new_ref-set-repeat", dojo.moduleUrl("dojox.mvc","tests/doh_mvc_new_ref-set-repeat.html"+userArgs), 999999);
- doh.registerUrl("dojox.mvc.tests.multiattrib.doh_mvc_test_Toolbar", dojo.moduleUrl("dojox.mvc","tests/multiattrib/doh_mvc_test_Toolbar.html"+userArgs), 999999);
- // Robot
- doh.registerUrl("dojox.mvc.tests.regression.robot.mvc_loan-stateful", dojo.moduleUrl("dojox.mvc","tests/regression/robot/mvc_loan-stateful.html"+userArgs), 999999);
- // DOH regression
- doh.registerUrl("dojox.mvc.tests.regression.doh_mvc_shipto-billto-simple", dojo.moduleUrl("dojox.mvc","tests/regression/doh_mvc_shipto-billto-simple.html"+userArgs), 999999);
- doh.registerUrl("dojox.mvc.tests.regression.doh_mvc_search-results-repeat", dojo.moduleUrl("dojox.mvc","tests/regression/doh_mvc_search-results-repeat.html"+userArgs), 999999);
- doh.registerUrl("dojox.mvc.tests.regression.doh_mvc_search-results-repeat-store", dojo.moduleUrl("dojox.mvc","tests/regression/doh_mvc_search-results-repeat-store.html"+userArgs), 999999);
- doh.registerUrl("dojox.mvc.tests.regression.doh_mvc_programmatic-repeat-store", dojo.moduleUrl("dojox.mvc","tests/regression/doh_mvc_programmatic-repeat-store.html"+userArgs), 999999);
- doh.registerUrl("dojox.mvc.tests.regression.doh_mvc_binding-simple", dojo.moduleUrl("dojox.mvc","tests/regression/doh_mvc_binding-simple.html"+userArgs), 999999);
- doh.registerUrl("dojox.mvc.tests.regression.doh_mvc_ref-set-repeat", dojo.moduleUrl("dojox.mvc","tests/regression/doh_mvc_ref-set-repeat.html"+userArgs), 999999);
- doh.registerUrl("dojox.mvc.tests.regression.doh_mvc_billto-hierarchical", dojo.moduleUrl("dojox.mvc","tests/regression/doh_mvc_shipto-billto-hierarchical.html"+userArgs), 999999);
- doh.registerUrl("dojox.mvc.tests.regression.doh_async_mvc_input-output-simple", dojo.moduleUrl("dojox.mvc","tests/regression/doh_async_mvc_input-output-simple.html"+userArgs), 999999);
- doh.registerUrl("dojox.mvc.tests.regression.doh_async_mvc_zero-value-test", dojo.moduleUrl("dojox.mvc","tests/regression/doh_async_mvc_zero-value-test.html"+userArgs), 999999);
- doh.registerUrl("dojox.mvc.tests.regression.doh_mvc_template_repeat_exprchar", dojo.moduleUrl("dojox.mvc","tests/regression/doh_mvc_template_repeat_exprchar.html"+userArgs), 999999);
- doh.registerUrl("dojox.mvc.tests.regression.doh_mvc_form-kitchensink", dojo.moduleUrl("dojox.mvc","tests/regression/doh_mvc_form-kitchensink.html"+userArgs), 999999);
- doh.registerUrl("dojox.mvc.tests.regression.doh_mvc_date_test", dojo.moduleUrl("dojox.mvc","tests/regression/doh_mvc_date_test.html"+userArgs), 999999);
- doh.registerUrl("dojox.mvc.tests.regression.doh_mvc_validation-test-simple", dojo.moduleUrl("dojox.mvc","tests/regression/doh_mvc_validation-test-simple.html"+userArgs), 999999);
- doh.registerUrl("dojox.mvc.tests.regression.doh_new-mvc_input-output-simple.html", dojo.moduleUrl("dojox.mvc","tests/doh_new-mvc_input-output-simple.html"+userArgs), 999999);
- // Robot regression
- doh.registerUrl("dojox.mvc.tests.regression.robot.mobile-demo-test", dojo.moduleUrl("dojox.mvc","tests/regression/robot/mobile-demo-test.html"+userArgs), 999999);
- doh.registerUrl("dojox.mvc.tests.regression.robot.mvc_shipto-billto-simple", dojo.moduleUrl("dojox.mvc","tests/regression/robot/mvc_shipto-billto-simple.html"+userArgs), 999999);
- doh.registerUrl("dojox.mvc.tests.regression.robot.mvc_generate-view", dojo.moduleUrl("dojox.mvc","tests/regression/robot/mvc_generate-view.html"+userArgs), 999999);
- doh.registerUrl("dojox.mvc.tests.regression.robot.mvc_loan-stateful", dojo.moduleUrl("dojox.mvc","tests/regression/robot/mvc_loan-stateful.html"+userArgs), 999999);
- //doh.registerUrl("dojox.mvc.tests.regression.robot.mvc_ref-set-repeat", dojo.moduleUrl("dojox.mvc","tests/regression/robot/mvc_ref-set-repeat.html"+userArgs), 999999);
- //doh.registerUrl("dojox.mvc.tests.regression.robot.mvc_search-results-repeat", dojo.moduleUrl("dojox.mvc","tests/regression/robot/mvc_search-results-repeat.html"+userArgs), 999999);
- doh.registerUrl("dojox.mvc.tests.regression.robot.mvc_search-results-ins-del", dojo.moduleUrl("dojox.mvc","tests/regression/robot/mvc_search-results-ins-del.html"+userArgs), 999999);
- //doh.registerUrl("dojox.mvc.tests.regression.robot.iphone_shipto-billto", dojo.moduleUrl("dojox.mvc","tests/regression/robot/iphone_shipto-billto.html"+userArgs), 999999);
- //doh.registerUrl("dojox.mvc.tests.regression.robot.android_repeat-ins", dojo.moduleUrl("dojox.mvc","tests/regression/robot/android_repeat-ins.html"+userArgs), 999999);
- //doh.registerUrl("dojox.mvc.tests.regression.robot.mvc_shipto-billto-hierarchical", dojo.moduleUrl("dojox.mvc","tests/regression/robot/mvc_shipto-billto-hierarchical.html"+userArgs), 999999);
-}catch(e){
- doh.debug(e);
-}
+ // DOH
+ doh.registerUrl("dojox.mvc.tests.doh_mvc_new_shipto-billto-simple", require.toUrl("dojox/mvc/tests/doh_mvc_new_shipto-billto-simple.html" + userArgs), 999999);
+ doh.registerUrl("dojox.mvc.tests.doh_mvc_new_ref-set-repeat", require.toUrl("dojox/mvc/tests/doh_mvc_new_ref-set-repeat.html" + userArgs), 999999);
+ doh.registerUrl("dojox.mvc.tests.multiattrib.doh_mvc_test_Toolbar", require.toUrl("dojox/mvc/tests/multiattrib/doh_mvc_test_Toolbar.html" + userArgs), 999999);
+ doh.registerUrl("dojox.mvc.tests.doh_mvc_search-results-repeat", require.toUrl("dojox/mvc/tests/doh_mvc_search-results-repeat.html" + userArgs), 999999);
+ doh.registerUrl("dojox.mvc.tests.doh_new-mvc_input-output-simple", require.toUrl("dojox/mvc/tests/doh_new-mvc_input-output-simple.html" + userArgs), 999999);
+ doh.registerUrl("dojox.mvc.tests.doh_new-mvc_label_and_totals", require.toUrl("dojox/mvc/tests/doh_new-mvc_label_and_totals.html" + userArgs), 999999);
+ doh.registerUrl("dojox.mvc.tests.doh_mvc_mobile-demo", require.toUrl("dojox/mvc/tests/doh_mvc_mobile-demo.html" + userArgs), 999999);
+ // Robot
+ doh.registerUrl("dojox.mvc.tests.regression.robot.mvc_loan-stateful", require.toUrl("dojox/mvc/tests/regression/robot/mvc_loan-stateful.html" + userArgs), 999999);
+ // DOH regression
+ doh.registerUrl("dojox.mvc.tests.regression.doh_mvc_shipto-billto-simple", require.toUrl("dojox/mvc/tests/regression/doh_mvc_shipto-billto-simple.html" + userArgs), 999999);
+ doh.registerUrl("dojox.mvc.tests.regression.doh_mvc_search-results-repeat", require.toUrl("dojox/mvc/tests/regression/doh_mvc_search-results-repeat.html" + userArgs), 999999);
+ doh.registerUrl("dojox.mvc.tests.regression.doh_mvc_search-results-repeat-store", require.toUrl("dojox/mvc/tests/regression/doh_mvc_search-results-repeat-store.html" + userArgs), 999999);
+ doh.registerUrl("dojox.mvc.tests.regression.doh_mvc_programmatic-repeat-store", require.toUrl("dojox/mvc/tests/regression/doh_mvc_programmatic-repeat-store.html" + userArgs), 999999);
+ doh.registerUrl("dojox.mvc.tests.regression.doh_mvc_binding-simple", require.toUrl("dojox/mvc/tests/regression/doh_mvc_binding-simple.html" + userArgs), 999999);
+ doh.registerUrl("dojox.mvc.tests.regression.doh_mvc_ref-set-repeat", require.toUrl("dojox/mvc/tests/regression/doh_mvc_ref-set-repeat.html" + userArgs), 999999);
+ doh.registerUrl("dojox.mvc.tests.regression.doh_mvc_billto-hierarchical", require.toUrl("dojox/mvc/tests/regression/doh_mvc_shipto-billto-hierarchical.html" + userArgs), 999999);
+ doh.registerUrl("dojox.mvc.tests.regression.doh_async_mvc_input-output-simple", require.toUrl("dojox/mvc/tests/regression/doh_async_mvc_input-output-simple.html" + userArgs), 999999);
+ doh.registerUrl("dojox.mvc.tests.regression.doh_async_mvc_zero-value-test", require.toUrl("dojox/mvc/tests/regression/doh_async_mvc_zero-value-test.html" + userArgs), 999999);
+ doh.registerUrl("dojox.mvc.tests.regression.doh_mvc_template_repeat_exprchar", require.toUrl("dojox/mvc/tests/regression/doh_mvc_template_repeat_exprchar.html" + userArgs), 999999);
+ doh.registerUrl("dojox.mvc.tests.regression.doh_mvc_form-kitchensink", require.toUrl("dojox/mvc/tests/regression/doh_mvc_form-kitchensink.html" + userArgs), 999999);
+ doh.registerUrl("dojox.mvc.tests.regression.doh_mvc_date_test", require.toUrl("dojox/mvc/tests/regression/doh_mvc_date_test.html" + userArgs), 999999);
+ doh.registerUrl("dojox.mvc.tests.regression.doh_mvc_validation-test-simple", require.toUrl("dojox/mvc/tests/regression/doh_mvc_validation-test-simple.html" + userArgs), 999999);
+ doh.registerUrl("dojox.mvc.tests.regression.doh_new-mvc_input-output-simple.html", require.toUrl("dojox/mvc/tests/doh_new-mvc_input-output-simple.html" + userArgs), 999999);
+ // Robot regression
+ doh.registerUrl("dojox.mvc.tests.regression.robot.mobile-demo-test", require.toUrl("dojox/mvc/tests/regression/robot/mobile-demo-test.html" + userArgs), 999999);
+ doh.registerUrl("dojox.mvc.tests.regression.robot.mvc_shipto-billto-simple", require.toUrl("dojox/mvc/tests/regression/robot/mvc_shipto-billto-simple.html" + userArgs), 999999);
+ doh.registerUrl("dojox.mvc.tests.regression.robot.mvc_generate-view", require.toUrl("dojox/mvc/tests/regression/robot/mvc_generate-view.html" + userArgs), 999999);
+ doh.registerUrl("dojox.mvc.tests.regression.robot.mvc_loan-stateful", require.toUrl("dojox/mvc/tests/regression/robot/mvc_loan-stateful.html" + userArgs), 999999);
+ //doh.registerUrl("dojox.mvc.tests.regression.robot.mvc_ref-set-repeat", require.toUrl("dojox/mvc/tests/regression/robot/mvc_ref-set-repeat.html" + userArgs), 999999);
+ //doh.registerUrl("dojox.mvc.tests.regression.robot.mvc_search-results-repeat", require.toUrl("dojox/mvc/tests/regression/robot/mvc_search-results-repeat.html" + userArgs), 999999);
+ doh.registerUrl("dojox.mvc.tests.regression.robot.mvc_search-results-ins-del", require.toUrl("dojox/mvc/tests/regression/robot/mvc_search-results-ins-del.html" + userArgs), 999999);
+ //doh.registerUrl("dojox.mvc.tests.regression.robot.iphone_shipto-billto", require.toUrl("dojox/mvc/tests/regression/robot/iphone_shipto-billto.html" + userArgs), 999999);
+ //doh.registerUrl("dojox.mvc.tests.regression.robot.android_repeat-ins", require.toUrl("dojox/mvc/tests/regression/robot/android_repeat-ins.html" + userArgs), 999999);
+ //doh.registerUrl("dojox.mvc.tests.regression.robot.mvc_shipto-billto-hierarchical", require.toUrl("dojox/mvc/tests/regression/robot/mvc_shipto-billto-hierarchical.html" + userArgs), 999999);
+ }catch(e){
+ doh.debug(e);
+ }
+});

0 comments on commit 7c2e614

Please sign in to comment.
Something went wrong with that request. Please try again.