2

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!!

Dan
  • 21
  • 1

2 Answers2

0

Is this just in IE? Does it continue to animate in Firefox/Safari/Chrome etc?

Related link

Community
  • 1
  • 1
Damo
  • 11,410
  • 5
  • 57
  • 74
0

Try to encapsulate your components into a <h:form> tag and then rerender the panels, if its JSF 2.0 you can try:

<h:commandLink>
    <f:ajax render="foo"/>
</h:commandLink>
Kris
  • 5,714
  • 2
  • 27
  • 47