I've encountered some strange behavior with Multiple Selection ListBox created in LifeCycle Designer 8.0 (as a Dynamic PDF (XML) form), in that when a user in Reader 8 or Pro 8 attempts to make any selection in the ListBox, the data ends up completely disappearing upon exiting the control's focus.
Here's the background. I created a Dynamic PDF template (using Lifecycle Designer 8.0) saved as 'MyTestPDF.pdf' that contains the ListBox control with an ID called "MyListBox". The ListBox's item data is populated using Specify List Items that uses a basic XML schema for its Items, Item Text and Item Value.
Here is the XDP file sample, note the MyListBox node and three items for the listbox each under recurring Data node:
<?xml version='1.0' encoding='UTF-8' ?> <?xfa generator='AdobeDesigner_V8.0' APIVersion='2.5.6290.0' ?> <xdp:xdp xmlns:xdp='http://ns.adboe.com/xdp/'> <xfa:datasets xmlns:xfa='http://www.xfa.org/schema/xfa-data/1.0/'> <xfa:data> <form1> <MyListBox> <Data> <MyListBoxText>Item 1 Text</MyListBoxText> <MyListBoxValue>1</MyListBoxValue> </Data> <Data> <MyListBoxText>Item 2 Text</MyListBoxText> <MyListBoxValue>2</MyListBoxValue> </Data> <Data> <MyListBoxText>Item 3 Text</MyListBoxText> <MyListBoxValue>3</MyListBoxValue> </Data> </MyListBox> </form1> </xfa:data> </xfa:datasets> <pdf href='http://localhost/templates/MyTestPDF.pdf' /> </xdp:xdp>
In the PDF template, I enabled Dynamic Properties and clicked on the Specify Item Values link in the Binding property of the Listbox object. Binding remains Normal, and there's no direct data connection. Think of it as using a sample XML to give a schema to populate the data. Here's how I did it manually (within the Dynamic Properties pop-up dialog):
Data Connection is Default Data Binding (in essence, none)
Items: $record.MyListBox.Data[*]
Item Text: MyListBoxText
Item Value: MyListBoxValue
Note how the above matches the node names in the XDP sample above.
When you open the XDP file in, for example, Reader 8.0, it works like a charm. The ListBox populates with the appropriate item text/value data. When in single-select mode, you can make a selection and save it (if you have Reader Rights or are working in Pro).
However, when using this approach with Multiple Selection enabled on the ListBox, you get strange behavior when making selections in Reader or Pro 8. First off, all the values are pre-selected before a user can even focus on the ListBox. This did not happen with single-select mode nor with dropdown lists. When you go into focus to make one or more selection, the minute you exit the ListBox focus all but the last value disappear. Then if you attempt to select that last value, it too disappears... you end up with an empty ListBox.
One limitation: XML (with user opening an XDP and linking to a PDF template) is the only method available to me in populating controls with data (no static data input or an active dataconnection), and it must be LifeCycle 8.0 Dynamic Form template - can't use AcroForms. Also, this occurs when a user is utilizing Reader or Pro 8.0 or 8.1.
Thanks in advance for anyone who can help.
Again, an XML datasource for a PDF file (opening through XDP) works fine EXCEPT when populating a Multiple-Selection ListBox. Single-select listbox, dropdown list, and all other controls work fine in this scenario. Is this a bug with Multi-select ListBoxes in Acroabt 8 XML-based (dynamic) forms?