getting string value from password field


I am trying to test a password that is being submitted through a NodeDialog.
Within the NodeDialog I do the following:

final SettingsModelString SMSpwd = Novoalign2_03NodeModel.createPassword();

DCPFpwd = new DialogComponentPasswordField(SMSpwd, “Enter a password:”,8);

Then within the actionPerformed functionality I do:
String user = SMSuser.getStringValue();
String pwd = SMSpwd.getStringValue();

Unfortunately, pwd doesn’t get set with the current value whereas user does get set correctly.
What am I doing wrong?



Hi Bernd,
The settings model isn’t kept in synch with the entered password. (Probably to minimize exposure of the password.)
I don’t have a good workaround, as the component class is final.
You may want to create your own component, copy the code from the password component and allow access to the password text field.

  • Peter

It is fixed in the next release.

  • P.