MyFaces Core
  1. MyFaces Core
  2. MYFACES-3102

FaceletViewDeclarationLanguage.getRenderedViewId is not necessary anymore since JSF 2.0

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.4
    • Fix Version/s: 2.0.5
    • Component/s: JSR-314
    • Labels:
      None

      Description

      Checking some stuff, I notice FaceletViewDeclarationLanguage.getRenderedViewId has this code:

      protected String getRenderedViewId(FacesContext context, String actionId)
      {
      ExternalContext eContext = context.getExternalContext();
      String viewId = actionId;
      if (eContext.getRequestPathInfo() == null)

      { String viewSuffix = getDefaultSuffix(context); StringBuilder builder = new StringBuilder(viewId); viewId = builder.replace(viewId.lastIndexOf('.'), viewId.length(), viewSuffix).toString(); }

      if (log.isLoggable(Level.FINEST))

      { log.finest("ActionId -> ViewId: " + actionId + " -> " + viewId); }

      return viewId;
      }

      This code replace the suffix with the default suffix used by facelets. In facelets 1.1.x (FaceletViewHandler), this could have sense, but with jsf 2.0 it does not, because a new ViewDeclarationLanguage was added, so in theory it is possible to have multiple extensions to handle facelets files.

      This is more relevant in JSF 2.1, because in that part, facelets-processing feature was added, allowing new extensions like .view.xml and .jspx

      The solution is just return the value passed unchanged.

        Activity

        Leonardo Uribe created issue -
        Leonardo Uribe made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0.5-SNAPSHOT [ 12316168 ]
        Resolution Fixed [ 1 ]
        Leonardo Uribe made changes -
        Fix Version/s 2.0.5 [ 12316346 ]
        Fix Version/s 2.0.5-SNAPSHOT [ 12316168 ]
        Leonardo Uribe made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development