I have an CMS whose type is PNG Image defines 2 picture (one in English and one in German). I insert this image in .xhtml like: <h:graphicimage name="myImage" library="ivy-cms" styleclass="my-image"/>

There is a button for changing language of whole application.

My problem is: When I click on button to change language, my picture doesn't change. It is changed when I clear cache of browser (Ctrl + F5). I have already tried adding attribute update="my-image" for the button, but it still doesn't work.

Thanks,

asked 07.12.2017 at 00:01

lhtan's gravatar image

lhtan
(suspended)
accept rate: 0%

edited 07.12.2017 at 00:12


Hi!

On which version are you and how does the rendered link look like?

A resource caching issue was fixed with XIVY-1959.

link

answered 12.12.2017 at 06:23

SupportIvyTeam's gravatar image

SupportIvyTeam ♦♦
1.4k102118122
accept rate: 77%

edited 12.12.2017 at 06:23

I'm on 6.2 version. The rendered link is like: /ivy/faces/javax.faces.resource/uri-of-cms-image?ln=xpertivy-6-cms&xv=54581162611

(13.12.2017 at 00:14) lhtan lhtan's gravatar image

For the h:graphicImage I think there is some caching going on with the browser or nginx, so they think there could be no changes. Not really sure about this theory.

In this case, the cms already returns the img tag with the URL reference, so you just need to show it with an h:outputText with escape=false.

Just change the locale of your session then update the h:outputText then the image should be changed correspondingly.

link

answered 13.12.2017 at 07:07

ToanLC's gravatar image

ToanLC
(suspended)
accept rate: 16%

edited 13.12.2017 at 07:11

Thank for your answer. I've already tried your solution. It doesn't appear the image at the first time when I change language.

(13.12.2017 at 23:41) lhtan lhtan's gravatar image

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
×2

Asked: 07.12.2017 at 00:01

Seen: 1,902 times

Last updated: 13.12.2017 at 23:41