• 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: email@hidden
  • Date: Thu, 18 Mar 2004 10:43:51 +0100

dear arturo,

thanks a lot.
to justify myself a little i have to say that i was misleaded by this tutorial:


http://www.macdevcenter.com/pub/a/mac/2003/09/26/webobjects.html

which uses a displaygroup for exactly this purpose.
and of course it is not mentioned that it does not really work.

anyway - thanks again.
tom

On 17.03.2004, at 20:39, arturo wrote:

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.






______________________________________________
thomas bauer - unix/macosx/server/development
http://macosunix.toolsatwork.com
ichat A/V: nanukcore (aim)
_______________________________________________
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.


References: 
 >NULL matching my displaygroup... (From: email@hidden)
 >Re: NULL matching my displaygroup... (From: arturo <email@hidden>)

  • Prev by Date: Re: State machines in WO
  • Next by Date: Re: [OT] Update Pulled?
  • Previous by thread: Re: NULL matching my displaygroup...
  • Next by thread: Errata for Ravi Mendis's "WebObjects Developer's Guide"?
  • Index(es):
    • Date
    • Thread