Skip to content
Snippets Groups Projects
Commit a896e382 authored by Robert Anderson's avatar Robert Anderson
Browse files

Resolve group ID to Name after editing

parent 0009132f
No related branches found
No related tags found
No related merge requests found
......@@ -603,6 +603,18 @@ function showWiSPUserAddEditWindow(WiSPUserWindow,id) {
store: attributeStore
});
// Editor combobox ID
var editorComboBoxID = Ext.id();
// Render display value
editorComboBoxRenderer = function(editorComboBoxID) {
var combo = Ext.getCmp(editorComboBoxID);
return function(value){
var record = combo.findRecord(combo.valueField, value);
return record ? record.get(combo.displayField) : value;
}
}
// Build the group editor grid
var groupEditor = new Ext.grid.EditorGridPanel({
plain: true,
......@@ -679,6 +691,7 @@ function showWiSPUserAddEditWindow(WiSPUserWindow,id) {
dataIndex: 'Name',
width: 150,
editor: new Ext.form.ComboBox({
id: editorComboBoxID,
allowBlank: false,
store: new Ext.ux.JsonStore({
sortInfo: { field: "Name", direction: "ASC" },
......@@ -696,7 +709,8 @@ function showWiSPUserAddEditWindow(WiSPUserWindow,id) {
forceSelection: true,
triggerAction: 'all',
editable: false
})
}),
renderer: editorComboBoxRenderer(editorComboBoxID)
}
]),
store: groupStore
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment