• 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: [Newbie] WOHyperlinks with Id
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Newbie] WOHyperlinks with Id


  • Subject: Re: [Newbie] WOHyperlinks with Id
  • From: Arturo PĂ©rez <email@hidden>
  • Date: Mon, 26 Apr 2004 21:26:52 -0400

On Apr 26, 2004, at 8:32 PM, Lucas Haley wrote:

Hello again --

I have a WORepetition in a table set up, listing off dates and headlines for a news archive. I would like to have each headline be a hyperlink to reload the current page with the related news item content. The way I figure it is that I would need to make each WOString headline be contained in a WOHyperlink. This would then be bound to an action that sets a key, and returns null. But I have yet to get into the WebObjects mindset, and don't know how to get the newsId key from the WORepetition and into the next page.

I always do this sort of thing with component actions. So you have an array newsList and an iterator variable called newsItem. You put a WOHyperlink where you want it and bind the action to the following action:


		public WOComponent gotoNewsItem() {
			WOComponent nextPage = pageWithName("newsItemPage")l
			nextPage.takeValueForKey(newsItem, "newsItem");
			return nextPage;
		}

This assumes that there's a public getter/setter or ivar on the next page to receive the value for newsItem.
----
WO in philadelphia - wanna cheesesteak with that?
Please visit webobjects.meetup.com.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.



References: 
 >[Newbie] WOHyperlinks with Id (From: Lucas Haley <email@hidden>)

  • Prev by Date: Re: database slowness weirdness
  • Next by Date: Re: database slowness weirdness
  • Previous by thread: Re: [Newbie] WOHyperlinks with Id
  • Next by thread: Re: [Newbie] WOHyperlinks with Id
  • Index(es):
    • Date
    • Thread