-
Notifications
You must be signed in to change notification settings - Fork 476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alphabetical sort of dataset templates in pull-down menu #4848
Comments
This is what I was talking about during the standup:
This converter is implemented as this java class: src/main/java/edu/harvard/iq/dataverse/TemplateConverter.java I suspect that, because it uses the database id of the template, PrimeFaces ends up re-sorting the list automatically by that numeric id (??). (once again, the issue is that even though Ben forces Collections.sort(...) on the list of templates, the order never changes...) |
I made a custom sorter that alphabetizes templates, but it is very inefficient. Even if I made it more efficient, I'm not sure if we want to add a custom sorter to our source code. If someone can figure out why the following line doesn't work, that would be ideal.
|
Very strange. And here's an even weirder thing. It's not ordering them by template.id The ordering seems to be related to which one was updated most recently. Whenever you create a dataset with a template we increment a usage count. As near as I can tell if I use a template, the next time I go to create a dataset the most recently used template is pushed to the bottom of the list. And this is even after I try to sort the Collection. |
It looks like the problem was due to the ArrayList being passed back via |
For user convenience, please apply alphabetical sort of dataset templates in pull-down menus; cf. screenshot:
Best,
Philipp (DataverseNO)
The text was updated successfully, but these errors were encountered: