• 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: Multiple Relationships and list boxes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple Relationships and list boxes


  • Subject: Re: Multiple Relationships and list boxes
  • From: Jonathan Rochkind <email@hidden>
  • Date: Wed, 21 May 2003 16:29:46 -0500

At 01:39 PM 5/21/2003 +0100, Edwin Smith wrote:
So you have the following

Bug -> Comments -> Priority

I want to create a way of clicking on a bug and you get the list of
comments (this I can do) but then instead of displaying the priority ID in a text field use the relationship to display the actual name of the severity.

I don't completely understand what you are trying to do, but it should work with no problems. Bug has a to-many relationship to Comments, which has a to-one relationship to Priority, right? [Incidentally, naming entities in the plural is confusing. I'd call the entity Comment, since each instance of it represents one Comment. Call the relationship 'comments' if you like though].


But I'd make a WORepetition with a list of 'someBug.comments' and an item bound to a Comments type variable, let's call it 'iComment'. Now, assuming Priority has an attribute 'severity' defined as String... inside the repetition, you should be able to bind a WOString to something like 'iComment.priority.severity', and it should work fine.

One thing though: You say you are displaying the priorityID right now. Do you mean the primary key of the priority object? If so, that means you've marked the priorityID pk attribute of Priority as a class property. While I can't see how that would cause any problems with what you're talking about, normally it's much better to avoid this, and not mark the pk as a class property. If you really need the pk exposed, there are ways to get it without it being a class property, but you should rarely really need it.

At the moment using Java 1.4.1 I cannot get any listboxes to work at all is this a bug with WO and java 1.4?

It's possible. WO is not officially supported for Java 1.4, and it's known that there are problems with it. I would reccomend against using 1.4 unless you want to be on the edge.


(Also any comments on where to find some good documentation on application building would be good as the Apple supplied manual is a little sparse. )

Have you looked at: http://developer.apple.com/techpubs/webobjects/Web_Applications/index.html

I think it's actually quite good. I don't know if this is the same manual you are calling sparse or not though. But it should show you how to do things like you are asking above.

There are also some third-party books on WO available now, I've heard a couple of them are quite good, but haven't looked at them yet myself.

--Jonathan


Thanks Edwin
_______________________________________________
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.
_______________________________________________
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: 
 >Multiple Relationships and list boxes (From: Edwin Smith <email@hidden>)

  • Prev by Date: Multiple Relationships and list boxes
  • Next by Date: Mixing Static and Dynamic UI Problem
  • Previous by thread: Multiple Relationships and list boxes
  • Next by thread: Mixing Static and Dynamic UI Problem
  • Index(es):
    • Date
    • Thread