• 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: WODisplayGroup filter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WODisplayGroup filter


  • Subject: Re: WODisplayGroup filter
  • From: Robert Walker <email@hidden>
  • Date: Sat, 4 Mar 2006 03:47:09 -0500

Jim,

If oppID is a primary or foreign key in your database then you shouldn't really be thinking about it at all.  In fact it really shouldn't even be marked as a class property in your entity.

Assuming that oppID is a foreign key in your customer entity, then you should have a to-one relationship in your model from Customer --> OpportunityCompany.  Then you would qualify your fetch using the relationship.

You could do something like:

// Get the opportunity company to match against.
//
// There are many ways you could get this.  I'm just showing how to get the company
// using its primary key value to demonstrate the example you gave.
//
// You could get this using a popup list, say in a query form, or any number of
// other ways.  The point here is that you are qualifying using a reference to an
// OpportunityCompany object not the actual database foreign key.
try {
OpportunityCompany aCompany =
(OpportunityCompany)EOUtilities
.objectWithPrimaryKeyValue(ec, "OpportunityCompany", new Integer(15));

// Setup the query match used to qualify your data source.
selectedCustomDisplayGroup.queryMatch().takeValueForKey(aCompany, "opportunityCompany");
selectedCustomDisplayGroup.qualifyDataSource();
} catch (Exception e) {
// do the necessary exception handling
}
--
Robert Walker
email@hidden

There are 10 types of people in the world, those who count in binary, and those who don't.


On Mar 4, 2006, at 2:46 AM, Jim Wong wrote:

Hi:

i understand that when a component loads, to display all items of the DisplayGroup, we can use 
selectedCustomerDisplayGroup.qualifyDataSource();

But what if i only want to display a rows only with the key oppID=15?
oppID is an attribute of the opportunityCompany, which is this Display Group. 

 _______________________________________________
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

References: 
 >WODisplayGroup filter (From: Jim Wong <email@hidden>)

  • Prev by Date: WODisplayGroup filter
  • Next by Date: how to set value?
  • Previous by thread: WODisplayGroup filter
  • Next by thread: how to set value?
  • Index(es):
    • Date
    • Thread