Hello,
I've created page with two depend drop down lists, if data from one of lists selected, second list filling with dependent data.
Script example:
prodata.#subform[0].DropDownList2::exit - (JavaScript, client)
DropDownList1.clearItems()
var
fgid = DropDownList2.rawValue
var
len1 =xfa.resolveNodes("$record.projects.project_data.[fg_id=="+fgid+"]").length
var
userid= xfa.resolveNodes("$record.projects.project_data.[fg_id=="+fgid+"].empl_id");
var
usertxt= xfa.resolveNodes("$record.projects.project_data.[fg_id=="+fgid+"].empl_code");
for
(var i=0 ; i<=len1; i++) {
DropDownList1.addItem(usertxt.item(i).value
, userid.item(i).value);
}
Main problem is that i have big amount of data in lists, for example DropDownList1 could contain 200+ records.
Because of this filling data takes too much time, is there way to improve perfomance of adding data?
Thank you in advance,
Paul
Views
Replies
Total Likes
Hi Paul
You could try using an expression in the List Item data binding for DropDownList1, which depending on the somExpression for DropDownList2 would be something like, .
$record.projects.project_data.[fg_id==$form.form1.DropDownList2]
The only code you would then need would be a call to xfa.form.remerge() everytime DropDownList2 changes.
If you want to post some xml data I could setup a simple sample.
Bruce
Hi,
I faced on problem, maybe you can help me with it.
When i tried to take data with:
$record.projects.project_data.[fg_id==fg_code] and fg_code = 12345 is Number everything fine,
but, when fg_code = unkn is String I got error:
Do you know how to take data by strin parameter?
Thanks in advance.
Views
Replies
Total Likes
Qustion closed.
Solution is
xfa.resolveNodes("$record.combos.combo.(fg_code.value=='unkn').fg_name") - this is javascript style.
Blog about data binding with predicates really helped:
http://blogs.adobe.com/formfeed/2008/10/data_binding_with_predicates.html
BR
Views
Replies
Total Likes