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

setter method not firing
Hi all,
I have write a code to store a value, just for checking i added debug comment in setter method. but in debug logs am not receiving the values. it seems like setter method is not working properly.
public class chooseColor { String sCheckboxAnswers; public String getSCheckboxAnswers(){ return sCheckboxAnswers; } public void setSCheckboxAnswers(String sCheckboxAnswers ){ system.debug('Checkbox value +++++'+sCheckboxAnswers ); this.sCheckboxAnswers = sCheckboxAnswers ; } }
<apex:page controller="chooseColor"> <apex:form > <apex:selectCheckboxes id="chooseColor3" value="{!sCheckboxAnswers}"> <apex:selectOption itemValue="red" itemLabel="Red"/> </apex:selectCheckboxes> </apex:form> </apex:page>
can anyone tell me.. what mistake i have done.?
You don't appear to have a mechanism to submit the form - how does the user post back the values?
add some event to this page :