• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NULL matching my displaygroup...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NULL matching my displaygroup...


  • Subject: Re: NULL matching my displaygroup...
  • From: arturo <email@hidden>
  • Date: Wed, 17 Mar 2004 14:39:05 -0500

Well, WODisplaygroups are not really intended for this sort of thing.
They're mostly intended for creating user-oriented query pages (i.e. ad-hoc
querying) and results pagination.  You'd be better off using

    EOUtilities.objectMatchingValues()

for such a simple lookup.  Some sample pseudo-code
        NSMutableDictionary up = new NSMutableDictionary();
        up.setObjectForKey(u, "username");
        up.setObjectForKey(p, "password");

        EOEnterpriseObject u =
EOUtilities.objectMatchingValues(session().defaultEditingContext(),
                "UserObject", up);

This will throw an exception if there is no exactly matching object, IIRC.


----- Original Message -----
From: <email@hidden>
To: <email@hidden>
Sent: Wednesday, March 17, 2004 2:10 PM
Subject: NULL matching my displaygroup...


> hi!
>
> i am new to webobjects - sorry if this question is simple - but
> i did not find anything in the documentation or on the web that helped
> me.
>
> i have a table in a mysql database that contains usernames and passwords
> as CHAR.
> i would like to use this for a login page.
> i use a WODisplaygroup an connect username and password textfields
> to the querymatches of the displaygroup like shown in many examples.
> however, not only correct combinations of usernames and passwords
> lead to matches after a qualifydatasource!
> if one or both textfields are empty (null) they will match as well.
> both fields empty matches EVERY entry in my table.
> correct username but empty password matches the ENTRY with the matching
> username.
> not very good ;-)
> wrong passwords or usernames lead to no matches as it should be.
> i even used:
>
> usersDisplayGroup.queryOperator().takeValueForKey("=", "username");
> usersDisplayGroup.queryOperator().takeValueForKey("=", "password");
>
> because otherwhise parts of passwords (tom instead of tomtom) would
> also match.
>
> i found no way to prevent empty textfields - nor a way to change the
> qualifier
> to NOT match nulls.
> is this a mysql problem or is there something i missed?
> how can i configure this so that only correct username/password
> combinations generate a match?
>
> thanks and regards
> WONewbie thomas= new WONewbie("thomas"); ;-)))))
> _______________________________________________
> webobjects-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: NULL matching my displaygroup...
      • From: email@hidden
References: 
 >NULL matching my displaygroup... (From: email@hidden)

  • Prev by Date: Re: 5.2.3 Boolean Bugs?????
  • Next by Date: Re: (Non-Direct) JavaClient using JBuilder or Eclipse or ... (for a WO app)
  • Previous by thread: NULL matching my displaygroup...
  • Next by thread: Re: NULL matching my displaygroup...
  • Index(es):
    • Date
    • Thread