• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Confused over order of method invocations for Tag life-cycle

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 437
Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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().
 
A "dutch baby" is not a baby. But this tiny ad is baby sized:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic