function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
<!--Lightning Component--><aura:component controller="recieveVal"> <aura:attribute name="vfVal" type="String" default=""/> <aura:attribute name="ifmsrc" type="String" default=""/> <aura:handler name="init" value="{!this}" action="{!c.myAction}"/> {!v.vfVal} <ui:button press="{!c.getValue}">Get Value</ui:button><br/><br/> <iframe id="myFrame" style="border: 1px solid" src="{!v.ifmsrc}" /> </aura:component>
//component controller ({ myAction : function(component, event, helper) { component.set("v.ifmsrc", 'https://wk-aakanksha-dev-ed.lightning.force.com/apex/recieveVal'); }, getValue : function(component, event, helper) { var action = component.get("c.getVfVal"); action.setCallback(this,function(a){ var state = action.getState(); if(state=="SUCCESS"){ component.set("v.vfVal",a.getReturnValue()); } }); $A.enqueueAction(action); var d = new Date(); var n = d.getTime(); component.set("v.ifmsrc", 'https://wk-aakanksha-dev-ed.lightning.force.com/apex/recieveVal?t='+ n+'&var='+val ); } })
//Apex Controller public with sharing class recieveVal { public static string VfPageVar{get; set;} public static void sendValue(){ if(str != VfPageVar){ str = VfPageVar; } } private static string str; @AuraEnabled public static string getVfVal(){ showData.sendValue(); return str; } }
<!--Vf page--> <apex:page controller="recieveVal" showHeader="false" standardStylesheets="false"> <apex:form id="theform"> <apex:inputText value="{!VfPageVar}"> <apex:actionSupport event="onchange" action ="{!sendValue}"/> </apex:inputText> page variable: <apex:outputText value="{!VfPageVar}" id="VfPage"/> </apex:form> </apex:page>
<apex:page sidebar="false" showHeader="true"> <apex:includeLightning /> <div id="DataContainer" /> <script> $Lightning.use("c:LightningAppName", function() { $Lightning.createComponent("c:LightningCompName", { att1: "{!$CurrentPage.parameters.paramId1}",//Url parameter 'paramId1' att2: "{!$CurrentPage.parameters.paramId2}"//Url parameter 'paramId2' }, "DataContainer", function(cmp) { }); }); </script> </apex:page>
<aura:application access="GLOBAL" extends="ltng:outApp"> <aura:dependency resource="c:LightningCompName" /> </aura:application>
<aura:component controller="PriceListUpdateController" > <aura:attribute name="att1" type="String" default="" /> <aura:attribute name="att2" type="String" default="" /> {!v.att1} <br/> {!v.att2} </aura:component>
Please try this code:
Component Code: Component Controller: Apex Controller: Visual Force Page: Hope this helps.
Kindly mark this as solved if my reply was helpful.
Thanks,
Nagendra
You can use as given Below
LightningAppName .app LightningCompName.cmp
I hope this will help you
Regards
Ashif
I do not have an app. I have to pass the value of currently clicked tab to the component.How this can be done?