Hi,
I am not aware of a way to do this using the dialog object, though there are a lot of undocumented methods and properties some of which are shown here, Adobe LiveCycle Designer Cookbooks by BR001: execDialog
But you should be able to get the result you want with a bit of JavaScript;
function dialog() {
var radioButtonList = [ { type: "radio", name: "name1", group_id: "rado", item_id:"nam1" },
{ type: "radio", name: "name2", group_id: "rado", item_id:"nam2" },
{ type: "radio", name: "name3", group_id: "rado", item_id:"nam3" },
{ type: "radio", name: "name4", group_id: "rado", item_id:"nam4" } ]
var descriptor = {
commit: function(dialog) {
var elements = dialog.store();
var radioButtonIds = radioButtonList.map(function (entry) { return entry.item_id } )
for (var i=0, limit=radioButtonIds.length; i < limit; i++) {
if (elements[radioButtonIds[i]] == true) {
dialogObject.rado = radioButtonIds[i];
break;
}
}
},
description:{
name: "Auswahl Schnittstellen",
elements:[
{ type: "ok_cancel" },
{ type:"cluster", name: "ABS", elements:[
{ type: "view", align_children: "align_left", elements: [
{ type: "static_text", name: "Choose one:" }]
.concat(radioButtonList)
.concat([ { type: "static_text", name: "some more stuff..." } ])
}
]}
]}
}
var dialogObject =
{
rado: null,
execDialog: function() { return app.execDialog(descriptor); },
};
return dialogObject;
}
var d = dialog();
d.execDialog();
console.println(d.rado);
In this example I build up the dialog object with the concat() method, so I can access the item_id in the commit() method.
Regards
Bruce