+ Start a Discussion

Cannot render a flow on a page


I am having problem with rendering a flow on a visualforce page.

My Page code

You select a radio button from a table and then click the button on the top
<apex:outputPanel rendered="{!showEeBillckts}" id="topUIpanels">

<apex:pageBlockButtons id="upperBtns" location="top" >
<apex:commandButton id="addButton" value="  Add  " onclick="startFlow();" rerender="Nothing"/>&nbsp;&nbsp;

<apex:pageBlockTable styleClass="exampleTable" value="{!exampleList}" var="con" id="exampleTableId" >
                                                 <apex:column headerValue="Action">
                                                     <input type="radio" id="{!con.Id}"/>

there is a JS which will execute

function startFlow()
  if($j('.exampleTable:radio:checked').length == 1)
     var nwkId = $j('.exampleTable :radio:checked').attr('id');
     alert('Please select one connection.');

flow invoke code. this the flow which needs to be called

<apex:actionFunction name="renderAddFlow" action="{!addflow}" rerender="topUIpanels,newInstallsflowOuter,flowNavButtons">
             <apex:param name="showEeBillckts" assignTo="{!showEeBillckts}" value="false" />
                <apex:param name="showAddMACDflow" assignTo="{!showAddMACDflow}" value="true" />
                <apex:param name="nwkId" assignTo="{!eeNwkSelectedId}" value=""/>

then the flow code

<apex:outputPanel id="newInstallsflowOuter">
<apex:outputPanel id="addMACDflow" rendered="{!showAddMACDflow}"  >
              <flow:interview name="Ethernet_Everywhere_ADD" interview="{!addMACDFlow}" finishLocation="{!refreshCircuits}">
                        <apex:param name="OpportunityId" value="{!oppId}"/>
                        <apex:param name="EECircuitNetworkId" value="{!eeNwkSelectedId}"/>
              </flow:interview> <br/>

I am trying to hide the table and in that place show the flow. but the page jsut refreshed and does not let the flow come up. can any one help?

Is it working properly if you remove JS? If no, please share code for "refreshCircuit".

If it is working properly without JS then try including alerts to check the flow.