+ Start a Discussion

Help?? commandButton doesn't call the method - just refreshes page

HI. I don't know if I'm doing something stupid or not, but I have two commandButtons calling methods in my controller extension and when I click them, they doesn't hit the method -- I don't see the debug statements in the code, and the logic in the method isn't run... All I see are the debug statements run for generating the page.


I'm using a StandardSetController on the page -- but even before that (I refactored the code to use a StandardSetController to see if it was something having to do with that...) the same thing was happening.


Any help would be appreciated. Here's the code (excerpts):


VF Page: (see "save" and "submit" buttons)


<apex:page standardController="Evaluator_Score__c" recordSetVar="EvaluatorScores" extensions="ApplicationEvaluationExt" showHeader="false" sidebar="false"> <apex:stylesheet value="{!$Resource.AppEvaluationStyles}" /> <apex:messages /> <script type="text/javascript"> function checkThis(elm, checked) { if (checked) elm.checked=true; } </script> <apex:form > <div id="header"> <div id="oppInfo"> <h3>{!FundingOpportunity.Name}</h3> <p>Evaluator: {!Evaluator.Name} ({!Evaluator.Id})</p> </div> </div> <ul id="sections"> <apex:repeat value="{!Sections}" var="s"> <li><apex:commandLink action="{!reloadSectionEvaluationForm}" reRender="sectionPanel" value="{!s.Section_Name__c}"> <apex:param name="secId" value="{!s.Id}" /> <apex:param name="appId" value="{!appId}" /> </apex:commandLink></li> </apex:repeat> </ul> <apex:pageBlock > <apex:pageBlockButtons rendered="{IF(Evaluation.Status__c=='Completed', false, true)}"> <apex:commandButton action="{!saveEvaluatorScores}" value="Save"> <apex:param name="mode" value="save" /> </apex:commandButton> <apex:commandButton action="{!submitEvaluation}" value="Submit Evaluation"> <apex:param name="mode" value="save" /> </apex:commandButton> </apex:pageBlockButtons> <!-- more code --> </apex:pageBlock> </apex:form> </apex:page>


 Custom Controller Extension:

public with sharing class ApplicationEvaluationExt { public PageReference saveEvaluatorScores() { System.debug('\n**** Application ID = '+appId); System.debug('\n**** EvaluatorScores = '+EvaluatorScores); // update EvaluatorScores; return new PageReference('/'); } public PageReference submitEvaluation() { saveEvaluatorScores(); Evaluation.Status__c = 'Completed'; update Evaluation; return new PageReference('/'+appId); } // more code ... }


Let me know if there's more code that you'd need to see.





I am all so facing similar issue. Can somebody help?


Thanks in advance,