Hi,

How does it supposed to work? That passwordtextfield encryption.?
What  are we expecting?

When i looked at the code quickly i did see that getModelValue and setModelValue where implemented
to crypt and decrypt the stuff.

getModelValue is used to render the value for a formcomponent
setModelValue is used to set the value back to the model from the input.

At least that is normally the case.... With the passwordtextfield. getModelValue is called once when it
is in the onComponentTag method of the TextField. But it is then completely overridden again in the
onComponentTag of the PasswordTextField itself (with "" or getModelObjectAsString, depending on the boolean resetpassword)

setModelValue isn't used much anymore because what was previously there is now gone to convertInput and used
in the convert phase when a form gets submitted.

So the question is what is the encrypt for? When it is used?
If resetPassword == true then we output always ""
But what to do if resetPassword == false? Should we then output the model data encrypted?
And decrypt it in the convertphase? What i think this was meant to happen when looking at the code.

But what happens if a user types in a password. And then submits? Then we it is tried to decrypt
but that isn't encrypted at that time. Does the decrypt know that it is not a encrypted string?

johan


Reply via email to