+ Start a Discussion
ehartyeehartye 

commandlink working intermittently

I'm seeing some strange behavior from commandlink on one of my pages. Here's my code:

 

 

<apex:pageBlockTable value="{!results}" var="l" rendered="{!NOT(ISNULL(results))}"><apex:column > <apex:commandLink id="selectLink" action="{!selectSolution}" immediate="true"> <apex:param id="caseSol" name="caseSol" value="{!l.Id}"/> Select </apex:commandLink></apex:column><apex:column headervalue="Solution Title"> <apex:outputLink value="/{!l.Id}" target="_blank" onmouseover="Tip('{!l.solutionNote}', TITLE, '{!l.solutionname}', STICKY, true, CLOSEBTN, true, WIDTH, -800)" onmouseout="UnTip()">{!l.solutionname}</apex:outputLink></apex:column><apex:column value="{!l.Status}"/><apex:column value="{!l.createddate}"/></apex:pageBlockTable>

 The table shows a list of solutions from a search, displayed on a case vf page, all with a select link to apply the solution to the case.

 

My problem is that about 20% of the time, clicking the select link just reloads the page rather than performing the action.

 

I've checked the debug log during these occurances, and the action method isn't even being hit. It's like it just stalls out.

 

Any ideas? 

 

 

XactiumBenXactiumBen
Get rid of the immediate="true" on your commandLink and see if that makes a difference.  Apart from that I don't see anything else wrong.
ehartyeehartye

I did get rid of the immediate='true', but the culprit turned out to be the solution Id I was passing in with the param tag.

 

It was tacking 3 extra characters to the end of the Id. I truncated the Id to 15 with LEFT(), and haven't had a submission failure yet.

 

Weird.