Description
I have notice the need to define a special property or attribute to indicate PSS algorithm when a component has been created by facelets. In practice we use the following fragment in DefaultFaceletsStateManagementStrategy:
if (!isRefreshOnTransientBuildPreserveState() &&
FaceletCompositionContext.getCurrentInstance(_facesContext) != null &&
(component.getAttributes().containsKey(ComponentSupport.MARK_CREATED) ||
component.getAttributes().containsKey(ComponentSupport.FACET_CREATED_UIPANEL_MARKER)) ||
(component.getId() != null && component.getId().length() > 16 &&
component.getId().startsWith(UIViewRoot.UNIQUE_ID_PREFIX) &&
component.getId().endsWith("__f_cc_facet") )
)
It is a complex check for something that should be simple. The idea is reduce that to something like this:
if (!isRefreshOnTransientBuildPreserveState() &&
FaceletCompositionContext.getCurrentInstance(_facesContext) != null &&
(component.getAttributes().containsKey(ComponentSupport.MARK_CREATED) ||
component.getAttributes().containsKey(ComponentSupport.COMPONENT_ADDED_BY_HANDLER_MARKER))
)
and create oam.vf.addedByHandler as special facelets attribute just like oam.vf.MARK_ID or MARK_CREATED is, to make facelets refreshTransientBuild faster.
It is required to do some changes in some locations, specially when ComponentSupport.FACET_CREATED_UIPANEL_MARKER is used, to set that one and ComponentSupport.COMPONENT_ADDED_BY_HANDLER_MARKER together. It is not conveniento to mix both because both are used in different situations.