ICEfaces
  1. ICEfaces
  2. ICE-7332

@import in css generating 404 Not Found

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Invalid
    • Affects Version/s: 2.1-Beta
    • Fix Version/s: 2.1-Beta, 3.0
    • Component/s: Bridge
    • Labels:
      None
    • Environment:
      Tomcat 7.0.12

      Description

      A css file with the following:

      @import url("printPreview.css") print;

      Is generating a javascript error in Firefox:

      NetworkError: 404 Not Found - http://localhost:8080/williamspoc/javax.faces.resource/printPreview.css"

      The printPreview.css file is included as follows:

              <h:outputStylesheet name="print.css" library="css" rendered="#{printPreviewBackingBean.printPreview}"/>
      <h:outputStylesheet name="printPreview.css" library="css" rendered="#{printPreviewBackingBean.printPreview}"/>

      The stylesheet is applied to the page, however, the javascript error shows up in the console. This can be reproduced in the poc.

        Activity

        Hide
        Brad Kroeger added a comment -

        Upon further review, this was not the best technique, changed to the following:

        <link href="#

        {resource['css:print.css']}

        " rel="stylesheet" type="text/css" media="print"/>
        <h:outputStylesheet name="printPreview.css" library="css" rendered="#

        {printPreviewBackingBean.printPreview}

        "/>

        The @import is not necessary because the printPreview.css file is already applied to the printPreview window. We just need the print.css applied to the actual printing, to remove a couple of buttons.

        Show
        Brad Kroeger added a comment - Upon further review, this was not the best technique, changed to the following: <link href="# {resource['css:print.css']} " rel="stylesheet" type="text/css" media="print"/> <h:outputStylesheet name="printPreview.css" library="css" rendered="# {printPreviewBackingBean.printPreview} "/> The @import is not necessary because the printPreview.css file is already applied to the printPreview window. We just need the print.css applied to the actual printing, to remove a couple of buttons.

          People

          • Assignee:
            Ken Fyten
            Reporter:
            Brad Kroeger
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: