On Nov 1, 2013, at 1:04 PM, Thomas Peters <[email protected]> wrote:
> thanks to both of you for your reply.
>
> The resultsList is an NSArray type casted to a Movie object. and has 5
> elements in the array.
> I have setMovie and getMovie accessor methods.
>
> I am trying to understand how to get the index of the selected element in the
> array. the WOHyperlink is inside the WORepetition… and I have 5 movies
> inside bases on the results of a fetch. The WOHyperlink has the movie title
> set for each in the ResultTitle. However, I am trying to understand how to
> pass the current object.
>
Its magic. You don't have to pull it out of the array with an index.
Results : WORepetition {
list = movieList;
item = movieItemInList;
}
ResultTitle : WOString {
value = movieItemInList.title;
}
MovieLink2 : WOHyperlink {
action = showDetails;
}
movieList your array, and movieItemInList is a Movie.
No index, not accessor methods for movieItemInList. It just works. You said
something about AJAX things, though.
public WOComponent showDetails() {
MovieDetails detailsPage = (MovieDetails)pageWithName("MovieDetails");
detailsPage.setMovie(movieItemInList);
return detailsPage;
}
I found maintaining and index in a repetition confusing and then found that I
don't need it.
> Thomas
>
>
>
> On Nov 1, 2013, at 8:41 AM, Theodore Petrosky <[email protected]> wrote:
>
>> Do you have accessors for 'movie'? setter and getter?
>>
>> I do this with an ajaxmodaldialogopener and it would not work without the
>> setter and getter.
>>
>> Ted
>>
>>
>>
>> --------------------------------------------
>> On Thu, 10/31/13, Thomas Peters <[email protected]> wrote:
>>
>> Subject: I am trying to create a WOHyperlink inside a WORepetition > null
>> target WOComponent
>> To: "WebObjects Development" <[email protected]>
>> Date: Thursday, October 31, 2013, 9:05 PM
>>
>> I have the following…
>> This should be working… the movie that is getting
>> passed to setMovie on the MovieDetails method is null.
>> The WOHyperLink id inside the WORepetition that is the
>> results list of movies. Typical demo... what am I
>> doing
>> wrong?___________________________ Main.woResults : WORepetition { list =
>> resultsList; item = movie; index = indexrt;}
>> ResultTitle :
>> WOString { value = movie.title;}
>> MovieLink2 :
>> WOHyperlink
>> { action = showDetails;}
>> ___________________________Main.html<snippet> <webobject name =
>> "Results">
>> <webobject name="MovieLink2"> <webobject name
>> =
>> "ResultTitle"
>> /> </webobject><br><br>
>> </webobject></snippet>
>> ___________________________Main.java<snippet> public WOComponent
>> showDetails() { MovieDetails detailsPage =
>> (MovieDetails)pageWithName("MovieDetails");
>> detailsPage.setMovie(movie); return detailsPage; }</snippet>
>>
>>
>>
>>
>> -----Inline Attachment Follows-----
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be
>> ignored.
>> Webobjects-dev mailing list ([email protected])
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/tedpet5%40yahoo.com
>>
>> This email sent to [email protected]
>>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/webobjects%40berkling.us
>
> This email sent to [email protected]
kib
Klaus Berkling
www.berkling.us | @kiberkli
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]