-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3674850
By: dzasypkin
Hi,
During initial page rendering process how are "child" (<include...) zul pages processed? Specifically, do all the doInit/doFinally methods run in the same
*servlet* thread?
This is important when you have a thread bound security context. Documentation is unclear about this matter - in contrast to a detailed info on EventThreadInit interface. But security information is required in both cases.
Regards,
Dmitri
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3678125
By: tomyeh
doInit/doFinally are called during the Page Initial phase, i.e., in the servlet thread.
However, the issue here looks like related to the include issue. I remembered Henri has answered this in another post. Please search it.
Basically, the include component is special that it handled the inclusion of the included page at the Rendering phase. Since Rendering phase takes place after the Page Initial phase, so doFinally of the includer called before child's evaluation!!
Counter-intuitive! I know but the include component got no idea what page to include until it is rendered.
Solution: wait a while:) I'll deliver the macro mechanism this week.
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3679602
By: dzasypkin
Thank you for the reply, Tom.
As doFinally() is called *before* child pages rendering, does it makes sense to invent another listener to fire *after* all the rendering finishes?
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3679929
By: tomyeh
Well, it depends on how you interpret it:)
inlcude is, to me, a special component causes a lot of side effects by including pages at the Rendering phase. It is useful because you can include any kind of pages you want.
It is confusing because the inclusion doesn't take place at the Page Initial phase. That is one of reason I move the priority of macro mechanism one step further.
To mimize the effect, you could use Executions.createComponents.
Asked: 2006-04-07 13:14:49 +0800
Seen: 331 times
Last updated: Apr 11 '06