Greetings,
I am using LiveCycle Designer 8.2.1.
I created a JavaScript event, when I klick on a field, a dialog (file tree) containing diffent branches opens, each branch including several cost centers to choose from. The whole tree is expanded by default, I do not want this. How do I force the items to be collapsed?
Formular1.Formular.Seite1.deutsch.#area[0].abteilung::mouseUp - (JavaScript, client)
var kst = {
"Standort1":{
"1111111111 Vorstand":1,
"1111111112 Personalmanagement":2,},
"Standort2":{
"2222222222 Personalmanagement":902,
"2222222223 Instandhaltung":903,
},};
var dialog3 = {
initialize: function(dialog){
var dlgInit =
{
subl:kst,
};
dialog.load(dlgInit);
},
commit: function(dialog){
var oRslt = dialog.store();
abteilung.rawValue = oRslt["stat"];
},
"subl": function(dialog){
var nReturn;
var Elements = dialog.store()["subl"];
nSuche(Elements);
newStatus(dialog, nReturn);
function nSuche(nVariable){
for (var i in nVariable){
if(nVariable > 0){
nReturn = nVariable;
break;
}
else{
nSuche(nVariable);
}
}
}
},
loadDefaults: function (dialog){},
description:{
name: "Abteilungsauswahl",
elements:
[
{
type: "view",
align_children: "align_left",
elements:
[
{
type: "cluster",
name: "Auswahl",
elements:
[
{
type: "hier_list_box",
item_id: "subl",
width: 600,
height: 400
},
{
type: "static_text",
name: "Vorschau",
width: 200,
},
{
type: "edit_text",
item_id: "stat",
multiline: true,
readonly: true,
width: 200,
height: 60
},
{
type: "static_text",
name: "Bitte Abteilung auswählen!",
width: 200,
},
]
},
{
type: "ok_cancel"
}
]
}
]
}
}
app.execDialog(dialog3);
function newStatus(dialog, nValue){
var nWerte = new Array();
nWerte[1] = "Vorstand";
nWerte[2] = "Personal";
nWerte[902] = "Personalmanagement";
nWerte[903] = "Instandhaltung";
for (var i in nWerte){
if(i == nValue){
dialog.load({"stat":nWerte});
}
}
}