javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-3151

PartialViewContextImpl doesn't leverage VisitContextFactory for PartialVisitContext so it disallows to use VisitContextWrappers

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.5
    • Fix Version/s: 2.2.6
    • Component/s: context
    • Labels:
      None

      Description

      There is a following invocation in #processPartial method:

      com.sun.faces.context.PartialViewContextImpl:398
      PartialVisitContext visitContext = new PartialVisitContext(context, phaseClientIds, hints);
      PhaseAwareVisitCallback visitCallback = new PhaseAwareVisitCallback(ctx, phaseId);
      component.visitTree(visitContext, visitCallback);
      

      PartialVisitContext is instantiated directly here instead of leveraging VisitContextFactory.

      This basically disallows use of VisitContextWrapper as a way of enriching tree traversal performed by PartialViewContext's.


      In RichFaces we could replace ExtendedPartialViewContext concept by VisitContext wrapper with same functionality, leveraging Mojarra PVCImpl. This can lower the number component-library inter-operability issues and make partial view rendering less error-prone for developers.


      Note: MyFaces leverages VisitContextFactory correctly:

      org.apache.myfaces.context.servlet.PartialViewContextImpl:418
      VisitContext visitCtx = getVisitContextFactory().getVisitContext(_facesContext, executeIds, PARTIAL_EXECUTE_HINTS);
      viewRoot.visitTree(visitCtx, new PhaseAwareVisitCallback(_facesContext, phaseId));
      

        Activity

          People

          • Assignee:
            Manfred Riem
            Reporter:
            lfryc
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: