Hello All,

Is it possible to reference CMS resources in a Javascript file ? (Like in the way we access them in CSS file)

Also is it possible to get resources from the CMS via Ajax from Html DIalog ?

Best Regards, Yordan Yunchov

asked 08.07.2016 at 10:34

Stelt0's gravatar image

Stelt0
(suspended)
accept rate: 12%


Hi

It is not possible to use EL expressions in Javascript files in JSF. See http://stackoverflow.com/questions/2547814/mixing-jsf-el-in-a-javascript-file for workarounds.

Every resource can be get from the web server. Therefore it should be possible to get it via Ajax Request. The Request path will be something like:

/ivy/faces/javax.faces.resource/Project/Banner?ln=xpertivy-6-cms

for

<p:graphicimage library="ivy-cms" name="/Project/Bannner"/>

The 6 in the ln query parameter is the identifier of the PMV where your project is deployed to.

link

answered 11.07.2016 at 12:00

Reto%20Weiss's gravatar image

Reto Weiss ♦♦
4.9k202857
accept rate: 74%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×26
×16
×6

Asked: 08.07.2016 at 10:34

Seen: 2,273 times

Last updated: 11.07.2016 at 12:00