MyFaces Trinidad
  1. MyFaces Trinidad
  2. TRINIDAD-2030

Honor SKIP_ITERATION FacesContext property

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-beta-1
    • Fix Version/s: 2.0.0-beta-2
    • Component/s: Components
    • Labels:
      None

      Description

      As discussed in this MyFaces core issue:

      MYFACES-3036 Support SKIP_ITERATION FacesContext property

      The JSF-314 EG (and members of Mojarra and MyFaces) agreed to use the "javax.faces.visit.SKIP_ITERATION" FacesContext property (during the 2.0 timeframe) to indicate that a tree visit should not trigger iteration in iterating components like UIData/UIRepeat. Opening this issue to request that iterating Trinidad components (UIXIterator, UIXCollection) honor this property as well.

      Note that Trinidad already handles this centrally in UIXComponent.visitChildren:

      // determine whether this visit should be iterating. If it shouldn't, don't
      // even call the protected hook. We currently don't iterate during the
      // restore view phase when we are visiting all of the components.
      boolean noIterate = (visitContext.getIdsToVisit() == VisitContext.ALL_IDS) &&
      (context.getCurrentPhaseId() == PhaseId.RESTORE_VIEW);

      doneVisiting = (noIterate)
      ? uixParentComponent._visitAllChildren(visitContext, callback)
      : uixParentComponent.visitChildren(visitContext, callback);

      This issue is requesting that we enhance the above "noIterate" test to also check the SKIP_ITERATION property.

        Activity

        Show
        Andy Schwartz added a comment - http://svn.apache.org/viewvc?view=revision&revision=1070523
        Show
        Andy Schwartz added a comment - Fix committed: http://svn.apache.org/viewvc?view=revision&revision=1070523
        Hide
        Andy Schwartz added a comment -

        One comment on the attached patch...

        Originally I was thinking that we would skip iteration if either the SKIP_ITERATION hint is specified or we are in the restore view phase. However, after seeing the following MyFaces core issue:

        MYFACES-3033 Improve DebugPhaseListener for UIData and SKIP_ITERATION
        https://issues.apache.org/jira/browse/MYFACES-3033

        It seems that we want to allow iterating visits during the restore view phase, if only because the MyFaces DebugPhaseListener attempts to do this. As such, the patch removes the previous phase check and only checks for the SKIP_ITERATION hint.

        Show
        Andy Schwartz added a comment - One comment on the attached patch... Originally I was thinking that we would skip iteration if either the SKIP_ITERATION hint is specified or we are in the restore view phase. However, after seeing the following MyFaces core issue: MYFACES-3033 Improve DebugPhaseListener for UIData and SKIP_ITERATION https://issues.apache.org/jira/browse/MYFACES-3033 It seems that we want to allow iterating visits during the restore view phase, if only because the MyFaces DebugPhaseListener attempts to do this. As such, the patch removes the previous phase check and only checks for the SKIP_ITERATION hint.
        Hide
        Andy Schwartz added a comment -

        Fix for Trinidad-2030

        Show
        Andy Schwartz added a comment - Fix for Trinidad-2030

          People

          • Assignee:
            Andy Schwartz
            Reporter:
            Andy Schwartz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development