Re: [Newbie] WOHyperlinks with Id
Re: [Newbie] WOHyperlinks with Id
- Subject: Re: [Newbie] WOHyperlinks with Id
- From: "Goh Keng Boon" <email@hidden>
- Date: Tue, 27 Apr 2004 10:49:44 +0800 (SGT)
You can try create an action, bind it to the hyperlink. Then pass the
whole object that contains theheadline to the next page(in your case is a null). Use a
to-many-relationship to retrieve all therelated news from database(if you have one). In this case, you no need to
pass the headline id likethe same old way.
> The way I'd do it is:
>
> a) In the WOHyperlink, add a new binding called newsId. (Right-click on
> the bindings view)
> b) Bind newsId to something specific to the news item in the
> WORepetition so you can identify it, ie in worst case scenario, use the
> news item's PK.
> c) Use WORequest's (available through WOComoponent's
> context().request()) formValueForKey(String key) or
> stringFormValueForKey(String key) methods to access the value for
> newsId.
>
>
> On 27/04/2004, at 10:32, 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.
>>
>> Thanks for any help with this!
>>
>> -Lucas Haley
>> _______________________________________________
>> 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.
>>
>>
>
> Marek Wawrzyczny
>
> software engineer
> -------------------------->
> ish group pty ltd
> 7 Darghan St Glebe 2037 Australia
> phone +61 2 9660 1400 fax +61 2 9660 7400
> http www.ish.com.au | email email@hidden
> _______________________________________________
> 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.
_______________________________________________
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.