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

IterationTag life cycle doubt

 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I had chosen the IterationTag life cycle in following way:

(assume all stages are executed)
1- setPageContext()
2- setParent()
3- Invoke attribute setters
4- doStartTag()
5- doAfterBody()
6- doEndTag()

Question is from Study Companion (Charles Lyons)

I have confusion regarding whether setPageContext() is called first or
setParent().

Book says setParent() is called first.


Thanks,
 
Srinivasan thoyyeti
Ranch Hand
Posts: 558
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chandra,

1. They might have described setParent() in isolation. like it will execute before our tag starts executing the logic.

I mean, they are not comparing with setPageContext().

2. They might not have said "setParent() will get executed before setPageContext()".
 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Srinivasan,

If the question says life cycle of the classic tag or Iteration tag, I
get both are same except the BodyTag interface two additional method.


This was question from Charles Lyons page 426 Question 4:
In the chapter content, it has description about Iteration tag life
cycle and it shows the setPageContext() method call before setParent().

-->setParent() is only called if the tag is inside the enclosing tag
(I call it inner tag).

So what sequence to choose in your opinion!

K&B says, in classic tag life cycle that setPageContext() comes first.
As I get setPageContext() is must executing method, whereas setParent()
is NOT.

Please also consider the very beginning bold face lines of this post.


Thanks,
 
Srinivasan thoyyeti
Ranch Hand
Posts: 558
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
chandra,

You know what is correct. then must be also knowing what is incorrect.

K&B says, in classic tag life cycle that setPageContext() comes first.
As I get setPageContext() is must executing method, whereas setParent()
is NOT.


What ever you said or understood is correct.

Hey Chandra, did you complete you Wizlabs mock exam?

Please tell me what and all exams you are attempting.
which you feel good.

[ August 15, 2007: Message edited by: Srinivasan thoyyeti ]
 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Srinivasan,

So nice replies from you!



PS: Kindly check your mails?
Thanks,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic