I like to render an iFrame in my page if some batches are done. But only like to render it once.
what I tried before, makes it rerendering all 5 seconds:
<apex:form >
<apex:actionPoller rerender="iFrame,someOthers" interval="5" action="{!updateProgress}" />
<apex:someCode id="someOthers"/>
<apex:iframe src="{!frameUrl}" id="iframe" height="50px" width="100%" rendered="{!loadFrame}" />
</apex:form>
So What I'm looking for should do something like:
if (someWorkDone && iFrame is not shown yet)
iFrame rendered = true; (but never rerender it)
EDIT: Solution with help of Adrian & Tim:
<apex:outputPanel id="container">
<apex:form>
<apex:actionPoller rendered="{!NOT(frameShown)}" rerender="container" interval="5" action="{!updateProgress}" />
<apex:actionPoller rendered="{!frameShown}" rerender="someOthers" interval="5" action="{!updateProgress}" />
<apex:someCode id="someOthers"/>
<apex:iframe src="{!frameUrl}" id="iframe" height="50px" width="100%" rendered="{!frameShown}" />
</apex:form>
</apex:outputPanel>