init : {\r
"updateData" : {\r
label : "Edit Execution Specs",\r
- icon : "resource/slc/document-open.png",\r
+ icon : "org.argeo.slc.riadocument-open.png",\r
shortcut : null,\r
enabled : false,\r
menu : null,\r
selectionChange : function(viewId, selection) {\r
if (viewId != "batch:list")\r
return;\r
+ var view = org.argeo.ria.components.ViewsManager.getInstance().getViewPaneById("editor").getContent();\r
if ((selection && selection.length == 1)) {\r
- var view = org.argeo.ria.components.ViewsManager.getInstance().getViewPaneById("editor").getContent();\r
view.setBatchEntrySpec(selection[0].getUserData("batchEntrySpec"));\r
+ }else{\r
+ view.setBatchEntrySpec(null);\r
}\r
},\r
command : null \r
this.setView(viewPane); \r
this.setViewSelection(new org.argeo.ria.components.ViewSelection(viewPane.getViewId()));\r
\r
- this.addListener("changeBatchEntrySpec", this.updateData, this); \r
+ this.addListener("changeBatchEntrySpec", this.updateData, this);\r
+ this._emptyTitleString = "Script Parameters (select a script to edit)";\r
+ this._editorTitleString = "Script '%1' Parameters";\r
},\r
/**\r
* The implementation should contain the real data loading (i.o. query...)\r
*/\r
load : function(){\r
this._createLayout();\r
- this.getView().setViewTitle("Specs Editor");\r
+ this.getView().setViewTitle(this._emptyTitleString);\r
},\r
\r
/**\r
var batchEntry = event.getData();\r
if(batchEntry == null){\r
this.tableModel.setData([]);\r
+ this.getView().setViewTitle(this._emptyTitleString);\r
return;\r
}\r
+ this.getView().setViewTitle(qx.lang.String.format(this._editorTitleString, [batchEntry.getFlow().getName()]));\r
var values = batchEntry.getValues();\r
var data = [];\r
for(var key in values){\r
var valueObj = values[key];\r
var hidden = valueObj.getHidden();\r
var type = valueObj.getSpecType();\r
- if(type == "primitive" && !hidden){\r
+ if((type == "primitive" || type== "ref")&& !hidden){\r
metadata = {\r
key : key,\r
disabled : valueObj.getFrozen(),\r
type : type,\r
- subType : valueObj.getSpecSubType() \r
+ subType : valueObj.getSpecSubType(),\r
+ refList : (type=="ref"?valueObj.getRefList():[])\r
}\r
data.push([key, valueObj.getValue(), metadata]);\r
}\r
var factory = new org.argeo.slc.ria.execution.CellEditorFactory();\r
columnModel.setCellEditorFactory(1, factory);\r
columnModel.setDataCellRenderer(1, factory);\r
- columnModel.getBehavior().setWidth(0, "70%");\r
+ columnModel.getBehavior().setWidth(0, "40%");\r
this.add(this.table, {edge:"center"});\r
}, \r
\r