You need to sign in to do that
Don't have an account?
Darshit Pathak 3
SelectList value not getting in Apex controller
VF Page:
<apex:selectList styleclass="slds-select" value="{!EditOrSave}" size="1">
<apex:actionSupport event="onchange" action="{!redirectToEditOrDetail}" reRender="">
<apex:param name="recId" value="{!bscheduleRecord.Id}" assignTo="{!recId}"/>
</apex:actionSupport>
<apex:selectOptions value="{!selectOptionEditSave}"/>
</apex:selectList>
Controller:
public String EditOrSave{get;set;}
public PageReference redirectToEditOrDetail(){
System.debug('***EditOrSave: '+EditorSave);
}
But I am getting blank value on changing picklist value.
<apex:selectList styleclass="slds-select" value="{!EditOrSave}" size="1">
<apex:actionSupport event="onchange" action="{!redirectToEditOrDetail}" reRender="">
<apex:param name="recId" value="{!bscheduleRecord.Id}" assignTo="{!recId}"/>
</apex:actionSupport>
<apex:selectOptions value="{!selectOptionEditSave}"/>
</apex:selectList>
Controller:
public String EditOrSave{get;set;}
public PageReference redirectToEditOrDetail(){
System.debug('***EditOrSave: '+EditorSave);
}
But I am getting blank value on changing picklist value.
here is the sample code for your requirement : you don't have need to use <apex:param /> in your code apex controller
output "
i hope it helps you.
Let me inform if it helps you and kindly mark it best answer if it helps you so it make proper solution for others
thanks
sfdcmonkey.com
But the value of select list I am not getting.
Public List<SelectOption> getSelectOptionEditSave(){
list<selectOption> lt = new list<selectOption>();
lt.add(new selectOption ('Save', 'Save'));
lt.add(new selectOption ('Edit','Edit'));
return lt;
}}
also...the selectOptions should come below the selectOptions.