You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2012/11/03 00:48:13 UTC

[jira] [Resolved] (MYFACES-3619) Define a special property to specify when a component is created by facelets ( oam.vf.addedByHandler )

     [ https://issues.apache.org/jira/browse/MYFACES-3619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe resolved MYFACES-3619.
-------------------------------------

    Resolution: Fixed
    
> Define a special property to specify when a component is created by facelets  ( oam.vf.addedByHandler )
> -------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3619
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3619
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.16, 2.1.10
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira