Servoy 5.2.1

Replicated issue here using 5.1.4 and older version of Java/OSX. Restarting smart client or Servoy entirely doesn’t fix issue.

However, temporarily assigning the onDataChange() method to the onAction() event (assign method, save form, un-assign method, save form), the onDataChange() method starts working as expected with return/enter key.

I don’t have 5.2.1 loaded up yet if you want to try this on your end.

jmcneely:
I explicitly tested a very simple solution and verified that it is true for my environment. Nothing but a single field on a form with no table, and a method that did application.output(‘hello’). OnDataChange ran the script if you exited the field by clicking away with the mouse, but not with a return or enter keystroke.
OS X 10.6.4, java version “1.6.0_20”, servoy 5.2.1, smart client (web client works as hoped for).

Please file a support issue then, so we can investigate.

I did file a report now, thanks.

With the new security I saw that all the global variables modification done by authentication solution are not kept.
For example if I have a global variable “user_age” and I fill it during the authentication loop(in wich I can retrive the user info from db to evaluate the login),so after
the command “security.login()” ,when the main solution was been loaded,if I try to check the content of my global variable so I’ll find it equal to null.

flow:
globals variable named ‘UserInfo’

solution with type login:

.
.
security.authenticate('authSolution","authMethod",[user,pwd])
.
..

solution with type authentication:

globals.UserInfo = new Object()
globals.UserInfo.age = dataset.getValue(x,y)
globals.UserInfo.address  = dataset.getValue(x,y)
if(pwd == dataset.getValue(x,y))
security.login(user,user,['users'])
.
.

Main Solution:

application.output(globals.UserInfo.age)

//the result into the console is
null

offcourse if I try to inspect the variable ‘UserInfo’ into the authenticator solution with a break point the variable is filled correctly.

Is this normal? And if yes: does exist a way to don’t lose the informations kept into the authenticator solution (in this way I haven’t to retrive the info twice,one for the authentication and one for save the user information).

Hi Marco,

I would think that’s normal because the authenticator solution is launched in a separate client (as stated in another thread).

So the best way to communicate with your main solution is from you login module (which shares globals with you main solution), you can setup objects and methods in your authenticator solution and your login module can access these methods and retrieve a result using:

var resultObject = security.authenticate('authenticator_module', 'any_authenticator_method', [param1, param2, etc]);

Then using your resultObject, you can populate your globals the way you want.