Should the <f:view>
tag go outside (around) the <rich:page>
tag? Or inside it?
Note that I do want to have an <f:view>
tag, as I want to set the locale.
Should the <f:view>
tag go outside (around) the <rich:page>
tag? Or inside it?
Note that I do want to have an <f:view>
tag, as I want to set the locale.
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.