• 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
[Newbie] Using FetchSpecs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Newbie] Using FetchSpecs


  • Subject: [Newbie] Using FetchSpecs
  • From: Lucas Haley <email@hidden>
  • Date: Fri, 30 Apr 2004 14:57:55 -0700

Heya all --

So I've been trying to use fetch specs with bound qualifier variables,
and I'm a little stuck. I've created a fetchSpec in EOModeler, and used
two variables $username and $password. I then dragged the fetchSpec
into WebObjects Builder (a very undocumented feature), and bound the
variables to the values of two WOTextEdit fields.

I guess my question now is whether I need to get a new fetchSpec, as in
the code below, or if I just use the  WODisplayGroup created when I
dragged the fetchSpec into Builder.

Thanks for any help!

- Lucas Haley

     public WOComponent submit()
     {
		EOModelGroup modelGroup = EOModelGroup.defaultGroup();
		EOFetchSpecification loginFetch;
		NSArray results;
		EOEditingContext ec = session().defaultEditingContext();
		// check if both username and password fields have values

		// query the db for the member
			loginFetch = modelGroup.fetchSpecificationNamed("login",
"D20members");
			results = ec.objectsWithFetchSpecification(loginFetch);
		// set the session member
			aMember = (D20members)results.objectAtIndex(0);
			session.setMember(getAMember());
		// return the same page
         return null;
     }
_______________________________________________
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: [Newbie] Using FetchSpecs
      • From: Arturo PĂ©rez <email@hidden>
  • Prev by Date: Re: automated testing of site
  • Next by Date: Re: [Newbie] MySQL "PASSWORD" in WO?
  • Previous by thread: Re: [Newbie] MySQL "PASSWORD" in WO?
  • Next by thread: Re: [Newbie] Using FetchSpecs
  • Index(es):
    • Date
    • Thread