• 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: A method only refered to in the wod-file is called during invokeAction
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A method only refered to in the wod-file is called during invokeAction


  • Subject: Re: A method only refered to in the wod-file is called during invokeAction
  • From: Kaj Hejer <email@hidden>
  • Date: Tue, 10 May 2005 21:35:10 +0200


On 10. mai 2005, at 17.35, Chuck Hill wrote:

But... this method is also called during invokeAction when I click a link in the WORepetition that iterate over this array.


Yes, of course it is. The entire template is evaluated, with full binding synchronization, at each of the three phases takeValues, invokeAction, appendToResponse. takeValues is skipped if there is no form submitted. See pages 201 to 207 in "the book" :-) for more details.



Ofcource... :) My mind just wasn't thinking about that this also goes for all dynamic element, not just subcomponents.


btw: I have "The Book" at work, but I will take a look there tomorrow. "The Book" lives together with the other "must have" books I have like "The Green Book" ("Planning Extreme Programming", <http:// www.amazon.com/exec/obidos/ASIN/0201710919>)



The link is bound to a method where the currentItem for the repetition is accessed like

  public WOComponent doMyStuffWithCurrent() {
    ...
    nextPage.setSelectedIdem(currentItem);
    return nextPage;
  }



A cardinal rule of methods called for binding synchronization is "Thou shalt not have side effects".

:) The only sideeffecr from our getMyListElements is that is takes some time to fetch the stuff from the database. I guess the solution here is to just cache the array so we don't have to fetch it more than once...




-Kaj :)



_______________________________________________
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


  • Follow-Ups:
    • Re: A method only refered to in the wod-file is called during invokeAction
      • From: Chuck Hill <email@hidden>
References: 
 >A method only refered to in the wod-file is called during invokeAction (From: Kaj Hejer <email@hidden>)
 >Re: A method only refered to in the wod-file is called during invokeAction (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Question about Html?
  • Next by Date: Re: A method only refered to in the wod-file is called during invokeAction
  • Previous by thread: Re: A method only refered to in the wod-file is called during invokeAction
  • Next by thread: Re: A method only refered to in the wod-file is called during invokeAction
  • Index(es):
    • Date
    • Thread