[SOLVED] Re: WOHyperlinks following recursive relationships in a component
[SOLVED] Re: WOHyperlinks following recursive relationships in a component
- Subject: [SOLVED] Re: WOHyperlinks following recursive relationships in a component
- From: David Holt <email@hidden>
- Date: Fri, 21 Jan 2005 10:27:26 -0800
It wasn't so hard after all. I have set up a different action for each hyperlink. Here is an example:
public DisplayImage toDisplayPreviousImage()
{
DisplayImage nextPage = (DisplayImage)pageWithName("DisplayImage");
// get related image
ProcessImage anImage = (ProcessImage)valueForKeyPath("anImage.prevImage");
// Initialize your component here
nextPage.setAProcessImage(anImage);
return nextPage;
}
Thanks,
David
--
Stare. It is the way to educate your eye, and more. Stare, pry, listen, eavesdrop. Die knowing something. You are not here long.
Walker Evans
<x-tad-smaller>from Sunbeams: http://www.thesunmagazine.org</x-tad-smaller>
On 21 Jan 2005, at 9:43 AM, David Holt wrote:
Hello,
I have a component that displays images called DisplayImage. It has WOhyperlinks to previous image, next image, parent image, and child images.
I created an instance of my image object called anImage and bound the WOString for the text of each hyperlink to follow the corresponding relationship (i.e. previous image is anImage.prevImage.image_name). Here is my code for the action binding on the hyperlinks:
public DisplayImage toDisplayImage()
{
DisplayImage nextPage = (DisplayImage)pageWithName("DisplayImage");
// Initialize your component here
nextPage.setAnImage(anImage);
return nextPage;
}
For the links that follow relationships, the link displays just the same image again instead of the related image. Is there a way to set up my WOHyperlinks so that they can pass the value of the related images? i.e. How do I pass the object that anImage.prevImage.Image_name points to to the DisplayImage page? Also, I wanted to call the same action from all of the WOHyperlinks because they all pass different Image objects to the same component. Is this possible, or do I have to call a separate action with each link?
Thanks,
David
_______________________________________________
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
_______________________________________________
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