I'm working on updating a solution from 5.2 to 6.1. I am using login/authentication which works fine in 5.2. However in 6.1 I have a problem with constructing a custom valuelist from a JSDataSet on authentication. The outputs from both are identical but when I use that dataset to construct my valuelist I'm getting a 'java.lang.NumberFormatException'. It seems it is expecting a number in 6.1 whereas in 5.2 it works fine.
- Code: Select all
function RemoteWebClientDeveloper(remoteUser) {
/** @type {JSDataSet} disease_groups*/
var disease_groups = security.authenticate('CCDB_AuthSolution', 'GetDiseaseGroupsForUser', [remoteUser])
application.output(disease_groups);
if(disease_groups) {
application.setValueListItems('cvl_login_dis_grps',disease_groups);
application.output(application.getValueListArray('cvl_login_dis_grps'))
The application.output for disease_groups is the same for 5.2 and 6.1, namely:
BufferedDataSet {Columnnames[DISEASE_GROUP_NAME, DISEASE_GROUP_ID, DEPARTMENT_ID, USER_ID]}
row_1[BLADDER, 1, 22, 1]
row_2[KIDNEY, 2, 22, 1]
The error I get in 6.1 when setting the valuelist is:
For input string: "BLADDER"
Wrapped java.lang.NumberFormatException: For input string: "BLADDER" (/Users/John/servoy_workspace6.1Oncology/CCDB_Login/globals.js#101)
at /Users/John/servoy_workspace6.1Oncology/CCDB_Login/globals.js:101 (RemoteWebClientDeveloper)
The form variable where the valuelist is used is a Number (1,2 in this example) but should display the text (BLADDER, KIDNEY). Again all works fine in 5.2 but not in 6.1
Has something changed with how custom valuelists are constructed or ordered in 6.1?