Uploaded image for project: 'MyFaces Trinidad'
  1. MyFaces Trinidad
  2. TRINIDAD-1942

ViewDeclarationLanguageFactoryImpl implementation should cache physical URI for the current viewId on the ViewMap

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0-alpha-2
    • 2.0.0-beta-1
    • Components
    • None

    Description

      In an included page (or fragment) if a composite component gets used, the CompositeComponentTagHandler retrieves the logical viewId (context.getViewRoot().getViewId()) first and then gets its physical URI in order to determine the VDL to use. This is usually not a problem in vanilla JSF applications or even vanilla Trinidad applications, but in frameworks (such as Oracle) where the viewId of an included fragment comes into play (iow, the fragment is in context and not the main page), the PageResolver implementation can no longer return the correct physical URI for the logical viewId. It merely returns the logical viewId.

      The problem is further exasperated if the logical viewId of the page does not contain an extension. As there is no extension available, the VDL returned is the JspViewHandlingStrategy always. This is disastrous when the page is being rendered using FaceletsVDL.

      One way to resolve this issue is to cache the physical URI of the page on the ViewRoot's viewMap and return the cached value whenever the VDLFactory.getVDL() is called for a viewId that matches the current viewRoot's viewId.

      Attachments

        1. jira-1942-II.patch
          3 kB
          Pavitra Subramaniam
        2. jira-1942.patch
          3 kB
          Pavitra Subramaniam

        Activity

          People

            Unassigned Unassigned
            pasubra Pavitra Subramaniam
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: