You need to sign in to do that
Don't have an account?

Trailhead Challenge : Create & Use Custom Controllers
I am stuck on this challenge I am keep getting following error:

Here is my code for apex and visualforce controller:
<apex:page controller="NewCaseListController">
<apex:form >
<apex:pageBlock title="Case List" id="Case_list">
<!-- Case_list -->
<apex:repeat value="{!Case}" var="cs">
<apex:outputLink value="{!cs.Id}">{!cs.Id}</apex:outputLink>
<apex:outputLink value="{!cs.CaseNumber}">{!cs.CaseNumber}</apex:outputLink>
</apex:repeat>
</apex:pageBlock>
</apex:form>
</apex:page>
Public class NewCaseListController
{
public List<Case> getnewCases()
{
List<Case> results = Database.query(
'SELECT Id, CaseNumber' +
'From Case'+
'Where Status=\'New''
);
return results;
}
}
Here is my code for apex and visualforce controller:
<apex:page controller="NewCaseListController">
<apex:form >
<apex:pageBlock title="Case List" id="Case_list">
<!-- Case_list -->
<apex:repeat value="{!Case}" var="cs">
<apex:outputLink value="{!cs.Id}">{!cs.Id}</apex:outputLink>
<apex:outputLink value="{!cs.CaseNumber}">{!cs.CaseNumber}</apex:outputLink>
</apex:repeat>
</apex:pageBlock>
</apex:form>
</apex:page>
Public class NewCaseListController
{
public List<Case> getnewCases()
{
List<Case> results = Database.query(
'SELECT Id, CaseNumber' +
'From Case'+
'Where Status=\'New''
);
return results;
}
}
'Where Status=\'New''
Regards