|
I have written a java method which is returning a string. In the simple-method I'm calling this java method using the tag call-class-method which is given below.
<call-class-method class-name="org.ofbiz.common.login.LoginServices" method-name="passwordEncryption" ret-field="paswrd"> <field field="userLoginContext.currentPassword" type="??????????????"/> <set value="paswrd" field="newDealerLogin.currentPassword"/> </call-class-method>
The field tag above where field="userLoginContext.currentPassword" is the value of a field which I'm fetching from the ftl. Then I am encrypting it using java and returning the encrypted password/string . Now the arguments which I have to send to the java method ,which is a string, is "userLoginContext.currentPassword" for encryption. But the type is what I cannot understand to give.
I have tried using GenericValue. It's not working.
The java method which is being called is public static String passwordEncryption(String currentPassword).
the code is given below.
public static String passwordEncryption(String currentPassword)
{
String encryptedPassword=null;
encryptedPassword= HashCrypt.getDigestHash(currentPassword, getHashType());
Debug.log("encryptedPassword exist======>"+encryptedPassword);
return encryptedPassword;
}
If anyone finds the solution to this as soon as possible will be very helpful for me.
|