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

Find a way to do not use ELExpressions on jsf.js for getProjectStage

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0-alpha
    • 2.0.0-beta
    • JSR-314
    • None

    Description

      After do some tests, it was detected RI 2.0.1 uses other strategy to do that. Instead using an ELExpression to retrieve the project stage when jsf.js is send, uses a combination of javascript and rewrite request path to send this value. If the application is not on Production stage the url written by the script looks like this:

      <script type="text/javascript" src="/test-webapp/javax.faces.resource/jsf.js.jsf?ln=javax.faces&stage=Development">

      note "ln" is written on ResourceImpl.getRequestPath(), so I suppose stage is set there too.

      The problem is the javascript part. I don't know how to retrieve it with some javascript algorithm in getProjectStage. Note this param is written on the attribute src, and no ajax request should be triggered for retrieve this value.

      Right now, the solution committed MYFACES-2460 just deal with this file like any other css file that could contain EL Expressions (these expressions are "application scope", in other words, its value is the same all time in the application life).

      Suggestions are welcome.

      Attachments

        1. myfaces-2464.patch
          4 kB
          Jakob Korherr

        Activity

          People

            lu4242 Leonardo Uribe
            lu4242 Leonardo Uribe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: