I created a dynamic component:
public Component.Flow.Interview getFlow() {
Component.Flow.Interview flow = new Component.Flow.Interview();
flow.name = xx.Flow_Name__c;
return flow;
}
and my visualforce page is:
<apex:page controller="Sample1" >
<apex:outputPanel id="textPanel" layout="block" style="height:100px;background-color:#{!xx.Header_Color__c}" >
<apex:outputText style="font-size:250%;margin:10px;" value="{!xx.Tag_Line__c}"></apex:outputText>
<apex:outputText style="display:block;margin:10px;" value="{!screenLabel}"></apex:outputText>
</apex:outputPanel>
<apex:outputPanel id="component">
<apex:outputPanel rendered="{!componentRender}">
<apex:dynamicComponent componentValue="{!flow}" />
</apex:outputPanel>
</apex:outputPanel>
<apex:form >
<apex:outputPanel layout="block" style="height:100px;background-color:#{!xx.Footer_Color__c}" />
<apex:outputPanel id="ddff" />
<apex:outputPanel id="flowPanel">
<apex:outputPanel rendered="{!NOT(rendering)}">
<apex:actionFunction name="receiveFile" action="{!receiveMetadataZipFile}" rerender="ddff" oncomplete="unzip();">
<apex:param name="filename" assignTo="{!MetadataFileName}" value=""/>
<apex:param name="filedata" assignTo="{!MetadataFileData}" value=""/>
</apex:actionFunction>
<apex:actionFunction name="receiveComplete" action="{!receiveComplete}" rerender="flowPanel,textPanel,component" />
</apex:outputPanel>
</apex:outputPanel>
<apex:outputPanel >
<apex:actionPoller interval="5" action="{!checkStatus}" rendered="{!rendering}" rerender="flowPanel" />
</apex:outputPanel>
</apex:form>
</apex:page>
When receivecomplete get called its give me error Internal server error. Below is screenshot of internal server error. If I change its definition from:
<apex:actionFunction name="receiveComplete" action="{!receiveComplete}" rerender="flowPanel,textPanel,component" />
to:
<apex:actionFunction name="receiveComplete" action="{!receiveComplete}" rerender="flowPanel,textPanel,component" />
then there is no error but component panel is not rerendering. Please help how to avoid this error?