You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
260 lines
7.0 KiB
260 lines
7.0 KiB
{ |
|
"id": "simpleModelApp", |
|
"name": "Simple Model App", |
|
"description": "A simple app to show how to use different types of Stores and Models", |
|
"splash": "splash", |
|
|
|
"dependencies": [ |
|
"dojox/mobile/_base", |
|
"dojox/app/widgets/Container", |
|
"dojox/mobile/compat", |
|
"dojox/mobile/TabBar", |
|
"dojox/mobile/RoundRect", |
|
"dojox/mobile/TabBarButton", |
|
"dojox/mobile/Button", |
|
"dojox/mobile/RoundRect", |
|
"dojox/mobile/Heading", |
|
"dojo/store/Memory", |
|
"dojo/store/JsonRest", |
|
"dojo/store/Memory", |
|
"dojo/data/ItemFileWriteStore", |
|
"dojo/store/DataStore", |
|
"dojox/app/utils/simpleModel", |
|
"dojox/app/utils/mvcModel", |
|
"dojox/mvc/EditStoreRefListController", |
|
"dojox/mvc/EditModelRefController", |
|
"dojox/mobile/deviceTheme" |
|
], |
|
// Modules for the application. The are basically used as the second |
|
// array of mixins in a dojo.declare(). Modify the top level behavior |
|
// of the application, how it processes the config or any other life cycle |
|
// by creating and including one or more of these |
|
"modules": [], |
|
|
|
// Array of AMD modules identifiers. Controllers for the application. All the controllers defined here will be |
|
// loaded during application startup to respond to application events and controller the application logic. |
|
"controllers": [ |
|
"dojox/app/controllers/Load", |
|
"dojox/app/controllers/Transition", |
|
"dojox/app/controllers/Layout" |
|
], |
|
|
|
//stores we are using |
|
"stores": { |
|
"namesStore":{ |
|
"type": "dojo/store/Memory", |
|
"params": { |
|
"data": "modelApp.names" |
|
} |
|
}, |
|
"repeatStore":{ |
|
"type": "dojo/store/Memory", |
|
"params": { |
|
"data": "modelApp.repeatData" |
|
} |
|
}, |
|
"repeatItemStore":{ |
|
"type": "dojo/data/ItemFileWriteStore", |
|
"params": { |
|
"url": "./resources/data/repeat.json" |
|
} |
|
}, |
|
"nameItemStore":{ |
|
"type": "dojo/data/ItemFileWriteStore", |
|
"params": { |
|
"url": "./resources/data/names2.json" |
|
} |
|
}, |
|
// note that a jsonRest store requires the data be in a different format... |
|
"jsonStore":{ |
|
"type": "dojo/store/JsonRest", |
|
"params": { |
|
"target": "./resources/data/jsonRestRepeatData.json" |
|
} |
|
}, |
|
// note that a jsonRest store requires the data be in a different format... |
|
"jsonNameStore":{ |
|
"type": "dojo/store/JsonRest", |
|
"params": { |
|
"target": "./resources/data/jsonRestNamesData.json" |
|
} |
|
} |
|
}, |
|
|
|
//models and instantiation parameters for the models. Including 'type' as a property allows |
|
//one to override the class that will be used for the model. By default it is dojox/mvc/mvcModel |
|
"models": { |
|
"namesXUnused": { |
|
"modelLoader": "dojox/app/utils/mvcModel", |
|
"type": "dojox/mvc/EditStoreRefListController", |
|
"params":{ |
|
"store": {"$ref":"#stores.namesStore"} |
|
} |
|
}, |
|
"repeatmodels3": { |
|
"modelLoader": "dojox/app/utils/mvcModel", |
|
"type": "dojox/mvc/EditStoreRefListController", |
|
"params":{ |
|
"datastore": {"$ref":"#stores.repeatItemStore"} |
|
} |
|
}, |
|
"jsonRestModel": { |
|
"modelLoader": "dojox/app/utils/mvcModel", |
|
"type": "dojox/mvc/EditStoreRefListController", |
|
"params":{ |
|
"store": {"$ref":"#stores.jsonStore"}, |
|
"query": {"Location": "NY"} |
|
} |
|
} |
|
}, |
|
|
|
// The has section will include the sections for which the has checks are true. |
|
// For the sections with ! it will include the section if the has check is not true. |
|
"has" : { |
|
"ie9orLess" : { |
|
"controllers": [ |
|
"dojox/app/controllers/HistoryHash" |
|
] |
|
}, |
|
"!ie9orLess" : { |
|
"controllers": [ |
|
"dojox/app/controllers/History" |
|
] |
|
} |
|
}, |
|
|
|
//the name of the scene to load when the app is initialized. |
|
"defaultView": "home", |
|
|
|
"defaultTransition": "slide", |
|
//scenes are groups of views and models loaded at once |
|
"views": { |
|
|
|
"home": { |
|
"dependencies":["dojox/mobile/ListItem","dojox/mobile/RoundRectList","dojox/mobile/RoundRectCategory","dojox/mobile/Heading"], |
|
"template": "./main/main.html" |
|
}, |
|
|
|
"simple":{ |
|
"models": { |
|
"names": { |
|
"modelLoader": "dojox/app/utils/mvcModel", |
|
"type": "dojox/mvc/ModelRefController", |
|
"params":{ |
|
"data": "modelApp.names" |
|
} |
|
} |
|
}, |
|
"controller" : "./simple/simple.js", |
|
"template": "./simple/simple.html", |
|
"dependencies":["dojox/mobile/TextBox","dojox/mvc/Group","dojox/mvc/Repeat","dojox/mvc/Output"] |
|
}, |
|
|
|
"simple2":{ |
|
"models": { |
|
"names": { |
|
"modelLoader": "dojox/app/utils/mvcModel", |
|
"type": "dojox/mvc/EditModelRefController", |
|
"params":{ |
|
"data": "modelApp.names" |
|
} |
|
}, |
|
"repeatmodelsXUnused": { |
|
"modelLoader": "dojox/app/utils/mvcModel", |
|
"type": "dojox/mvc/EditStoreRefListController", |
|
"params":{ |
|
"datastore": {"$ref":"#stores.repeatItemStore"} |
|
} |
|
} |
|
}, |
|
"controller" : "./simple/simple2.js", |
|
"template": "./simple/simple2.html", |
|
"dependencies":["dojox/mobile/TextBox","dojox/mvc/Group","dojox/mvc/Repeat","dojox/mvc/Output"] |
|
}, |
|
|
|
"simple3":{ |
|
"models": { |
|
"names3": { |
|
"modelLoader": "dojox/app/utils/simpleModel", |
|
"params":{ |
|
"store": {"$ref":"#stores.namesStore"} |
|
|
|
} |
|
}, |
|
"names3JsonStoreUnused": { |
|
"modelLoader": "dojox/app/utils/simpleModel", |
|
"params":{ |
|
"store": {"$ref":"#stores.jsonNameStore"}, |
|
"query": {"id": "1"} |
|
} |
|
}, |
|
"names3dataStoreUnused": { |
|
"modelLoader": "dojox/app/utils/simpleModel", |
|
"params":{ |
|
"datastore": {"$ref":"#stores.nameItemStore"} |
|
|
|
} |
|
}, |
|
"namesXUnused": { |
|
"modelLoader": "dojox/app/utils/simpleModel", |
|
"params":{ |
|
"store": {"$ref":"#stores.namesStore"} |
|
} |
|
} |
|
}, |
|
"controller" : "./simple/simple3.js", |
|
"template": "./simple/simple3.html", |
|
"dependencies":["dojox/mobile/TextBox"] |
|
}, |
|
|
|
"repeat": { |
|
"models": { |
|
"repeatmodels": { |
|
"modelLoader": "dojox/app/utils/mvcModel", |
|
"type": "dojox/mvc/EditStoreRefListController", |
|
"params":{ |
|
"store": {"$ref":"#stores.repeatStore"} |
|
} |
|
}, |
|
"repeatmodelsXUnused": { |
|
"modelLoader": "dojox/app/utils/mvcModel", |
|
"type": "dojox/mvc/EditStoreRefListController", |
|
"params":{ |
|
"datastore": {"$ref":"#stores.repeatItemStore"} |
|
} |
|
} |
|
}, |
|
"controller": "./repeat/repeat.js", |
|
"template": "./repeat/repeat.html", |
|
"dependencies":["dojox/mobile/TextBox","dojox/mvc/Group","dojox/mvc/Repeat","dojox/mvc/Output"] |
|
}, |
|
|
|
"repeat2": { |
|
"models": { |
|
"repeatmodels2": { |
|
"modelLoader": "dojox/app/utils/mvcModel", |
|
"type": "dojox/mvc/EditStoreRefListController", |
|
"params":{ |
|
"datastore": {"$ref":"#stores.repeatItemStore"}, |
|
"query": {"Location": "NY"} |
|
} |
|
} |
|
}, |
|
"controller": "./repeat/repeat2.js", |
|
"template": "./repeat/repeat2.html", |
|
"dependencies":["dojox/mobile/TextBox","dojox/mvc/Group","dojox/mvc/Repeat","dojox/mvc/Output"] |
|
}, |
|
|
|
"repeat3": { |
|
"controller": "./repeat/repeat3.js", |
|
"template": "./repeat/repeat3.html", |
|
"dependencies":["dojox/mobile/TextBox","dojox/mvc/Group","dojox/mvc/Repeat","dojox/mvc/Output"] |
|
}, |
|
|
|
"generate": { |
|
"controller": "./generate/generate.js", |
|
"template": "./generate/generate.html", |
|
"dependencies":["dojox/mobile/TextBox", "dojox/mobile/TextArea", "dojox/mvc/Generate"] |
|
} |
|
} |
|
}
|
|
|