+ Start a Discussion
Orquidea Perez 5Orquidea Perez 5 

Challenge not yet complete???

I am working on the Creating & Using Custom Controllers module. I have tried this a variety of ways and I am still geting a "Challenge not yet complete....here's what's wrong:

"The outputLink component is not binding to the ID of a case"

Here is my code for the page:

<apex:page controller="NewCaseListController">
    <apex:repeat value="{!newCases}" var="case">
        <apex:outputLink value="/{!case.Id}">{!case.CaseNumber}</apex:outputLink>

And here is my code for the Apex Class:

Public class NewCaseListController {

    public String getCase() {
        return null;

List<Case> results = new List<Case>();

private String sortOrder = 'CaseNumber';
public List<Case> getNewCases() {
    results = [SELECT Id, CaseNumber FROM Case WHERE Status = 'New'];

    return results;

Feedback/Help :-)

Thank you, 


Jeff DouglasJeff Douglas

I'm looking at the challenge and it's trying to check for the following code in your Visualforce page:

It looks like what you have is correct. Try making your code lowercase and see if that helps. It shouldn't make a difference but you never know.

Orquidea Perez 5Orquidea Perez 5
Tried that, no luck :-(
Jeff DouglasJeff Douglas
I just tried your code with some problems. I can save the Controller successfully, but when pasting in your Visualforce code, I get the error: "Error: Unknown property 'String.Id'". Are you sure this is the correct code?

Jeff Douglas
Orquidea Perez 5Orquidea Perez 5
Hi Jeff, I replaced the code in the VF page with the following:
  • case.Id case.CaseNumber
It saves without any errors, but when I submit the challenge I still get the same message: The outputLink component is not binding to the ID of a case Thanks, Orquidea Perez Salesforce Administrator Business Systems Analyst D: 210.630.6476 Advisors Asset Management 28025 IH 10 West Boerne, TX 78006 www.aamlive.com
Jeff DouglasJeff Douglas
Can you send me an email at jdouglas@salesforce.com and we can work on it?
Rich FiekowskyRich Fiekowsky
I think you must get remove the getCase() method. The "case" for your case.id and case.CaseNumber (in the apex:outputLink) is the var="case" in the apex:repeat . After that, coding <apex:outputLink value="/{!case.Id}">.... should pass the challenge, even though coding a more complete URL with URLFOR($Action.... may seem correct.