You need to sign in to do that
Don't have an account?
How to Pass multi selected Checkbox values from visualforce page to a multiselect picklist Field
getting unknown property error when saving the vf page.
controller
public class sosSurvey {
public Boolean selected { get; set; }
public String Strength { get; set; }
public String value { get; set; }
public List<SelectOption> Items {
get {
List<SelectOption> options = new List<SelectOption>();
Schema.DescribeFieldResult dfr = SOSSurveys__c.strength_against_our_competition__c.getDescribe();
List<Schema.PicklistEntry> pickListEntries = dfr.getPicklistValues();
return options;
}
}
public String getStrength() {
return Strength;
}
public void setStrength(String strength) {
this.Strength = Strength;
}
}
--------------
vf page
<apex:pageBlockSectionItem >
<apex:outputLabel value="2)What do you think is our strength against our competition ?"/>
<apex:selectCheckboxes value="{!SOSSurveys__c.strength_against_our_competition__c}">
<apex:selectOptions value="{!Items}"/>
</apex:selectCheckboxes >
</apex:pageBlockSectionItem>
Anyways some modification try removing
public String getStrength() {
return Strength;
}
public void setStrength(String strength) {
this.Strength = Strength;
}
because you already defined them using this line
public String Strength { get; set; }
Hi I tried,
Tried your steps still getting same error whiel saving VF page Unknown property sosSurvey.SOSSurveys .
controller :
public class sosSurvey {
public String Strength { get; set; }
public List<SelectOption> Items {
get {
List<SelectOption> options = new List<SelectOption>();
Schema.DescribeFieldResult dfr = SOSSurveys__c.strength_against_our_competition__c.getDescribe();
List<Schema.PicklistEntry> pickListEntries = dfr.getPicklistValues();
return options;
}
}
}
------
vf page
<apex:pageBlockSectionItem >
<apex:outputLabel value="2)What do you think is our strength against our competition ?"/>
<apex:selectCheckboxes value="{!SOSSurveys__c.strength_against_our_competition__c}">
<apex:selectOptions value="{!Items}"/>
</apex:selectCheckboxes >
</apex:pageBlockSectionItem>