i am try to make custom "NEW CASE" page and have problem: I'am receive this message when try to post Case: Unknown property 'CaseSSCFixComponentController.Support_Service_Contract'
Part of page:
<apex:page standardcontroller="Case" tabStyle="Case">
<apex:messages />
<apex:sectionheader title="{!$ObjectType.Case.label} Create" subtitle="{!IF(ISNULL(Case.CaseNumber), 'New Case',Case.CaseNumber)}"/>
<apex:form >
<apex:pageblock mode="new" title="{!$ObjectType.Case.label} Create">
<apex:pageblockbuttons >
<apex:commandbutton value="Save" action="{!Save}"/>
<apex:commandbutton value="Cancel" action="{!Cancel}"/>
</apex:pageblockbuttons>
<apex:inputfield value="{!Case.Subject}" required="true"/>
<apex:inputfield value="{!Case.Description}" required="true"/>
...
<c:CaseSSCFixComponent />
<apex:inputfield value="{!Case.ContactId}" required="true"/>
</apex:pageblock>
</apex:form>
component:
<apex:component controller="CaseSSCFixComponentController" allowDML="true" >
<apex:componentBody >
<apex:selectList value="{!Support_Service_Contract}" id="Support_Service_Contract__c" multiselect="false" size="1">
<apex:selectOptions value="{!items}"/>
</apex:selectList>
</apex:componentBody>
controller:
public with sharing class CaseSSCFixComponentController {
String[] Support_Service_Contract = new String[]{};
public List<SelectOption> getItems() {
List<SelectOption> options = new List<SelectOption>();
Profile uProfile = [SELECT Id, Name FROM Profile WHERE Id=:userinfo.getProfileId() LIMIT 1];
if (uProfile.Name != 'Customer Community Login Profile'){
}
else{
User UserInformation = [SELECT Contactid, AccountId FROM User WHERE id=:userinfo.getUserId() LIMIT 1];
LIST<Support_service_Contract__c> SSC = [SELECT Name, id FROM Support_Service_Contract__c WHERE Status_Active__c = TRUE limit 5 ];
if (SSC.size() > 0){
for (Support_service_Contract__c SSCItem : SSC){
options.add(new SelectOption(SSCItem.Id, SSCItem.Name));
}
}
}
return options;
}
public String[] getSupport_Service_Contract() {
return Support_Service_Contract;
}
public void setSupport_Service_Contract(String[] Support_Service_Contract) {
this.Support_Service_Contract = Support_Service_Contract;
}
}
I need help please, what's wrong? My goal: I'm try to replace annoying "lookup field(with filter)" to "selector" in case form