13

Eureka! Raising the Application event from the component: // c:MyController.js onMyAttributeChanged : function (c, e, h) { var myEvent = $A.get("e.c.MyApplicationEvent"); myEvent.setParam("myEventData1", "some event data"); myEvent.fire(); } Handling the Application event on the Visualforce page: // My.vfp within <script></script> ...


8

When Lightning Out App is used there is no consumption of any API calls . Just tested with couple of lightning out POC I have for DF16 .The way lightning out runs is it uses connected app for session Id and then it does not use any SOAP or the REST API calls of the platform and instead it uses @AuraEnabled classes and hence no usage was logged in my org ...


8

<lightning:notificationsLibrary> and force:showToast are both unsupported in the Lightning Out context, because they're handled by the Lightning Experience itself. Note that the Component Library page for <lightning:notificationsLibrary> shows Experience Lightning Experience, Lightning Communities, Salesforce Mobile App while force:...


8

Have you tried adding Viewport Meta Tag With width Or initial-scale in VF page as below. <meta name="viewport" content="width=device-width, initial-scale=1.0"/> Without a viewport meta tag, mobile devices render pages at typical desktop screen widths, and then scale the pages to fit the mobile screens. Setting the viewport enables you to control the ...


7

So this error was being caused because the Lightning App c:yyyDataInput was in error and failing to compile. This is because over the weekend Salesforce (apparently) ceased the existance of the standard component ui:input So our app listed all it's dependencies (about 30 of them) - which we do for documentation and best practise reasons, and one of our ...


6

lightning:empApi is not supposed to work using VF page/Lightning out. If you see the Experience section in the documentation of this component, you will find as below. Only those components which has Lightning Out / Visualforce listed in the Experience section will work in that experience. Experience Lightning Experience, Salesforce Mobile App


6

Conversion is mostly about changing things around. If you're committed to the effort, it can be done. The degree of difficulty will largely depend on the complexity of the original controller. Well-designed controllers should lend themselves to conversion easily, while less well-groomed code could end up being a nightmare. Step 0: Organize Your Code If ...


4

I've managed to get a simple Lightning component working in a VF page using the following link: Peter Knolle: Lightning Components in VisualForce It was listed in the links that I checked, but I didn't use any of the code, just used as a source to check against what I was doing. When I did an almost direct copy/paste (a few lines removed because fields didn'...


4

I believe the issue is access control kicking in on MYNAMESPACE:NewsFeed - there is nothing in the linkage from VF -> LO -> Lightning Out that would automatically understand that the calling VF page is in the same namespace as the component. To confirm this please change MYNAMESPACE:NewsFeed to have <aura:component access="GLOBAL"> and retest the ...


4

You can use a DIV and SLDS spinner Here is a sample of what we use on my project. <div id="LoadingvfDIV" class="slds-spinner_container" style="display:block;"> <div class="slds-spinner slds-spinner--large" aria-hidden="false" role="alert"> <div class="slds-spinner__dot-a"></div> &...


4

When your component runs within one/one.app container(i.e in LEX and SF1), all force:xxx event such as $A.get("e.force:showToast"); would return an Object. Since the component is inside VF page, the call to $A.get("e.force:showToast"); would return undefined So all you have to do is have an if to check if the event exist or not. //true only if the ...


4

No. Lightning component won't work without setting my domain. There are many reasons that My Domain is required and lightning component will not work unless you set a domain. Useful link - Knowledge Article - My Domain Lightning Components


4

I have done something similar to make a call to the Salesforce Rest API from lightning (well technically Apex). The session that lightning produces is an isolated session that can't be used anywhere else. It is specific to lightning only. In my use case, I needed to get some information about a list view that wasn't exposed in describe calls or querying the ...


4

I don't see any issues using window.open(). According to Locker API Viewer open is supported. I have a lightning component that leverages LDS sitting in lighting experience that opens a tableau external report using this method. Reference: Leveraging Lightning Data Service in Lightning Framework NOTE: This is my own blog post but the similar code is ...


3

Step 5: have your lightning component action callback raise an event that your VF page JavaScript can listen for and have the VF page navigate away or refresh without params, etc. A couple examples of the VF markup to handle an event raised by a lightning component: Lightning Components for Visualforce firing events Is there a way to handle a Lightning ...


3

Unlike the previous suggested answer, access="GLOBAL" was not missing in the components but it was missing in the lightning app. <aura:application extends="ltng:outAppUnstyled" access="GLOBAL"> // My dependencies </aura:application> It took several weeks chatting with multiple tiers of Salesforce support to figure this out.


3

You can add a loading section or spinner in a div, directly at the top of your Visualforce Page (let's say before your <div id="lightning" />): <div id="loading"> // Put your spinner here </div> Then, in the callback of your $Lightning.createComponent call, just hide this div by replacing the //do something comment: document....


3

There are 2 to 3 ways i can think of: 1.Group components based on functionalities and create pages accordingly and handle navigation between VF pages 2.In a single container component have the child components inside aura:if and then use the if condition to open up visibility based on the wizard or functionality step 3.Using dynamic component creation and ...


3

The issue is exactly what Tony outlined above. Until this has been officially fixed by Salesforce, I suggest you move the SLDS folder to the location that's being referenced by the browser/server. Using the Network Panel via Browser Console, locate the reference to the icon(s) Click on the item to view its "Request URL". Something to note, the server ...


3

I wonder if you are running into issues with the line event.$param$.recordId Try using event.getParam('recordId'). Perhaps the way you access the parameter is no longer supported.


3

Is there any way we can still continue to use the extension with our Lightning component? Sure you can. But as you realized you will need to have static methods and that you will need to annotate the methods with @AuraEnabled. But conversions are not as easy as thought. Because the time you convert a VF controller method to that required by aura ...


3

How can we expose lightning component in an existing web page, with the authentication happening in backend or without user having to do that extra click You have to import lightning.out JS from your mydomain and then use$Lightning.use() function which takes authToken (SessionId , OAuth access). Now in your server back you can use any SF's username /...


2

Standard components cannot be modified. However you can add custom components to your Napili community pages (you need update your template to the Winter ’16 version), and there are two approaches: You could create a subclass for some components marked extensible="true" such as ui:button, provided of course that the behavior that you want to modify can be ...


2

Yes, the contents of your ltng:outApp serve the single purpose of providing one or more tags to inform Lightning Framework about the components and events you want to be able to use


2

You will need a proper HTTPS external url with a domain .Salesforce Lightning Out will not work with local host . You may want to try using a simple node set up on the Heroku instead .Here is a sample app on Node with Heroku for reference .


2

It appears that $resource is not correctly absolutizing URLs like it is supposed to - known bug tracking this is W-3633321. This issue is not specific to Locker however. There is another issue recently identified in the newly introduced work to support removal of CSP unsafe-inline/eval that is related in that it's another relative versus absolute URL ...


2

<button /> without type="button" inside a form triggers submit action when clicked. So all you have to do is add the type="button" to the button tag. <button type="button" onclick="{!c.dothisthing}">do this thing</button> Also have a look at the post here it will help.


2

Make sure your app is globally accessible (i.e: extends ltng:outApp) and create a dependency for the components it uses. <aura:application access="GLOBAL" extends="ltng:outApp"> <aura:dependency resource="c:aimiaLgtrichTextInput"/> </aura:application> Then you can call it on the visualforce page using the code bellow: <apex:page&...


2

Nothing "silly" about your questions - this stuff is complex and still very new to everyone. When the container is Visualforce (Lightning Components for Visualforce uses LO but adds a few things) we've tried to reduce some of the effort by providing the new Visualforce component apex:includeLightning that will handle the details of generating the correct ...


2

A solution for similar problem has been provided here https://developer.salesforce.com/blogs/developer-relations/2017/01/lightning-visualforce-communication.html Some relevant section from the above blog: Visualforce Page to Lightning Component In this second scenario, we still have the same arrangement: a Visualforce page wrapped in a Lightning component....


Only top voted, non community-wiki answers of a minimum length are eligible