Paste number 59820: openils.acq.Picklist.createStore

Paste number 59820: openils.acq.Picklist.createStore
Pasted by: djfiander
When:1 year, 2 months ago
Share:Tweet this! | http://paste.lisp.org/+1A5O
Channel:#openils-evergreen
Paste contents:
Raw Source | XML | Display As
openils.acq.Picklist.createStore = function(pl_id, onComplete) {
    // Fetches the list of titles in a picklist and builds a grid

    function mkStore(r) {
	var msg;
	var items = [];
	while (msg = r.recv()) {
	    var data = msg.content();
	    items.push(data);
	}
	onComplete(jub.toStoreData(items));
    }

    fieldmapper.standardRequest(
	['open-ils.acq', 'open-ils.acq.lineitem.picklist.retrieve'],
	{ async: true,
	  params: [openils.User.authtoken, pl_id, {flesh_attrs:1}],
	  oncomplete: mkStore
	});
};

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.