Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Confused over order of method invocations for Tag life-cycle

 
Tyler Wright
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

In various publications, I have observed that there is discrepancy about the order of these 2 life-cycle methods for both classic and simple tags:


The majority of study guides etc say setParent occurs before setContext; however, just as many guides that say setParent is called after setContext



I have seen practice exams that specifically asked this question...and even the practice exams do not agree on the order of these two methods.

1) Is the order of the setParent and setContext method with respect to each other important for the exam?
2) Is there a correct order to the method invocations?

thanks,
Tyler.
 
Chinmaya Chowdary
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tyler. I think order not matters in case of setPageContext(PageContext), setParent(Tag), these are independent activities. Ultimately they have to serve in doStartTag(). They must be called before doStartTag().
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic