Re: DirectAction to a Primary Key
Re: DirectAction to a Primary Key
- Subject: Re: DirectAction to a Primary Key
- From: David LeBer <email@hidden>
- Date: Tue, 11 Oct 2005 10:18:32 -0400
On 11-Oct-05, at 9:59 AM, Dev WO wrote:
Hi list,
I'm actually working on a small "news headline" application.
I have a component with the last x items displayed in list view,
then clicking on one displays this one with all its details.
I need some external pages to be able to provide a link to a
specific item and provide my component with the detailed view
directly.
I think I'll be able to change the conditional value in the direct
action using
nextpage.setConditionnal(new Boolean(true))
but I don't know how to get the correct item using it's primary key...
After some searching, I have found the following method
EOUtilities.primaryKeyForObject
but I couldn't make this DA works:(
EOUtilities.primaryKeyForObject will give you an EO's primary key.
You want to go the other way, get an EO for a given primary key,
correct?
Take a look at EOUtilities.objectWithPrimaryKeyValue(ec,
"MyEntityName", requestedPK) (or EOUtilities.objectWithPrimaryKey if
you have a complex PK).
--
;david
--
David LeBer
"I am codeferous!"
Codeferous Software
site: http://www.codeferous.com
blog: http://david.codeferous.com
_______________________________________________
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