6 Replies Latest reply on Dec 27, 2011 1:06 PM by John Stegeman

    EL expression in Javascript

    Tapas Bose
      I am trying to get a String value from managed bean in JavaScript as :
      var val = #{viewScope.faqBean.richContent};

      but the JDeveloper editor is showing a red mark below the '#' and the error is

      "Encounter unexpected character, expected keyword, expression, braces, bracket, parenthesis or operator".

      If I put the #{viewScope.faqBean.richContent} inside a quote then the red mark is vanished but on running the application it is giving a compile time error:

      "The deferred EL expression is not allowed since deferredSyntaxAllowedAsLiteral is false."

      And use of double quote compile the application but gives run time error:

      "Error: Encountered deferred syntax #{ in template text. If intended as a literal, escape it or set directive deferredSyntaxAllowedAsLiteral"

      How can we use EL expression in Javascript. We can use EL expression in Javascript in JSF 1.2. Isn't this available in ADF?