• Nicholas Santoso
  • NEWBIE
  • -1 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
I am having issues saving the following Lightning component as part of the Using Apex in Components:

-Given an existing Apex class that can be found here, create a component that displays the case's subject, description and status.The component must be named 'DisplayCase'.
-The component must refer to the 'DisplayCaseController' Apex class. Copy and paste that class into your Developer Edition using the Developer Console.
-The component must have an attribute named 'record' to hold the Case record.
-The component must display the Subject, Description, and Status values of the 'record' attribute.
-The client-side controller for the component must bind to the 'getCaseFromId' method of the Apex controller to fetch the value of a Case record.
-Note that while the Apex class accepts a null and returns a default case, there are various ways to hand the ID to the controller.



FIELD_INTEGRITY_EXCEPTION
Failed to save undefined: No ATTRIBUTE named label found: Source

Component:
<aura:component Controller="DisplayCaseController">
    <aura:attribute name="record" type="Case[]"/>
    <ui:button label="Get Cases" press="{!c.getCaseFromId}"/>
    <ui:outputText Label="Case Subject:" value="{!case.Subject}"/><br/>
    <ui:outputText Label="Case Description:" value="{!case.Description}"/><br/>
    <ui:outputText Label="Case Status:" value="{!case.Status}"/><br/>
</aura:component>

I'm not sure what the issue is. Help...

Controller:
({
    getCaseFromId: function(component){
        var action = component.get("c.getCases");
        action.setCallback(this, function(a){
        	component.set("v.record", a.getReturnValue());
        });
	 $A.enqueueAction(action);
    }
})