I am currently working around my first issue mentioned in this post: http://primefaces.prime.com.tr/forum/vi ... 847#p27847, but am facing another one I can't get through.
I have the following form:
Code: Select all
<h:form id="gameSelectionForm">
<h:selectOneMenu id="gameSelection">
<f:selectItems value="#{gameBean.gameIds}" />
</h:selectOneMenu>
<p:commandButton id="gameSelector" action="#{gameBean.changeGame}"
update="gameScoreFieldset, gameDiv" />
</h:form>
Code: Select all
<h:panelGroup id="gameDiv">
<f:verbatim>
<iframe
src="/levelup/resources/#{cc.attrs.src_dir}/#{cc.attrs.src_html}"
width="700px" height="800px" frameborder="0" id="gameFrame">
</iframe>
</f:verbatim>
</h:panelGroup>
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<partial-response>
<changes>
<update id="gameScoreFieldset"><![CDATA[<fieldset id="gameScoreFieldset" class="ui-fieldset ui-widget ui-widget-content ui-corner-all"><legend class="ui-fieldset-legend ui-corner-all ui-state-default">game Score</legend><div class="ui-fieldset-content"><span id="gameScore">Your score on your last game was 0.314. </span>
<br /><span id="BestGameScore">Your best score is 18400.0.</span></div></fieldset><script type="text/javascript">widget_gameScoreFieldset = new PrimeFaces.widget.Fieldset('gameScoreFieldset', {});</script>]]></update>
<update id="gameDiv"><![CDATA[<span id="gameDiv">
<iframe src="/levelup/resources/games/keshin.asteroids/asteroids.html" width="700px" height="800px" frameborder="0" id="gameFrame">
</iframe>
</span>]]></update>
<update id="javax.faces.ViewState"><![CDATA[-6103924633389317279:-592329718016319458]]></update>
</changes>
<extension primefacesCallbackParam="validationFailed">{"validationFailed":false}</extension>
</partial-response>
The problem
If I hit F5 on the page, and then submit the form, I have the same correct partial response. However, this time the iFrame is not refreshed (even though the "gameScoreFieldset" is). And looking at the rendered HTML in my browser, I can see that the source for the iFrame has not changed.
Is there something I missed in how PPR works? What seems most strange to me is that it properly works until I refresh my page.
Thanks again for your support,