You need to sign in to do that
Don't have an account?
Sandy singh
Command Link button is not working
Hi All,
Command Link button is not working for me. Below is my code:
VisualForce Code: <apex:pageblockTable value="{!request}" var="request" width="100%" rendered="{!request.size > 0}"> <apex:column width="20%"> <apex:facet name="header">Action</apex:facet> <apex:commandLink action="{!deleteSelectedRecord}" value="Delete" > <apex:param name="selectActionLink" value="{!request.Id}" assignTo="{!selectActionLink}"/> </apex:commandLink> <apex:outputText value="|" /> <apex:commandLink action="{!holdRecord}" value="Hold/Release" reRender="block"> <apex:param name="selectActionLink" value="{!request.Id}" assignTo="{!selectActionLink}"/> <apex:param name="holdReleseFlag" value="True" assignTo="{!holdReleseFlag}"/> </apex:commandLink> </apex:column> <apex:column value="{!request.rank__c}" width="5%" headerValue="Rank"/> </apex:pageblockTable> ----------------------------------------------------------- Controller Code: public Pagereference deleteSelectedRecord(){ PageReference newPage = new PageReference('/apex/PgaeOne'); newPage.setRedirect(true); return newPage; }
Please look this and help me.
Thanks in advance.
Regards,
Sandy
Hi Sandy,
There is always a problem with Apex:Param check this as i am sure this value will always be null in controller.
Also in your code there is only one apex:column try below code if it helps
<apex:column width="20%">
<apex:facet name="header">Action</apex:facet>
<apex:commandLink action="{!deleteSelectedRecord}" value="Delete" >
<apex:param name="selectActionLink" value="{!request.Id}" assignTo="{!selectActionLink}"/>
</apex:commandLink>
</apex:column>
<apex:outputText value="|" />
<apex:column width="20%">
<apex:commandLink action="{!holdRecord}" value="Hold/Release" reRender="block">
<apex:param name="selectActionLink" value="{!request.Id}" assignTo="{!selectActionLink}"/>
<apex:param name="holdReleseFlag" value="True" assignTo="{!holdReleseFlag}"/>
</apex:column>
</apex:column>
Hope above helps you