h:outputScript / h:outputStylesheet bad relocation when pss is used and there
is a refresh transient build
----------------------------------------------------------------------------------------------------------
Key: MYFACES-2727
URL: https://issues.apache.org/jira/browse/MYFACES-2727
Project: MyFaces Core
Issue Type: Bug
Components: JSR-314
Affects Versions: 2.0.0
Reporter: Leonardo Uribe
Assignee: Leonardo Uribe
When the current view needs to be refreshed and pss is used, h:outputScript /
h:outputStylesheet instances are added twice:
1. When the view is built.
2. When the view is refreshed.
The second pass, the relocation listener is triggered by a PostAddToViewEvent
activated when the created duplicate component is attached to the tree. The
effect is the component is relocated, but the parent of the component is not
updated, because the first call that triggers the event has precedence. So, we
have one component pointed from two different locations. The first time I
thought make component resource containers transient solve the problem, but
this case makes clear the need to fix it.
The solution for this one is help ComponentTagHandlerDelegate to find the
component at the relocated position. To do that, the plan is introduce an
interface called RelocatableResourceHandler with a method called
findChildByTagId, so for these components we can check the viewRoot for
instances of this class.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.