You need to sign in to do that
Don't have an account?

Using apex:param inside repeat component
Hello all,
I have to used param tag inside commandLink under repeat tag but fail to get param value.
Here's code,
<apex:repeat value="{!lstNumbers}" var="num">
<apex:commandLink value="{!num}" action="{!nextPage}" >
<apex:param name="selectedPage" value="{!num}" assignTo="{!selectedPage}"/>
<apex:actionSupport event="onclick" action="{!nextPage}" reRender="frm,projtable" />
</apex:commandlink>
</apex:repeat>
// Controller Code
public string selectedPage {get; set;}
public void nextPage()
{
Error.LogError('In nextPage' + selectedPage); // this only prints In nextPage.
lstContactForRegisteredVol.Clear();
lstContactForRegisteredVol = mapContactsForPagination.get(selectedPage);
}
can anybody help me to get through this.
Regards,
Pratty
You have the param tag nested inside the command link, but I think the onclick handler will hijack the event and that doesn't have any params.
You shouldn't need the actionsupport - just add a rerender attribute to the commandlink:
All Answers
You have the param tag nested inside the command link, but I think the onclick handler will hijack the event and that doesn't have any params.
You shouldn't need the actionsupport - just add a rerender attribute to the commandlink:
Hey it works fine thank you very much.