[SOLVED] Re: D2W & custom classes
[SOLVED] Re: D2W & custom classes
- Subject: [SOLVED] Re: D2W & custom classes
- From: Erwin <email@hidden>
- Date: Sun, 3 Apr 2005 08:42:23 +0200
Thanks
I created a Textfield component "D2WPassword" (partial) then using the Assistant
in my Member entity -> new Record -> Customize, I replaced the "credential" attribute with my D2WPassword component
as a D2WCustomComponent
public class D2WPassword extends WOComponent {
protected Member object;
protected String key;
public D2WPassword(WOContext context) { super(context); }
public String value(){ return (String) object.valueForKey(key); }
public void setValue(String value){ object.setPassword(value); }
}
so I can set the value credential value with setPassword() in my Member entity
public void setPassword(String password){
takeStoredValueForKey(transformString(password, Cipher.ENCRYPT_MODE),"credential");
}
I don't kwow if it's the best way to do it.. but it runs ....
Erwin
Le Apr 2, 2005, à 7:47 PM, Anjo Krank a écrit :
Am 02.04.2005 um 12:04 schrieb Erwin:
In the EOModel SiteUser entity I have the credential field which is calculated by setPassword() from a password string
In D2W , I access the credential field but I would like to enter a password string and set the credential field automatically is it possible to do it in D2W ? I am not very friendly with DTW so any hint will be welcome
I don't really understand your problem, but anyway: if you have a setter setPassword() then you also need a getPassword() or password(). Also, you might check out the ER*Password components to get shielded entry of the passwords from your user.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden