• 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: many-to-many design question.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: many-to-many design question.


  • Subject: Re: many-to-many design question.
  • From: "Jonathan Fleming" <email@hidden>
  • Date: Tue, 10 Aug 2004 14:30:51 +0100

Can't you somehow link the null value to the ID of metrics they selected so you know where it's coming from or maybe catch an exception if they select your value of --none selected--

try something like this in your method

myVar = request().stringFormValueForKey("myVar");
try {
if ( myVar.equals("--none selected--")) {
return myExceptionMethod() /*whatever/wherever this maybe*/;
}
}
catch (NullPointerException ex) {
myExceptionMsg = "You Cannot Select This"
return context().page()
}



From: James Cicenia <email@hidden>
To: "Jonathan Fleming" <email@hidden>
CC: email@hidden
Subject: Re: many-to-many design question.
Date: Tue, 10 Aug 2004 08:06:59 -0500

Because a null value is acceptable.. which I label as --none selected--.

It is a bit tricky because I have to display the metrics in a repeating array and then display the popup next to each one.
Everything works great unless they select --none selected-- which nulls out the value so I can't tell which one it originally was linked to.


Maybe my design is wrong. Maybe might intermediate table should have three columns in it. Just wondering what anyone else has done with this list of list issue.

-James

On Aug 10, 2004, at 7:56 AM, Jonathan Fleming wrote:

I don't really understand what you are going on about here but why can't you simply exclude null values in the popup and they won't get selected and thus create your problem.

Regards
Jonathan :^)


From: James Cicenia <email@hidden>
To: WebObjects (Group) <email@hidden>
Subject: many-to-many design question.
Date: Tue, 10 Aug 2004 07:47:31 -0500

Hello -

I have a pattern where I have a list of lists. These are called metrics and their possible values metricValues.

I want to assign a value for each metric to a project. This means that I have to dynamically show the metric list and then allow the user to select one value for each of the metric's list of values. I had originally created a many-to-many relationship to the metricsValue since that would be theoretically enough as I could always get the selected values metric. My problem occurs when the user selects a null value in the popup. Now I don't have a way to find its parent metric anymore.

How do others handle this list of list with a relationship design problem?

Thanks again,
James Cicenia
_______________________________________________
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.



_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger




_________________________________________________________________ Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo _______________________________________________ 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.


  • Prev by Date: Re: many-to-many design question.
  • Next by Date: Access NSDictionary-Keys in Repetition
  • Previous by thread: Re: many-to-many design question.
  • Next by thread: Access NSDictionary-Keys in Repetition
  • Index(es):
    • Date
    • Thread