I have a testing application where a user is given a series of questions in the main panel. After they press submit, a feedback panel is rendered and an animated gif is displayed based on correct/incorrect answers. The animated GIF only animates the first time it's loaded in the page, but on subsequent answers it just stays in its final state.
The button works as follows:
<a:commandLink id="next"
action="#{test.nextPage}"
value="Submit Answer"
rendered="#{! test.lastpage}"
styleClass="action-button submit next"
render="actions,testPanel,messagesPanel, lastQuestion, help"
onclick="showProcess();" oncomplete="initQuestion(); hideProcess();" />
The feedback area is as follows:
<h:panelGroup rendered="#{test.previousStatus == 'CORRECT'}">
<img src="${request.contextPath}/images/correct_animated.gif" />
</h:panelGroup>
<h:panelGroup rendered="#{test.previousStatus == 'INCORRECT'}">
<img src="${request.contextPath}/images/incorrect_animated.gif"/>
</h:panelGroup>
Any help would be much appreciated!!