• 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: non-linear worepetition
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: non-linear worepetition


  • Subject: Re: non-linear worepetition
  • From: Michael Engelhart <email@hidden>
  • Date: Fri, 13 Aug 2004 13:00:55 -0500

The more I think about this the more confused I get. Even if I create the column listing across the row as a WORepetition walking through an array of keys, won't my currentFoo get clobbered every time through the outer loop? Does WO keep track of outer/inner loops like that?

Mike
On Aug 13, 2004, at 11:19 AM, Michael Engelhart wrote:

Hi Arturo

Well the inner loop isn't actually a WORepetition. I didn't explain that well in my original post.
I manually pull out each columns value for each row repetition by a key. The columns for each row are a HashMap and the keys are predetermined (say key1, key2, key3) but in that example, key2 may not have a value so I have to call it and then if it returns null I have to put an empty table cell.


So the output could and often is like this:

key1 key2 key3 key 4
---------------------------------------------------
name_key1 | obj1 obj2 obj3 obj4
name_key2 | obj1 obj3 obj4
name_key3 | obj1 obj3



Does that make sense?

Thanks for your help

Mike
On Aug 13, 2004, at 9:56 AM, Arturo Perez wrote:

Michael Engelhart wrote:
So my question is how to best generate a WOHyperlink in each cell that points to the object that is referenced by that cells key.

Hi Mike,

Isn't it just the standard repetition thing? You'd need two repetitions, one to iterate across rows and the other to iterate down columns. The second one has an item variable called currentFoo. You can bind that to a hyperlink action method.

 public WOComponent fooAction {
       // Object currentFoo set by repetition.

	currentFoo.manipulate()
	WOComponent woc = pageWithName("updateFoo");
	woc.takeValueForKey(currentFoo, "theFoo");
	return woc;
   }

I think that's what you're asking.
-arturo
_______________________________________________
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.


  • Follow-Ups:
    • Re: non-linear worepetition
      • From: "Arturo Perez" <email@hidden>
References: 
 >non-linear worepetition (From: Michael Engelhart <email@hidden>)
 >Re: non-linear worepetition (From: "Arturo Perez" <email@hidden>)
 >Re: non-linear worepetition (From: Michael Engelhart <email@hidden>)

  • Prev by Date: WO blocking/threading question
  • Next by Date: Re: Modeling Many-to-Many with EOModeler
  • Previous by thread: Re: non-linear worepetition
  • Next by thread: Re: non-linear worepetition
  • Index(es):
    • Date
    • Thread