[Solved] f:view and rich:page: inside or outside?


The <f:view> runs as being a taghandler during view build time, setting the specified attributes as properties of the current UIViewRoot and/or the HttpServletResponse instance.

So, if some taghandler (not UI component!) is encountered before the <f:view> and relies on one of those attributes, then it will miss hit. However, <rich:page> is an UI component which runs during view render time which is long after view build time, so it will guaranteed have access to the right attribute values, even if it appears before the <f:view> in the tree.

In any case, even though it’s merely a “metadata” tag (it can be placed anywhere in the view, even duplicated/nested), most self-documenting is to just put the <f:view> as outermost tag of the tree.

See also:

  • When to use f:view and f:subview

0

solved f:view and rich:page: inside or outside?