I have an apex:actionFunction in my VF page which is called from a commandbutton inside an apex:repeat. There is an apex:actionStatus component which should be rendered once apex:actionFunction is called.
Since the button and action status are inside repeat I am unable to reference actionStatus component just by the id string. What I did instead is to pass the complete Id of actionStatus component to the actionFunction which is then passed to the controller. I am trying to reference the controller variable in status field in actionFunction but for some reason it is not working.
I hardcored the same complete Id string to the status and it worked. Please help me understand what I am missing here.
<apex:form >
<apex:actionFunction name="adduser" action="{!testfunction}" rerender="ResultPanel" status="{!currentComponentIdValue}">
<apex:param name="currentComponentId" value=""/>
</apex:actionFunction>
</apex:form>
//Some logic here
<apex:form >
<apex:outputPanel id="ResultPanel" >
<apex:repeat value="{resultList}" var="res">
<apex:outputText value="res.Name" />
<apex:commandButton onclick="adduser('{!$Component.mystatus}')" value="Add User"/>
<apex:actionStatus id="mystatus" >
<apex:facet name="start">Requesting...</apex:facet>
<apex:facet name="stop"></apex:facet>
</apex:actionStatus>
</apex:repeat>
</apex:outputPanel>
</apex:form>
EDIT:
The main issue here is that status="{!currentComponentIdValue}" in actionFunction is not working. If I hardcode Status with the actual id for a single commandbutton, it works perfectly. But for some reason initializing status from controller is not working.