Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3641

ViewDeclarationLanguageFactoryImpl.getViewDeclarationLanguage(String viewId) should not throw exception if no associate VDL can be found

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.16, 2.1.10
    • Component/s: None
    • Labels:
      None

      Description

      This exception is thrown from ViewDeclarationLanguageFactoryImpl.getViewDeclarationLanguage(String viewId):

      javax.faces.FacesException: Cannot find a valid PDL for view id /hxome.view.xml
      org.apache.myfaces.view.ViewDeclarationLanguageFactoryImpl.getViewDeclarationLanguage(ViewDeclarationLanguageFactoryImpl.java:93)
      org.apache.myfaces.application.ViewHandlerImpl.getViewDeclarationLanguage(ViewHandlerImpl.java:179)
      org.apache.myfaces.shared.application.DefaultViewHandlerSupport.checkResourceExists(DefaultViewHandlerSupport.java:546)
      org.apache.myfaces.shared.application.DefaultViewHandlerSupport.handleSuffixMapping(DefaultViewHandlerSupport.java:484)
      org.apache.myfaces.shared.application.DefaultViewHandlerSupport.calculateViewId(DefaultViewHandlerSupport.java:114)
      org.apache.myfaces.application.ViewHandlerImpl.deriveLogicalViewId(ViewHandlerImpl.java:118)
      org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:157)
      org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:170)
      org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)

      Instead throw an exception it return null, which indicates that the viewId has not associate VDL. Other algorithms in myfaces has already expect that, like DefaultViewHandlerSupport.checkResourceExists()

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: