Created
February 9, 2015 11:43
-
-
Save pchittum/60668366e4004cbefed5 to your computer and use it in GitHub Desktop.
Example code for force:input/outputField error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ({ | |
| doInit: function(component, evt, helper) { | |
| console.log('entered init'); | |
| var action = component.get("c.getAccount"); | |
| console.log('Apex METHOD:') | |
| console.log(action); | |
| action.setCallback(this, function(a) { | |
| console.log('entered callback'); | |
| var retValue = a.getReturnValue(); | |
| console.log(retValue); | |
| component.set("v.account", retValue); | |
| console.log('finished callback'); | |
| }); | |
| console.log('about to enqueue action'); | |
| $A.enqueueAction(action); | |
| console.log('finished init'); | |
| }, | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <aura:component controller="AccountController"> | |
| <aura:attribute name="account" type="Account"/> | |
| <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> | |
| <ui:inputText value="{!v.account.Name}"/> | |
| </aura:component> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <aura:component controller="AccountController"> | |
| <aura:attribute name="account" type="Account"/> | |
| <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> | |
| <force:inputField value="{!v.account.Name}"/> | |
| </aura:component> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment