[
https://issues.apache.org/jira/browse/MYFACES-2345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12752908#action_12752908
]
Leonardo Uribe commented on MYFACES-2345:
-----------------------------------------
After checking all code and documentation related to this issue a really big
ugly problem comes into action. I'll try to describe it as simple as possible.
The problem is in the implementation of FaceletViewMetadata.createMetadataView.
It call to buildView(), because it is required to extract the "view metadata",
but the side effect is that the whole tree is created, and it is supposed that
buildView is called on render response phase.
After createMetadataView we should obtain something like this:
UIViewRoot
in facet javax_faces_metadata
one or many UIViewParameter instances
It is not possible to do the solution proposed on <composite:interface> and
<composite:implementation>, which it is the same as <ui:composition> does (see
CompilationManager): trim Unit instances removing from stack, because the
compiler does not have state and one facelet could be used for build many
instances. In other words, we need to "execute" the xhtml file twice, one to
create metadata and then to create component tree, and for do that we need
"different" abstract syntax trees.
The only solution founded at this moment is create an alternate
CompilationManager class that is used to create metadata facelet, trimming in
construction time all facelet tags that are not related to metadata creation.
This metadata facelets should be handled in other place different to normal
facelets, so unfortunately we have to put our hands into most deep and unknown
facelets code and change it.
Suggestions are welcome!
> Add View Parameters feature
> ---------------------------
>
> Key: MYFACES-2345
> URL: https://issues.apache.org/jira/browse/MYFACES-2345
> Project: MyFaces Core
> Issue Type: Task
> Components: JSR-314
> Reporter: Leonardo Uribe
> Assignee: Leonardo Uribe
>
> See section 2.5.5 of the spec.
> Some parts where already done, but other code do not, so we have to review
> and put in context all code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.