You need to sign in to do that
Don't have an account?
anmi ch 6
Failed to save campingList.cmp: Invalid definition for null:CampingListController: ApexService.getType() return null with currentNamespace: c, namespace: null, name: CampingListController: Source
hi guys ,
while i am saving the code i am getting this error"Failed to save campingList.cmp: Invalid definition for null:CampingListController: ApexService.getType() return null with currentNamespace: c, namespace: null, name: CampingListController: Source" I do not know where ii am doing the error and below is my code .
campinglist.cmp
<aura:component controller="CampingListController" >
<aura:attribute name="items" type="Camping_Item__c[]" />
<aura:handler name="init" action="{!c.doInit}" value="{!this}"/>
<aura:attribute name="newItem" type="Camping_Item__c" default="{'sObjectType':'Camping_Item__c','Quantity__c':0,'Price__c':0}" />
<br/><br/>
<p>Name:
<ui:inputText aura:id="name" value="{!v.newItem.Name}" Label="Name" />
</p><br/>
<p>Quantity:
<ui:inputNumber aura:id="quantity" value="{!v.newItem.Quantity__c}" Label="Quantity" />
</p><br/>
<p>Price:
<ui:inputCurrency aura:id="price" value="{!v.newItem.Price__c}" Label="Price" />
</p><br/>
<p>Packed?:
<ui:inputCheckBox value="{!v.newItem.Packed__c}" Label="Packed" />
</p><br />
<ui:button label="Submit" press="{!c.PushItems}" />
<aura:iteration items="{!v.items}" var="item">
<p> <ui:outputText value="{!item.Name}" /> </p>
<p> <ui:outputNumber value="{!item.Quantity__c}" /> </p>
<p> <ui:outputCurrency value="{!item.Price__c}" /> </p>
<p> <ui:outputCheckbox value="{!item.Packed__c}" /> </p>
</aura:iteration>
</aura:component>
can anyone help me .
while i am saving the code i am getting this error"Failed to save campingList.cmp: Invalid definition for null:CampingListController: ApexService.getType() return null with currentNamespace: c, namespace: null, name: CampingListController: Source" I do not know where ii am doing the error and below is my code .
campinglist.cmp
<aura:component controller="CampingListController" >
<aura:attribute name="items" type="Camping_Item__c[]" />
<aura:handler name="init" action="{!c.doInit}" value="{!this}"/>
<aura:attribute name="newItem" type="Camping_Item__c" default="{'sObjectType':'Camping_Item__c','Quantity__c':0,'Price__c':0}" />
<br/><br/>
<p>Name:
<ui:inputText aura:id="name" value="{!v.newItem.Name}" Label="Name" />
</p><br/>
<p>Quantity:
<ui:inputNumber aura:id="quantity" value="{!v.newItem.Quantity__c}" Label="Quantity" />
</p><br/>
<p>Price:
<ui:inputCurrency aura:id="price" value="{!v.newItem.Price__c}" Label="Price" />
</p><br/>
<p>Packed?:
<ui:inputCheckBox value="{!v.newItem.Packed__c}" Label="Packed" />
</p><br />
<ui:button label="Submit" press="{!c.PushItems}" />
<aura:iteration items="{!v.items}" var="item">
<p> <ui:outputText value="{!item.Name}" /> </p>
<p> <ui:outputNumber value="{!item.Quantity__c}" /> </p>
<p> <ui:outputCurrency value="{!item.Price__c}" /> </p>
<p> <ui:outputCheckbox value="{!item.Packed__c}" /> </p>
</aura:iteration>
</aura:component>
can anyone help me .
Have you created an apex class by the name CampingListController?
Abdul i did not created
Therefore you are getting this message you have two solutions
Were my suggestions helpful?