Referencing Boolean/WOConditional Values
Referencing Boolean/WOConditional Values
- Subject: Referencing Boolean/WOConditional Values
- From: Jeremy Matthews <email@hidden>
- Date: Fri, 3 Dec 2004 11:39:15 -0500
Ok, I'm having a little logic trouble here. If I have two independent WOConditionals, and I want a third that is dependent upon their results, what is the most efficient way to construct it? I can think of a few (not-so-great) ways, but I'd like to get opinions.
Let's say I have a login screen, with "username" and "password". There are Strings in another location wrapped by WOConditionals. If the ID fails, it sends one message. Should the password fail, there is a second. And should both fail, there is a third.
The logic for the conditionals (supplied earlier):
public boolean passwordLoginErrorFlag()
{
if ((password == null) || (password.length() == 0)) {
return true;
} else {
return false;
}
}
// the logic for the usernameLoginErrorFlag is the same for this example
Now I can simply copy the logic from the if statements under each woconditional, but surely there is a way to reference them...
Suggestions?
Thanks,
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