Fixed license list sorting
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/ckan-metadata-publisher-widget@129490 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
5ab2406ab2
commit
55331b3067
|
@ -330,13 +330,20 @@ public class CreateDatasetForm extends Composite{
|
||||||
|
|
||||||
licenseBean = lBean;
|
licenseBean = lBean;
|
||||||
|
|
||||||
// fill the listbox
|
// sort the list
|
||||||
for(String license: licenseBean.getLicenses()){
|
List<String> listOfNames = licenseBean.getLicenses();
|
||||||
|
Collections.sort(listOfNames);
|
||||||
|
|
||||||
licenseListbox.addItem(license);
|
|
||||||
|
// fill the listbox
|
||||||
|
for(int i = 0; i < listOfNames.size(); i++){
|
||||||
|
licenseListbox.addItem(listOfNames.get(i));
|
||||||
|
if(listOfNames.get(i).equals("Creative Commons Attribution"))
|
||||||
|
licenseListbox.setItemSelected(i, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// everything went ok
|
// everything went ok
|
||||||
setAlertBlock("", AlertType.ERROR, false);
|
setAlertBlock("", AlertType.ERROR, false);
|
||||||
continueButton.setEnabled(true);
|
continueButton.setEnabled(true);
|
||||||
|
|
Loading…
Reference in New Issue