0

threads and Initiators (part II)

asked 2006-04-07 13:14:49 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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


delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2006-04-10 09:51:16 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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.

link publish delete flag offensive edit

answered 2006-04-10 21:07:46 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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?


link publish delete flag offensive edit

answered 2006-04-11 01:17:19 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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.


link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2006-04-07 13:14:49 +0800

Seen: 331 times

Last updated: Apr 11 '06

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More