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
216293338
accept rate: 16%


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.8k172554
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:

×25
×13
×5

Asked: 08.07.2016 at 10:34

Seen: 712 times

Last updated: 11.07.2016 at 12:00