Servoy 6.1 rc 3

Release notes for Servoy betas

Re: Servoy 6.1 rc 3

Postby john.allen » Fri Jun 15, 2012 2:45 am

Hi
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?
John Allen
Stanford University
john.allen
 
Posts: 515
Joined: Wed Jul 02, 2003 10:07 pm
Location: Stanford CA USA

Re: Servoy 6.1 rc 3

Postby sambit_cetmca07 » Fri Jun 15, 2012 9:05 am

Hi john,

/** @type {JSDataSet} disease_groups*/
var disease_groups = security.authenticate('CCDB_AuthSolution', 'GetDiseaseGroupsForUser', [remoteUser])


In your code you are expecting a "JSDataset" object in return, but in servoy 6.1 beta "authenticate" method returns a boolean value instead of any type object.
User avatar
sambit_cetmca07
 
Posts: 7
Joined: Tue Mar 27, 2012 1:53 pm

Re: Servoy 6.1 rc 3

Postby Jan Blok » Fri Jun 15, 2012 9:16 am

john.allen wrote:Wrapped java.lang.NumberFormatException: For input string: "BLADDER" (/Users/John/servoy_workspace6.1Oncology/CCDB_Login/globals.js#101)

Sounds like an issue, could you please file a case?
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Re: Servoy 6.1 rc 3

Postby john.allen » Fri Jun 15, 2012 5:19 pm

Thanks Jan. I logged it (https://support.servoy.com/browse/SVY-2465).

It has to do with how 6.1 is handling JSDataSets in conjunction with setValueListItems. Extracting the JSDataSet columns as arrays and using those to populate the valuelist works. So in my case...
Code: Select all
application.setValueListItems('cvl_login_dis_grps',disease_groups.getColumnAsArray(1),disease_groups.getColumnAsArray(2))

works fine.
John Allen
Stanford University
john.allen
 
Posts: 515
Joined: Wed Jul 02, 2003 10:07 pm
Location: Stanford CA USA

Previous

Return to Latest Releases

Who is online

Users browsing this forum: No registered users and 55 guests