• Stefan van der Knaap
  • NEWBIE
  • 4 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hi,

I'm stuck with a Lightning component that doesn't render. I get a strange error immediately: This page has an error. You might just need to refresh it. Error during init [Cannot read property 'apply' of undefined].

I'm stuck now for a long time and can't figure out what is wrong with the code. Here you can see my code:

Component:
<aura:component controller="CaseActivityTrackerCtrl" implements="flexipage:availableForAllPageTypes">

	<aura:attribute name="recordId" type="String" default='500b000000cOxah' />
	<aura:attribute name="case" type="Case" />
	<aura:attribute name="tasks" type="Task[]"/>

	<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>

	<c:CaseActivityTrackerHeader />

	<aura:iteration items="{!v.tasks}" var="task">
		<c:CaseActivityTrackerTimeline task="{!task}"/>
	</aura:iteration>

	<aura:iteration items="{!v.tasks}" var="task">
		<h3>{!v.task.Subject}</h3>
	</aura:iteration>

	<h3>{!v.case.Subject}</h3>
	<h3>{!v.recordId}</h3>

</aura:component>
({
    doInit: function(component, event, helper) {
    	//helper.getCase(component, event);
		//helper.getTasks(component, event);
        // Set the attribute value. 
        // You could also fire an event here instead.
        component.set("v.recordId", "controller init magic!");
    }
})
App
 
<aura:application extends="force:slds">
    
    <c:CaseActivityTracker />
    
    <!-- 
    <c:camping />
	-->
    
</aura:application>

I really somebody can help me!
Thanks in advance, Stefan
 
Hi,

I'm stuck with a Lightning component that doesn't render. I get a strange error immediately: This page has an error. You might just need to refresh it. Error during init [Cannot read property 'apply' of undefined].

I'm stuck now for a long time and can't figure out what is wrong with the code. Here you can see my code:

Component:
<aura:component controller="CaseActivityTrackerCtrl" implements="flexipage:availableForAllPageTypes">

	<aura:attribute name="recordId" type="String" default='500b000000cOxah' />
	<aura:attribute name="case" type="Case" />
	<aura:attribute name="tasks" type="Task[]"/>

	<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>

	<c:CaseActivityTrackerHeader />

	<aura:iteration items="{!v.tasks}" var="task">
		<c:CaseActivityTrackerTimeline task="{!task}"/>
	</aura:iteration>

	<aura:iteration items="{!v.tasks}" var="task">
		<h3>{!v.task.Subject}</h3>
	</aura:iteration>

	<h3>{!v.case.Subject}</h3>
	<h3>{!v.recordId}</h3>

</aura:component>
({
    doInit: function(component, event, helper) {
    	//helper.getCase(component, event);
		//helper.getTasks(component, event);
        // Set the attribute value. 
        // You could also fire an event here instead.
        component.set("v.recordId", "controller init magic!");
    }
})
App
 
<aura:application extends="force:slds">
    
    <c:CaseActivityTracker />
    
    <!-- 
    <c:camping />
	-->
    
</aura:application>

I really somebody can help me!
Thanks in advance, Stefan