Darn DG login page!
Darn DG login page!
- Subject: Darn DG login page!
- From: Jeremy Matthews <email@hidden>
- Date: Fri, 05 Nov 2004 14:07:21 -0500
Ok,
I have an Entity "MemberData", that stores user ID's ("idKey") passwords ("idPassword"); privilege level ("statusLevel") in a separate entity "MemberDataRel" that is accessed through a to-One relationship in MemberData. Initially, I create a user with the same id and password "admin" in the DB, so there is something (initially) to compare against until other users are created. I'm using a DG to query entries against a field for ID and Password. Everything is mapped correctly, but the code is not working....can't see why yet...but the hours are long.
Here is the fetch specification I drew in the Entity (and selected) for the "loginDG" DG I created. I'm thinking this is unecessary anyways?
((idKey = $idKey) and (idPassword = $idPassword))
And the test Code:
public WOComponent submitLoginInfo()
{
String loginId;
String loginPassword;
loginId = (String) userDictionary.valueForKey(loginDG.queryMatch.idKey);
loginPassword = (String) userDictionary.valueForKey(loginDG.queryMatch.idPassword);
if {
(
(loginPassword != null && loginPassword.equals(MemberData.idPassword))
&&
(loginId != null && loginId.equals(MemberData.idKey))
)
System.out.println("correct");
}
else {
System.out.println("incorrect");
}
return null;
}
Ideas? I'm thinking my keys are in the wrong place...
-jeremy
_______________________________________________
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