Expand my Community achievements bar.

SOLVED

Dialog list_box items not sorted properly

Avatar

Level 2

Hi,

I've created dialog with list box control. After populating with some data, I get wrong alphabetical order of items.Specifically item with character "č" is added on the end of the list[1] When i change character "č" to some other latin charcter like "š" everything works like charm[2]. Can you recommend me some workaround.Thank you

Pdf is created in Adobe Livecycle Designer 11 Xfa 3.3.

Preview is done in Adobe acrobat 11 and Adobe Reader DC 2017

1.

list_wrong.png

2.

list_right.png

1 Accepted Solution

Avatar

Correct answer by
Level 2

Ok, I finally found solution[1]. Instead of populating items with dialog.load("LST1":myDataProvider), i call dialog.insertEntryInList on every item in my dataprovider and items are in correct order now.

1.

solution.png

View solution in original post

10 Replies

Avatar

Level 2

You posted the the Acrobat Reader forum, and you won't be able to fix it in the free Reader. Does it work correctly in LiveCycle? What kind of dialog box is it?

Avatar

Level 2

Yes, i posted in wrong forum.I am not able to move it to right one. What do you mean "Does it work correctly in LiveCycle" ? I'm populating data dynamically. It does not matter if it's livecycle or not. I'm using custom ADM(Adobe Dialog Manager)  and dialog.load to populate data into list control.

Avatar

Level 2

Ok. maybe i wasn't  precise. I'm using javascript version of ADM(app.execDialog) not native(c++)..If Javascript version is also deprecated, what is alternative to create dialog box in pdf nowdays?

Avatar

Level 3

There is no ADM in JavaScript. You can create dialogs in JavaScript.

Avatar

Level 2

Really?

http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/acro7jsguide.pdf

Using Adobe Dialog Manager (ADM) in Acrobat JavaScript

I know, i can create dialog in js. I already created some ..see my orginal question. I've got problem with sorting items in list_box element in dialog box..

Avatar

Level 3

The document is about Acrobat 7. I can't see ADM in the documentation for Acrobat DC.

Avatar

Level 10

Hi there,

usually such objects in a dialog are sorted automatically...

here is some documentation you might want to see by yourself that may help you create the sorted list that you need.

http://www.pdfshareforms.com/how-to-create-nice-dialog-windows-in-pdf-form/

Adobe LiveCycle Designer Cookbooks by BR001: Using app.execDialog() in an Adobe Designer Form

These 2 links helped me a lot to create the dialogs with JavaScript

Avatar

Level 2

hi,

thank you for reply. But my problem is not to create Dialogbox. I've created several of them and they work just fine. My problem is sorting order of items in list_box control of dialog. When i use same dataprovider(as above) for xfa list control(choiceList) sorting order is fine. So my question was about some workaround here.

Avatar

Correct answer by
Level 2

Ok, I finally found solution[1]. Instead of populating items with dialog.load("LST1":myDataProvider), i call dialog.insertEntryInList on every item in my dataprovider and items are in correct order now.

1.

solution.png