These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

strange behavior with XDP data to Multiple Selection ListBox

TLD49
Registered: Dec 3 2007
Posts: 11

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.

TLD49
Registered: Dec 3 2007
Posts: 11
No takers?

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?
sconforms
Expert
Registered: Jul 10 2007
Posts: 92
It seems you may have found a bug in the multi-select choice list object in previous versions of Acrobat and Reader however this doesn't seem to be an issue in the latest release which is version 8.1.1 of Acrobat and Reader (I wasn't able to reproduce the behaviour you were describing in that version of Pro and Reader).

Stefan Cameron obtained his bachelor's degree with Honors in Computer Science at the University of Ottawa and is a Computer Scientist working on Adobe's LiveCycle server products, in particular on LiveCycle Designer ES for the past 5 years.

gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
Multi selection does not work with forms created with LiveCycle Designer. It is an option for the list box and comboo box field in forms created with Acrobat's Form Tool.

George Kaiser

TLD49
Registered: Dec 3 2007
Posts: 11
Thanks for the replies.

sconforms - I'm also using Reader 8.1.1. I also tried it on Pro 8.1.1 just for kicks, getting the same issue. Happens only when I populate the Listbox control from an XML datasource (when opening an XDP file).

gkaiseril - not sure I understand why it's not supported. Multi-select ListBoxes work fine if you manually enter item values into the form during creation in LifeCycle Designer. As mentioned above, this only happens when you use a datasource to populate data in a multi-select ListBox. Do you mean it's not supported for dyanmic XML-based Acrobat Forms (how it's currently saved)? If so, do you have any documentation to that effect?
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
"Multi Selection ListBox" means there exist a list box or combox box with seletion items and one can select multiple items from the selection list. This option of the list box or combo box is an option of the form field in Acrobat forms created with the Form Tool. The mulitiplel selections are in the array returned by the "currentValueIndices()" property of the field object, see the JS API Reference. The ability to select multiple items in LiveCycle Designer forms is not available.

Now if you are trying to dynamically populate a list box or combo box in Reader by accessing a databse, it is not possible since the data connection to a data base is not possible in Reader.

George Kaiser

TLD49
Registered: Dec 3 2007
Posts: 11
gkaiseril wrote:
The ability to select multiple items in LiveCycle Designer forms is not available.
The option is there in 8.0, as mentioned earlier. You can enable Multiple Selection for a ListBox in Lifecycle Designer 8.0. If you enter items and their values in Lifecycle itself, you can perform multiple selections of the PDF even in Reader. It's only with XML data source that you have issues in multiselects.

gkaiseril wrote:
Now if you are trying to dynamically populate a list box or combo box in Reader by accessing a databse, it is not possible since the data connection to a data base is not possible in Reader.
We're using XML to populate data, through XDP, not a live dataconnection to a database. As noted previously, this works just fine for populating all controls with XML data, even multiple-selection ListBox. I can even enter/change data and make selections on Lifecycle designed PDF in Reader or Pro EXCEPT for multiselect ListBox, which is my original problem.
TLD49
Registered: Dec 3 2007
Posts: 11
sconforms wrote:
It seems you may have found a bug in the multi-select choice list object in previous versions of Acrobat and Reader however this doesn't seem to be an issue in the latest release which is version 8.1.1 of Acrobat and Reader (I wasn't able to reproduce the behaviour you were describing in that version of Pro and Reader).
Just to check - were you able to get this working by opening an XDP file (that contains the XML data) directly in Reader 8.1.1?
Paulo_Italiano
Registered: Jul 11 2011
Posts: 1
Hi,

I use version 9.0.0.2 of the LiveCycle. I also have a problem with the multi selection in list box control.
I use following xsd:

<xsd:simpleType name="LicenseTypeName">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="License A"/>
<xsd:enumeration value="License B"/>
<xsd:enumeration value="License C"/>
</xsd:restriction>
</xsd:simpleType>

<xsd:group name="LicensesGroup">
<xsd:sequence>
<xsd:element name="License" type="wnio:LicenseTypeName" minOccurs="1" maxOccurs="5"/>
</xsd:sequence>
</xsd:group>

<xsd:complexType name="LicenseType">
<xsd:group ref="LicensesGroup"/>
</xsd:complexType>

and an element of type LicenseType is bound to a list box. The 'Allow Multiple Selection' checkbox is selected. LCDesigner reads the acceptable list of values in an appropriate way - in a Design View all values can be seen in a list box. Strangely the values never get generated automatically (File->Form Properties->Preview->&Generate Preview Data). And even if I add them manually to that generated xml, the are not visible in a Preview PDF view. Does anybody know why?Additionally, we use the form in a embedded Acrobat plugin, the list of values is shown but after the user chooses a couple of values, there is no data in output xml. @Acrobat, what kind of problem is with this control? Does anyone know any work-around?

Best regards,
Paweł Włoch

Pawel Wloch