In Oracle ADF I am having
<af:resource type="javascript">
var chatSettings = {
url: "google.com",
id: "test"
}
function init(){
...
}
</af:resource>
<af:image id="abc">
<af:clientListener method="init()')" type="click"/>
</af:image>
I want to have url and id as dynamic parameters. I am already defining or have access to those using attributes expression like #{attrs.url} and #{attrs.id} But I am unable to dynamically inject values into the script.
If I use expressions inside af:resource JavaScript block I get the below errors:
Caused by: oracle.jsp.parse.JspParseException:
Error: Encountered deferred syntax #{ in template text. If intended as a literal, escape it or set directive deferredSyntaxAllowedAsLiteral
How can I inject the values into JavaScript block or call the function with parameters so that the variables can be injected into the var block.