return "openils.FlattenerStore: " + this.message;
};
- function lazy(o) {
- if (typeof o == "object") {
- if (o.part_num)
- return "[object with part_num: " + o.part_num + "]";
- else
- return "[object with keys: " + openils.Util.objectProperties(o).join(",") + "]";
- } else {
- return o;
- }
- }
-
dojo.declare(
"openils.FlattenerStore", null, {
},
"_get_map_key": function() {
- console.debug("mapClause: " + dojo.toJson(this.mapClause));
+ //console.debug("mapClause: " + dojo.toJson(this.mapClause));
this.mapKey = fieldmapper.standardRequest(
["open-ils.fielder",
"open-ils.fielder.flattened_search.prepare"], {
// callback to the *req* object for the caller's use, but
// the one we provide does nothing but issue an alert().
- console.info("fetch(" + dojo.toJson(req) + ")");
+ //console.log("fetch(" + dojo.toJson(req) + ")");
var self = this;
var callback_scope = req.scope || dojo.global;
});
},
- /* dojo.data.api.Write */
-
-/* to add:
- * ------
- * newItem -> call onNew(newitem)
- * deleteItem -> call onDelete(deleteditem)
- * setValue -> call onSet(item, attr, oldval, newval)
- * setValues -> ditto
- */
-
- "newItem": function(keywordArgs, parentInfo) {
- if (parentInfo)
- throw new FlattenerStoreError("not a hierarchical datastore");
-
+ /* dojo.data.api.Write - only very partially implemented, because
+ * for FlattenerGrid, the intended client of this store, we don't
+ * need most of the methods. */
- /* we need to get new item by calling a fetch or something, because
- * the new fmobj as result of createpane or something is not enough
- * (we need the data the flattener would return about it)
- *
- * finish when editing is figured out */
- //this.onNew(myNewItem, parentInfo)
+ "deleteItem": function(item) {
+ console.warn("[unimplemented] deleteItem() XXX TODO");
},
"setValue": function(item, attribute, value) {
},
"setValues": function(item, attribute, values) {
- console.warn("[unimplemented] setValues(); unneeded or TODO?");
+ console.warn("[unimplemented] setValues()"); /* unneeded */
},
- "deleteItem": function(item) {
- console.warn("[unimplemented] deleteItem() XXX TODO");
+ "newItem": function(keywordArgs, parentInfo) {
+ console.warn("[unimplemented] newItem()"); /* unneeded */
},
"unsetAttribute": function() {
- console.warn("[unimplemented] unsetAttribute()");
+ console.warn("[unimplemented] unsetAttribute()"); /* unneeded */
},
"save": function() {
- console.warn("[unimplemented] save()");
+ console.warn("[unimplemented] save()"); /* unneeded */
},
"revert": function() {
- console.warn("[unimplemented] revert()");
+ console.warn("[unimplemented] revert()"); /* unneeded */
},
"isDirty": function() { /* I /think/ this will be ok for our purposes */
return false;
},
- /* dojo.data.api.Notification */
+ /* dojo.data.api.Notification - Keep these no-op methods because
+ * clients will dojo.connect() to them. */
- "onNew" : function(item) { /* no-op, but keep */ },
- "onDelete" : function(item) { /* no-op, keep */ },
- "onSet": function(item, attr, oldval, newval) { /* no-op, but keep */ },
+ "onNew" : function(item) { /* no-op */ },
+ "onDelete" : function(item) { /* no-op */ },
+ "onSet": function(item, attr, oldval, newval) { /* no-op */ },
/* *** Classes implementing any Dojo APIs do this to list which
* APIs they're implementing. *** */