I have the following part in my visualforce page:
<apex:form>
<apex:actionFunction name="interestInShowConfirmed" action="{!interestInShowConfirmed}" />
<apex:actionFunction name="registerInterest" action="{!openInterestedInShowPopUp}" >
<apex:param name="chosenId" value=""/>
</apex:actionFunction>
</apex:form>
The way this code works, is that the "RegisterInterest" action function is called when a user clicks on a button (E.X. the button would execute: registerInterest('123213213'); ) - The register interest action function then generates a pop up to the user confirming their selection. Finally, when the user chooses the yes button on the pop up, the interestInShowConfirmed action function is called. I am running into a strange issue where I seemingly need to specify a re render target for these action functions or variable changes are not saved to the view state.
For example, this line of code
openPositionIdChosenForInterest = system.CurrentPageReference().getParameters().get('chosenId');
will return the correct passed Id if i specify a re render target for the "registerInterest" action function, but will return null if i do not. Also, if i specify a re render target only on "registerInterest" and not on "interestInShowConfirmed" - any global varriables set by the registerInterest action function will be null when "interestInShowConfirmed" tries to access them.
I'm guessing there is something I do not understand about re rendering and the view state - could someone fill me in?
Edit:
Here is how the registerInterest function is called. It is a button inside a custom component included in the visualforce page:
<apex:commandButton value="{!cell['buttonLabel']}" onClick="{!cell['javascriptToCallOnClick']}('{!cell['argToStoreOnClick']}');" reRender="None" />
Also, if i don't include a rerender in this button, my action function is not called