+ Start a Discussion
PaulDysonPaulDyson 

CommandLink Ajax not working

We have a piece of code that has been unchanged for months that has stopped working; not entirely sure when. It's very simple:

 

<apex:outputPanel layout="none" rendered="{!showEmailLink}">

  <apex:commandlink action="{!mailToMe}" styleClass="mail_link" oncomplete="mailConfirmation()" rerender="dummyPanel">

    <apex:param name="documentId" assignTo="{!documentId}" value="{!document.Id}"/>

    <apex:image value="{!URLFOR($Resource.Singletrack, '/images/mail.gif')}" styleClass="mailto_icon" />

  </apex:commandlink>

</apex:outputPanel>

 

The problem seems to be that the mailToMe method is never called. Firebug doesn't report any script errors but also shows that there is no call being made to the server.

 

Any ideas?

paul-lmipaul-lmi

wrap your code in an apex:form , and also, add an apex:actionstatus tag to the page, and add status="actionstatusid" attribute to your link.  you don't have to use the startText and stopText for the actionstatus if you don't want (set them to "" if not).

MikeGinouMikeGinou

Just for debugging, maybe try adding immediate="true" to the commandLink. This would help to avoid problems due to (silent?) validation of some sort.

colemabcolemab

Was this ever resolved?  I am having issues with commandlink's not calling a method under certain repeatiable condtions and was wondering what you ever did about this issue.