Re: Obtaining the elementID
Re: Obtaining the elementID
- Subject: Re: Obtaining the elementID
- From: Chuck Hill <email@hidden>
- Date: Mon, 24 Oct 2005 15:43:44 -0700
On Oct 24, 2005, at 3:33 PM, Miguel Arroz wrote:
Hi!
I'm trying some AJAX stuff, and I need to work with the element
IDs of the objects. While building the page, i just ask the context
what is the current elementID(). But how do I do the reverse
operation? How can I ask the context what is the object associated
with some ID?
Short answer: can't.
Slightly longer answer: while there might be some way, deep down in
private API, I've never seen it. This is not how WO works. During
the invokeAction phase the tree of elements is traversed, and
invokeAction is called on each one. Each element can do
(a) nothing
(b) whatever it pleases :-)
(c) check and see if the action is for it:
if (url.elementId == context.elementId) {
// Yippee, it's for me!
}
You can also check url.elementId.startsWith(context.elementId) to see
if the action is for one of your child elements.
Chuck
--
Coming in 2006 - an introduction to web applications using WebObjects
and Xcode http://www.global-village.net/wointro
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
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