Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3619

Define a special property to specify when a component is created by facelets ( oam.vf.addedByHandler )

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.16, 2.1.10
    • JSR-314
    • None

    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.

      Attachments

        Activity

          People

            lu4242 Leonardo Uribe
            lu4242 Leonardo Uribe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: