• 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: Custom Dynamic Element: get keyPath?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom Dynamic Element: get keyPath?


  • Subject: Re: Custom Dynamic Element: get keyPath?
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 25 Jul 2005 14:22:22 -0700

What does association.keyPath() return? I'm looking at the 5.3 docs here... Are you using Java or Obj-C?


Chuck


On Jul 25, 2005, at 1:42 PM, Dana Kashubeck wrote:

Okay, I'm probably missing something fundamental here. First off, I'm using WebObjects 4.5.1, which may or may not be relevant.

What I've done was create a custom Dynamic Element (RRSXTextField). It basically reimplements WOTextField with a few extras that we've been wanting.

Obviously, I run values through formatters if necessary. If the value does not validate, I call validationFailedWithException:value:keyPath: on the page. I create my own exception, which is passed to the method, and pass the bad entry as the value. The problem is, I'm not sure how to get the correct value for keyPath. I see no way to get the keyPath from the WOAssociation or any other object. Right now I pass the field's name for keyPath, but I know this is incorrect. Is there any way to find out what the keyPath is from the WOAssociation?

For instance, with a WOTextField if I have an ivar named fieldName bound to value and the string "testField" bound to name, in the validationFailedWithException:value:keyPath method for the page, keyPath will return fieldName. If I use my custom component, I can only return "testField" for the keyPath. I'd like to be able to return fieldName -- the name of the ivar.

--
-------------------------------------
Dana Kashubeck
Systems Manager
Riemer Reporting Service Inc.
http://www.riemer.com

Phone: 440-835-2477 x. 125
Fax:   440-835-4594
-------------------------------------


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net


This email sent to email@hidden

--
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________ 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
  • Follow-Ups:
    • Re: Custom Dynamic Element: get keyPath?
      • From: Dana Kashubeck <email@hidden>
    • Re: Custom Dynamic Element: get keyPath?
      • From: Dana Kashubeck <email@hidden>
References: 
 >Custom Dynamic Element: get keyPath? (From: Dana Kashubeck <email@hidden>)

  • Prev by Date: Re: WireHose?
  • Next by Date: Getting EOF to use multiple DBConnections?
  • Previous by thread: Custom Dynamic Element: get keyPath?
  • Next by thread: Re: Custom Dynamic Element: get keyPath?
  • Index(es):
    • Date
    • Thread