Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-940

StreamingAddResource.addInlineScriptAtPosition throws NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.1.5-SNAPSHOT
    • None
    • ExtensionsFilter
    • None
    • - Oracle JDeveloper 10.1.3.2.0
      - OC4J 10.1.3.1.1 (embedded)
      - JSF RI 1.1_01 and MyFaces Core 1.1.5

    Description

      When I run the following code with the StreamingAddResource

      final String viewId = "/jsp/reportLoad.jspx";
      FacesContext facesContext = FacesContext.getCurrentInstance();
      ViewHandler viewHandler = facesContext.getApplication().getViewHandler();
      String actionUrl = viewHandler.getActionURL(facesContext, viewId);
      String javaScriptText = "alert('ehlo');";
      AddResource addResource = AddResourceFactory.getInstance(facesContext);
      addResource.addInlineScriptAtPosition(facesContext, AddResource.HEADER_BEGIN, javaScriptText);

      I get an NPE. This doesn't happen with the default AddResource implementation. Same thing happens with JSF RI and MyFaces Core.

      Attachments

        Activity

          People

            Unassigned Unassigned
            aspa Marko Asplund
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: