I want to particular value from Custom Setting. When i Click on Checkbox i want that Custom setting Value only.Custom Setting is List Type
<apex:page Controller="ServiceTableCtrl" sidebar="false" showHeader="false">
<apex:form >
<apex:pageblock >
<apex:pageBlockSection columns="1" title="Select Services below:" >
<apex:pageblockTable value="{!wrapserviceList}" var="s">
<apex:column >
<apex:inputCheckbox value="{!s.selected}"/>
</apex:column>
<apex:column value="{!s.Index}" headerValue="Sr.No"/>
<apex:column value="{!s.service.Service__c}"/>
<apex:column headerValue="Time" >
<apex:inputText value="{!s.service.Time__c}" disabled="{!if(s.service.Time__c != null,true,false)}" />
</apex:column>
<apex:column headerValue="Price" >
<apex:inputText value="{!s.service.Price__c}" disabled="{!if(s.service.Price__c != null,true,false)}" />
</apex:column>
</apex:pageblockTable>
<center>
<apex:outputPanel >
<apex:outputLabel >Select Service Type: </apex:outputLabel>
<apex:selectList title="Select Service Type" value="{!ServiceType}" multiselect="false" size="1">
<apex:selectOption itemValue="Preparing showroom" itemLabel="Preparing showroom"/>
<apex:selectOption itemValue="Customer delivery" itemLabel="Customer delivery"/>
</apex:selectList>
</apex:outputPanel>
</center>
</apex:pageblockSection>
<apex:pageBlockButtons location="Bottom" >
<apex:commandButton value="Submit" action="{!submit}" onclick="window.close();" />
<apex:commandButton value="Cancel" onclick="window.close();"/>
</apex:pageBlockButtons>
</apex:pageblock>
</apex:form>
</apex:page>
Controller
public with sharing class ServiceTableCtrl {
public String ServiceType { get; set; }
public List<Showroom_Cleaning_Service__c> showroomservicelist {get;set;}
public List<WrapperService> wrapserviceList {get;set;}
public List<WrapperService> wrapservice{get;set;}
public Integer opget{get;set;}
public String Subject = 'Prepare Cleaning';
public String Status = 'Not Started';
public String Priority = 'Normal';
public String Description = 'Prepare Vehicle';
public Integer Reminder = 0;
public Boolean IsReminder = false;
public Id TaskOwnerId;
public Id VehId;
public ServiceTableCtrl ()
{
this.Vehid = ApexPages.currentPage().getParameters().get('id');
showroomservicelist =new List<Showroom_Cleaning_Service__c>();
showroomservicelist =Showroom_Cleaning_Service__c.getall().values();
wrapserviceList =new List<WrapperService>();
Integer i=1;
for(Showroom_Cleaning_Service__c s:showroomservicelist)
{
WrapperService w=new WrapperService(i,s);
wrapserviceList.add(w);
i++;
}
}
public Void Submit()
{
// Creating Task for the preparer
TaskOwnerId = [Select ownerId from dealer__Vehicle_Inventory__c where id =: VehId limit 1].ownerId;
Subject = ServiceType;
//TaskUtility.createTask(Subject, VehId , Status, Priority, Description, IsReminder, Reminder, TaskOwnerId);
//createEvent(String Subject, Id ObjectId, String Description, Boolean IsReminder, Integer Reminder, DateTime EventDateTime, Integer Duration, Id OwnerId)
showroomservicelist =new List<Showroom_Cleaning_Service__c>();
showroomservicelist =Showroom_Cleaning_Service__c.getall().values();
}
public Class WrapperService
{
public Integer index{get;set;}
public Showroom_Cleaning_Service__c service{get;set;}
public Boolean Selected{get;set;}
public WrapperService(Integer i,Showroom_Cleaning_Service__c s)
{
this.Index=i;
this.service=s;
}
}
}