• 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: Ajaxautocomplete to one relationship
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ajaxautocomplete to one relationship


  • Subject: Re: Ajaxautocomplete to one relationship
  • From: Mark Wardle <email@hidden>
  • Date: Thu, 1 Oct 2009 19:44:59 +0100

Thanks David. I guess there is an inherent lack of genericity here.

-- Dr. Mark Wardle
Specialist registrar, Neurology
(Sent from my mobile)



On 29 Sep 2009, at 20:42, David LeBer <email@hidden> wrote:



On 2009-09-29, at 3:07 PM, Mark Wardle wrote:

Hi all.

I'm successfully using ajaxautocomplete but that results in a string.
Fine for subsequent searching. Is there a unified component that will
handle setting a to one relationship with a drop down populated by
autocomplete?

Otherwise I'll see whether I can roll my own!

We have one, unfortunately it's implementation is pretty specific for the project it's used in and not really suitable for sharing:


1. It is D2W and tuned for our look.
2. It makes assumptions about the model (yes, I know, that is bad).

The issue with using a autocomplete to do a lookup for a to-one relationship is that, as you mention, the autocomplete returns a string. You need to then guarantee that the attribute you are qualifying the found EO against is unique. For some EOs this is a non issue (qualifying countryName in the array of Country EOs). For EOs where this is not the case (productName in the array of Product EOs) we achieve this by appending a guaranteed unique value (i.e: productCode) to the the primary search attribute.

;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site:    http://codeferous.com
blog:    http://davidleber.net
profile:    http://www.linkedin.com/in/davidleber
twitter:    http://twitter.com/rebeld
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org




_______________________________________________
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


  • Prev by Date: Re: WOLips and html formatting
  • Next by Date: Re: WOLips and html formatting
  • Previous by thread: Re: WOLips and html formatting
  • Next by thread: Re: Error when extending from ERXAjaxApplication
  • Index(es):
    • Date
    • Thread