[
https://issues.apache.org/jira/browse/MYFACES-4028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15149612#comment-15149612
]
Leonardo Uribe commented on MYFACES-4028:
-----------------------------------------
Mojarra is not handling the situation. What's really happening is Mojarra does
not implement Partial State Saving idea into its full extension (it was
discovered some time ago doing some tests over the size of the view state into
session). It is a long, long story, but in summary, everything inside a
composite component in Mojarra uses jsf 1.2 state saving, which means on
postback facelets is not building the view from scratch. Myfaces algorithm
implements PSS fully, so it reuses facelets in all possible situations to
rebuild the view. So, on the surface you can see it as "if it works" but the
truth is the algorithm is incomplete.
The line:
{code:xml}
<test:row id="#{cc.clientId}">
{code}
is just invalid, because an id is not the same as a clientId. The id identifies
a component in a unique way within a NamingContainer. The clientId is the
proyection of the id and the component location in the tree into the target
markup (the clientId changes according to its location in the component tree).
Looking the 4 cases the algorithm works as expected.
org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE param was used
for backward compatibility with jsf 1.2 state saving style, but with the new
algorithm is no longer necessary.
> Custom Taglib with composite components and JSTL
> ------------------------------------------------
>
> Key: MYFACES-4028
> URL: https://issues.apache.org/jira/browse/MYFACES-4028
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 2.1.17, 2.2.9
> Reporter: Christian Beikov
> Assignee: Leonardo Uribe
> Attachments: issue.zip
>
>
> I tested this on Wildfly 10.0.0.CR5 with both, MyFaces 2.1.17 and 2.2.9 but I
> suppose this issue is not specific to my environment.
> The example project can be found on Github:
> https://github.com/beikov/myfaces-composite-jstl-issue
> I think the essential problem is, that a composite component passes an EL
> expression to a custom tag which then uses the expression in a JSTL Tag.
> I don't know if it's just illegal to do something like this, or if there is
> an actual bug, but if it is the former, I'd expect an exception.
> Depending on whether the property
> "org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE" is enabled
> the behavior is different.
> When enabled, the converter that is attached to the composite component will
> be considered for state saving which in this case leads to a converter
> without state when restoring and finally leading to a converter exception on
> postback.
> When disabled, the first postback request just seems to do nothing, but then,
> it seemingly works as expected.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)