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

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.16, 2.1.10
    • Component/s: JSR-314
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: