I am having a visualforce page inside which I am using a lightning component. Its shown below
$Lightning.use("c:VFPage", function() {
$Lightning.createComponent(
"c:EditAttachment",
{
attachmentId: attId,
attachmentName: attName,
attachmentDesc: attDesc,
isPrivate: isPrivate
},
"LightningContainer",
function(cmp) {
}
);
});
Inside the lightning component, I am performing an edit on Attachment record and saving it.
I want to reload the whole visualforce page after the saving of the attachment is successful. Is there any way to do this?
Best Answer
Simply Use
location.reload();
on the Success callback of the Attachment/record Save.It reloads the page.You can also pass the attributes from lightning component to VF page by Fire the Navigate event to handle it on the VF page, Like this
Controller:
VF Page:
But It was somewhere like hacking. The Only Happy path was Handling the Navigate event, not getting params.