답변 23개
I'm not quite sure why you have 3 methods (1 getCase, and 2 getCases). Really you just need the one to return the Case object and all the detail of it. Your other get methods aren't doing anything because they are returning null.I'm not an expert, but I made some modifications, it seems to complile for me, but I haven't tested it, because we don't use cases.Note, I removed your sort order because I wasn't sure what you wanted to sort by. Ie it should be ORDER By Name ASC etcAlso, there shouldn't be a + after ASC because there's nothing else there. <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>
Hope this helps.Public class NewCaseListController {
List<Case> results = new List<Case>();
private String sortOrder = 'CaseNumber';
public List<Case> getCase() {
results = [SELECT Id, CaseNumber FROM Case WHERE Status = 'New'];
return results;
}
}