I have a docs List dialogue, here is my code so far. How do I get the actual selection from the DocListDialogue though? I keep tried eventInfo.parameter,but that only returned a generic object and I need a file to be returned. Here is my code:
function init() {
var app = UiApp.createApplication().setTitle("WriteWell");
var selectionHandler = app.createServerHandler("selectHandler");
app.createDocsListDialog().showDocsPicker().setDialogTitle("Select File to Open").addSelectionHandler(selectionHandler);
app.add(app.createVerticalPanel().setId("Panel"));
return app;
}
function doGet(e) {
return init();
}
function selectHandler(eventInfo){
var parameter = eventInfo.parameter;//Selection???
var app = UiApp.getActiveApplication();
var panel = app.getElementById("Panel");
panel.add(app.createLabel(parameter.getId()));//Returns an error
}