Note that there are some explanatory texts on larger screens.

plurals
  1. POJSF - iFrame src attribute does not match HTML display
    text
    copied!<p>I have an iFrame in my page looking like this:</p> <pre><code>&lt;h:panelGroup id="gameDiv"&gt; &lt;f:verbatim&gt; &lt;iframe src="/levelup/resources/#{cc.attrs.src_dir}/#{cc.attrs.src_html}" width="700px" height="800px" frameborder="0" id="gameFrame"&gt; &lt;/iframe&gt; &lt;/f:verbatim&gt; &lt;/h:panelGroup&gt; </code></pre> <p>Basically, the "src" variable is bound using JSF 2.0 EL, and gets its value from a backing bean.</p> <p>I then use a form to update this value, and refresh the whole page. In the rendered HTML, I can see that the "src" for my div has been updated. However, the HTML page still shows the old one.</p> <p>I thought the issue was similar to <a href="https://stackoverflow.com/questions/2731381/2-iframes-with-the-same-display-even-if-the-src-are-different">2 iframes with the same display even if the src are different</a>, and I tried the solutions that have been mentioned (using a timestamp to make the src unique, or resetting them to "about:blank" on each page load). None of them worked however.</p> <p>For information, the form that updates the backing bean is:</p> <pre><code>&lt;h:form id="gameSelectionForm"&gt; &lt;h:selectOneMenu id="gameSelection"&gt; &lt;f:selectItems value="#{gameBean.gameIds}" /&gt; &lt;/h:selectOneMenu&gt; &lt;p:commandButton id="gameSelector" action="#{gameBean.changeGame}" update="gameScoreFieldset, gameDiv" /&gt; &lt;/h:form&gt; </code></pre> <p>Any hint would be much useful.</p> <p>Thanks in advance,<br> Sébastien</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload