how can i assign a string to the value of the output text from my controller? Thank you in advance.
example
public List<schedule__c> a = new List<schedule__c>();
public PageReference check() {
checkSched();
return null;
}
public void checkSched(){
for(teacher__c teacher: [select id,name, First_name__c, Subject__c, Room_assignment__c from teacher__c ])
{
if(teacher.Id == selectedtId)
{
string a = ('this is not available for' + teacher.name);
}
}
}
a
is declared as aList<Schedule__c>
outside of your method and as an error value in the method. Although these are in different scopes, you only confuse yourself and the community. There are lots of resources on this, see for example - salesforce.stackexchange.com/questions/890/… as well as endless non Apex examples such as iwombat.com/standards/….