вылазит ошибка Unknown property ‘HospitalController.doctors’
я уже что-то не соображаю в чем дело
<apex:page docType="html-5.0" controller="HospitalController" showHeader="false" sidebar="false">
<apex:form >
<apex:pageBlock title="Appointmets Table">
<!-- Select a doctor -->
<apex:pageBlockSection >
<apex:selectList label="Select a doctor" value="{!selectedDoctor}" size="1">
<apex:selectOptions value="{!doctors}"/>
<apex:actionSupport event="onchange"
reRender="app_list1, app_list2, app_list3"/>
</apex:selectList>
</apex:pageBlockSection>
<!-- Select a patient -->
<apex:pageBlockSection >
<apex:selectList label="Select a patient" value="{!selectedPatient}" size="1">
<apex:selectOptions value="{!patients}"/>
</apex:selectList>
</apex:pageBlockSection>
<!-- Appointment date -->
<apex:pageBlockSection >
<apex:inputField label="Appointment date"
value="{!appt.Appointment_Date__c}"
required="false"/>
</apex:pageBlockSection>
<!-- Duration -->
<apex:pageBlockSection >
<apex:inputField label="Duration in minutes"
value="{!appt.Duration__c}"
required="false"/>
</apex:pageBlockSection>
<!-- Add new appointment button -->
<apex:pageBlockSection >
<apex:commandButton immediate="false" reRender="app_list3" action="{!addNewAppt}" value="Add New Appointment" />
</apex:pageBlockSection>
<apex:pageBlockTable id="app_list3" value="{!tableAppointments}" var="apt">
<apex:column headerValue="Action">
<apex:outputLink value="{!URLFOR('/' + apt.Id)}">
View
</apex:outputLink>
</apex:column>
<apex:column headerValue="Doctor's Name" value="{!apt.Doctor__c}"/>
<apex:column headerValue="Patient's Name" value="{!apt.Patient__c}"/>
<apex:column headerValue="Appointment Date" value="{!apt.Appointment_Date__c}"/>
<apex:column headerValue="Duration in minutes" value="{!apt.Duration__c}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
```code
public class HospitalController {
public Appointment__c appt {get; set;}
public String selectedDoctor {get; set;}
public String selectedPatient {get; set;}
public Datetime appDate {get; set;}
public Integer duration {get; set;}
public HospitalController() {
this.appt = new Appointment__c();
this.selectedDoctor = '';
this.selectedPatient = '';
this.appDate = System.now();
this.duration = 30;
}
public PageReference addNewAppt() {
try {
this.appt.Doctor__c = selectedDoctor;
this.appt.Patient__c = selectedPatient;
insert this.appt;
}
catch (Exception ex) {
ApexPages.addMessages(ex);
}
return NULL;
}
}