You need to sign in to do that
Don't have an account?
Sochy_Eisenberg
Issue Calling Setter Method
Hello Trailblazers,
I need some help.
This code belo is fairly basic since I'm new dev. I have a VF page with a Select Option that I'm trying to save the value to a String called selectedValue. The controller is fine, but I can't get the VF page to save. The error I'm getting is "Unknown propertySchemaController.selectedValue'"
Here is the VF Page:
And the Cotroller:
I need some help.
This code belo is fairly basic since I'm new dev. I have a VF page with a Select Option that I'm trying to save the value to a String called selectedValue. The controller is fine, but I can't get the VF page to save. The error I'm getting is "Unknown propertySchemaController.selectedValue'"
Here is the VF Page:
<apex:page controller="SchemaController"> <apex:form > <apex:pageBlock > <apex:selectList value="{!selectedValue}" size="1" >Select an Object to get details: <apex:selectOptions value="{!objectList}"/> </apex:selectList> </apex:pageBlock> </apex:form> </apex:page>
And the Cotroller:
public class SchemaController { String selectedValue; public List<SelectOption> getObjectList() { List<SelectOption> options = new List<SelectOption>(); Map<String, Schema.SObjectType> objectList = Schema.getGlobalDescribe(); for(String s : objectList.keySet()) { options.add(new SelectOption (s, s)); } return options; } public void setSelectedValue(String selectedValue) { this.selectedValue = selectedValue; } }
Thank you!