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
| /** | |
| * @Author : Jitendra Zaa | |
| * @Date : 4-Jul-2017 | |
| * @Desc : Controller for Lookup Lightning Component | |
| * */ | |
| public class Lookup { | |
| /** | |
| * Returns JSON of list of ResultWrapper to Lex Components | |
| * @objectName - Name of SObject |
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 implements="force:appHostable, | |
| flexipage:availableForRecordHome,force:hasRecordId" | |
| access="global" > | |
| <aura:attribute name="account" type="Object" | |
| description="The record object to be displayed"/> | |
| <aura:attribute name="accountRecord" type="Object" | |
| description="A simplified view record object to be displayed"/> | |
| <aura:attribute name="recordSaveError" type="String" | |
| description="An error message bound to force:recordData"/> |
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 implements="flexipage:availableForAllPageTypes, | |
| flexipage:availableForRecordHome,force:hasRecordId" | |
| access="global" > | |
| <aura:attribute name="account" type="Object" | |
| description="The record object to be displayed"/> | |
| <aura:attribute name="accountRecord" type="Object" | |
| description="A simplified view record object to be displayed"/> | |
| <aura:attribute name="recordError" type="String" | |
| description="An error message bound to force:recordData"/> |
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
| /** | |
| * Author : Jitendra Zaa | |
| * Desc : This Controller is used by Lightning component to make Http request to Wikipedia | |
| * */ | |
| public class WikiHttpRequest { | |
| @AuraEnabled | |
| public static String getWikiResponse(String searchText, Integer searchLimit){ | |
| HttpRequest req = new HttpRequest(); | |
| req.setEndpoint( 'https://en.wikipedia.org/w/api.php?action=opensearch&search=' + searchText + '&limit='+ |
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
| /** | |
| * Author : Jitendra Zaa | |
| * Desc : Test class for Lightning controller WikiHttpRequest | |
| * */ | |
| @isTest | |
| public class MockWikiHttpRequest implements HttpCalloutMock { | |
| // Implement this interface method | |
| public HTTPResponse respond(HTTPRequest req) { | |
| // Create a fake response | |
| HttpResponse res = new HttpResponse(); |
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="WikiHttpRequest" | |
| implements="force:appHostable,flexipage:availableForAllPageTypes"> | |
| <ltng:require styles="/resource/SLDS090/assets/styles/salesforce-lightning-design-system.css"/> | |
| <aura:attribute name="txtWikiText" type="String"/> | |
| <aura:attribute name="resultLimit" type="Integer" default="4"/> | |
| <div class="slds-card"> | |
| <div class="slds-card__header slds-grid"> | |
| <div class="slds-media slds-media--center slds-has-flexi-truncate"> | |
| <div class="slds-media__figure"> |
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
| ({ | |
| searchWiki : function(component, event, helper) { | |
| if(event.getParams().keyCode == 13){ | |
| helper.wikiCallOut(component.get('v.txtWikiText'),component, helper); | |
| } | |
| }, | |
| searchWikiOnButton : function(component, event, helper){ | |
| helper.wikiCallOut(component.get('v.txtWikiText'),component, helper); | |
| } | |
| }) |
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
| <design:component> | |
| <design:attribute name="resultLimit" label="Result Limit" description="Total number of results to display" /> | |
| </design: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 > | |
| <aura:attribute type="String" name="header" /> | |
| <aura:attribute name="body" type="Aura.Component[]"/> | |
| <aura:attribute name="collpaseText" type="String" default="[ + ]"/> | |
| <div> | |
| <div class="Message"> | |
| <div style="width:90%;float:left"> {!v.header} </div> | |
| <div class="expandCollapse" onclick="{!c.ToggleCollapse}"> {!v.collpaseText} </div> | |
| </div> | |
| <div class="container hide" aura:id="containerCollapsable"> |
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:application > | |
| <c:CollapsiblePanel header="CollapsiblePanel Demo"> | |
| <aura:set attribute="body"> | |
| <ui:message title="Confirmation" severity="confirm" closable="true"> | |
| This is an example of confirmation message. | |
| </ui:message> | |
| <ui:message title="Information" severity="info" closable="true"> | |
| This is an example of message. | |
| </ui:message> | |
| <ui:message title="Warning" severity="warning" closable="true"> |