Highlighted

choiceList bound list items

yodadobe

12-03-2009

I have a repeating sub form which contains a drop down. I bound the list items to a node in my XML. Everything works fine when the form is first filled out. I can create new rows and the new rows contain the list of items in the drop down. I then save the data off and the form is rendered again later with that data. If I then add another row, the new row's drop down does not contain any items.

Replies

Highlighted

yodadobe

12-03-2009

I guess it has nothing to do with the save. It only works for the fields that exist at design time. If I have 2 initial rows, then those 2 rows work. If I add one through script, the new row does not contain the items.
Highlighted

yodadobe

13-03-2009

When I say add a new row, I mean a new instance of the sub form, not a new row to the drop down.<br /><br />_frmApprDetail.addInstance(1);<br /><br />I have now removed the data binding and am filling the drop downs manually through script in the initialize. I figured that the data binding would be more efficient somehow by using a common data structure for all instances of the drop down. It was not working for me though and this does.<br /><br />var objList = xfa.data.Formdata.ApproverList.nodes;<br /><br />for(i=0;i<objList.length;i++){<br /> this.addItem(objList.item(i).value);<br />}
Highlighted

pguerett

13-03-2009

Thats what I thought you were doing. The parameter that is used with the addInstance indicates whether you want to merge the data that is in the datadom with the new template. You have indicated true so the remerge is happening. Try changing it to 0 or false and see if it makes a difference.
Highlighted

yodadobe

13-03-2009

The drop down is actually in a table with 1 row that is inside the sub form. I am using the table to make clean columns. I'm not sure if that is contributing to the problem. It still would seem odd though that it works for the initial rows.