• 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: A tough many-to-many problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A tough many-to-many problem


  • Subject: Re: A tough many-to-many problem
  • From: Deirdre Saoirse Moen <email@hidden>
  • Date: Sun, 28 Mar 2004 11:36:05 -0800

On Mar 27, 2004, at 3:31 PM, James Cicenia wrote:

Hello -

I have the following scheme:

Portfolio --->> Metrics --->> MetricsList

I have also:

Project --->> MetricListValue <<--- MetricsList

I used the EOModeler to make it a many-2-many from Project to MetricList.

OK now the hard part for me that is...

I want to display on my edit screen all the "Metrics" in column A, with a popup of the MetricsList in column B

I then need to take the value from the popup in the MetricsList column B to make my many-to-many.

The display works great... the repetition of Metrics show up with the corresponding popup showing only its metrics list values.

How do I bind/insert into my project this linkage?

Something that I've used, though it's not a popup, but it may help you figure out how to approach your problem:


http://www.stepwise.com/Articles/Technical/Many2Many2/2002-09-09.01.html

I made the following modifications when I used it, to add a qualifier key:

In my equivalent of selectStudio (found in Main.java in the example project)
nextPage.setQualifierKey("coming = 2");


In the WOComponent:
	protected String _qualifierKey;

public String destinationDisplayKey() {
return _destinationDisplayKey;
}
public void setDestinationDisplayKey(String newDestinationDisplayKey) {
_destinationDisplayKey = newDestinationDisplayKey;
}


And a new method definition for allArray:

    public NSArray allArray() {
		NSMutableArray args = new NSMutableArray();

        if (_allArray == null) {

String destinationEntityName =
sourceObject().classDescriptionForDestinationKey(relationshipKey()).enti tyName();

if (_qualifierKey.length() > 0)
{
args.addObject(_qualifierKey);
_allArray = EOUtilities.objectsWithQualifierFormat
(sourceObject().editingContext(), destinationEntityName,
_qualifierKey, new NSArray());
}
else
{
_allArray = EOUtilities.objectsForEntityNamed
(sourceObject().editingContext(), destinationEntityName);
}
}
return _allArray;
}


--
_Deirdre http://deirdre.net
"Cannot run out of time. There is infinite time. You are finite. Zathras is finite. This....is wrong tool." -- Zathras
_______________________________________________
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: 
 >A tough many-to-many problem (From: James Cicenia <email@hidden>)

  • Prev by Date: Re: Dynamic Template used for Generation of Page
  • Next by Date: Re: HELP: Problem using WebServices Assistant
  • Previous by thread: A tough many-to-many problem
  • Next by thread: New WebObjects 15 Minute Tutorial in Quicktime
  • Index(es):
    • Date
    • Thread