-
ChatterFeed
-
0Best Answers
-
3Likes Received
-
0Likes Given
-
9Questions
-
7Replies
How to close the parent LWC component from child LWC component popup model on button click.?
I have a lightning Web component like this:
Component A: Parent Component
Component B: Child Component
I'm calling Component B from Component A on button click.
I want to implent either of the below. Any suggestions/help appreciated.
1. I want to close the Component A automatically when Component B popup model is showed up on button click.
2. Else I want close the Component A automatically when Component B popup model is closed.
Component A: Parent Component
Component B: Child Component
I'm calling Component B from Component A on button click.
I want to implent either of the below. Any suggestions/help appreciated.
1. I want to close the Component A automatically when Component B popup model is showed up on button click.
2. Else I want close the Component A automatically when Component B popup model is closed.
- shivram survase
- July 09, 2022
- Like
- 0
- Continue reading or reply
how to store value permanently in apex controller
Hi,
I'm using same controller for 2 vf pages.The data entered on one vf page wanted to display on other vf page.
When I try to display data on other vf page getting NULL.I'm using <Apex:Actionfunction> for passing the passing the perameter
and calling the method defined in Controller.Also used Actionpoller to rerender the certain portion on vf page.
Help is appreciated in advance !
Here is the code..
---------- Controller method --------------------
public void echoVal()
{
system.debug('After 30 Seconds==>'+enteredText1);
val = 'You have entered : - '+enteredText1;
system.debug('Testing..parameter==>'+val);
}
-------------- VF page1 (getting data from user) ---------------------
Enter SR_Description :
<apex:inputText id="txt1" />
<apex:outputPanel id="resultPanel">
<b><apex:outputLabel value="{!val}" />
</b></apex:outputPanel>
<apex:actionFunction name="echo" action="{!echoVal}" reRender="resultPanel">
<apex:param name="firstParam" assignTo="{!enteredText1}" value="" />
</apex:actionFunction>
<apex:outputLabel rendered="{!uploadFlag}" value="{!uploadMessage}"></apex:outputLabel>
<!-- <center><apex:commandButton value="Save" onclick="CallContr();"/> -->
<center><apex:commandButton value="Click here" onclick=" return callActionMethod();"/>
<script>
function callActionMethod()
{
alert('working..');
var txtVal1 = document.getElementById("{!$Component.theForm.SRpageblock.pgbSec.txt1}").value;
alert(txtVal1 );
/*Below Method is generated by "apex:actionFunction" which will call Apex Method "echoVal" */
echo(txtVal1);
return false;
}
</script>
------------- VF Page (Where data is displaying) -------------------
<apex:form id="frmSRdescription">
<apex:actionPoller reRender="frmSRdescription" interval="30" rendered="true" action="{!echoVal}"/>
<apex:pageBlock >
<apex:outputLabel value="{!test}"></apex:outputLabel>
<b><apex:outputLabel value="{!val}" /></b> <b><apex:outputLabel value="{!enteredText1}" /></b>
I'm using same controller for 2 vf pages.The data entered on one vf page wanted to display on other vf page.
When I try to display data on other vf page getting NULL.I'm using <Apex:Actionfunction> for passing the passing the perameter
and calling the method defined in Controller.Also used Actionpoller to rerender the certain portion on vf page.
Help is appreciated in advance !
Here is the code..
---------- Controller method --------------------
public void echoVal()
{
system.debug('After 30 Seconds==>'+enteredText1);
val = 'You have entered : - '+enteredText1;
system.debug('Testing..parameter==>'+val);
}
-------------- VF page1 (getting data from user) ---------------------
Enter SR_Description :
<apex:inputText id="txt1" />
<apex:outputPanel id="resultPanel">
<b><apex:outputLabel value="{!val}" />
</b></apex:outputPanel>
<apex:actionFunction name="echo" action="{!echoVal}" reRender="resultPanel">
<apex:param name="firstParam" assignTo="{!enteredText1}" value="" />
</apex:actionFunction>
<apex:outputLabel rendered="{!uploadFlag}" value="{!uploadMessage}"></apex:outputLabel>
<!-- <center><apex:commandButton value="Save" onclick="CallContr();"/> -->
<center><apex:commandButton value="Click here" onclick=" return callActionMethod();"/>
<script>
function callActionMethod()
{
alert('working..');
var txtVal1 = document.getElementById("{!$Component.theForm.SRpageblock.pgbSec.txt1}").value;
alert(txtVal1 );
/*Below Method is generated by "apex:actionFunction" which will call Apex Method "echoVal" */
echo(txtVal1);
return false;
}
</script>
------------- VF Page (Where data is displaying) -------------------
<apex:form id="frmSRdescription">
<apex:actionPoller reRender="frmSRdescription" interval="30" rendered="true" action="{!echoVal}"/>
<apex:pageBlock >
<apex:outputLabel value="{!test}"></apex:outputLabel>
<b><apex:outputLabel value="{!val}" /></b> <b><apex:outputLabel value="{!enteredText1}" /></b>
- shivram survase
- November 24, 2015
- Like
- 1
- Continue reading or reply
How can i sort the wrapper list on more than 1 field?
Here is my code.. and It works perfectly for sorting on Name field.
I want to sort on Name field,If Names are same ,Sorting should be on Email field.
global class cContact implements Comparable{
public Contact cnt {get; set;}
public Boolean cntSelected {get; set;}
public cContact(Contact c) {
cnt = c;
cntSelected = false;
}
global Integer compareTo(Object compareTo) {
cContact compareToCnt = (cContact)compareTo;
String s1=cnt.Name;
String s2=compareToCnt.cnt.Name;
return (s1.compareTo(s2));
}
}
Help is appreciated in advance.
I want to sort on Name field,If Names are same ,Sorting should be on Email field.
global class cContact implements Comparable{
public Contact cnt {get; set;}
public Boolean cntSelected {get; set;}
public cContact(Contact c) {
cnt = c;
cntSelected = false;
}
global Integer compareTo(Object compareTo) {
cContact compareToCnt = (cContact)compareTo;
String s1=cnt.Name;
String s2=compareToCnt.cnt.Name;
return (s1.compareTo(s2));
}
}
Help is appreciated in advance.
- shivram survase
- May 07, 2015
- Like
- 0
- Continue reading or reply
Hi,I wanted to excute inner <aura:if> only once.I'm unable to set the attribute value to false.Help is appreciated.
<aura:attribute name="native" type="boolean" default="true"/>
<aura:attribute name="accounts" type="Account[]"/>
<div class="pink">
<table style="width:100%">
<aura:iteration var="acc" items="{!v.accounts}">
<aura:if isTrue="{!acc.Id != ' '}">
<aura:if isTrue="{!v.native}">
<tr>
<th>Account Id</th>
<th>Name</th>
<th>Country</th>
<th>City</th>
<th>Email</th>
</tr>
{!v.native}=false;
component.set("v.native",'false');
{!v.native};
</aura:if>
<tr>
<td>{!acc.Id} </td>
<td>{!acc.Name} </td>
<td>{!acc.Country__c} </td>
<td> {!acc.City__c} </td>
<td>{!acc.Email__c}</td>
</tr>
</aura:if>
</aura:iteration>
</table>
</div>
I wanted to set "native" attribute to false without using the client controller.If anyone having another solution to this problem.
Please share it.
<aura:attribute name="accounts" type="Account[]"/>
<div class="pink">
<table style="width:100%">
<aura:iteration var="acc" items="{!v.accounts}">
<aura:if isTrue="{!acc.Id != ' '}">
<aura:if isTrue="{!v.native}">
<tr>
<th>Account Id</th>
<th>Name</th>
<th>Country</th>
<th>City</th>
<th>Email</th>
</tr>
{!v.native}=false;
component.set("v.native",'false');
{!v.native};
</aura:if>
<tr>
<td>{!acc.Id} </td>
<td>{!acc.Name} </td>
<td>{!acc.Country__c} </td>
<td> {!acc.City__c} </td>
<td>{!acc.Email__c}</td>
</tr>
</aura:if>
</aura:iteration>
</table>
</div>
I wanted to set "native" attribute to false without using the client controller.If anyone having another solution to this problem.
Please share it.
- shivram survase
- March 31, 2015
- Like
- 0
- Continue reading or reply
Hi,How can i use the method parameter in LIKE query to perform substring operation?Help is appreciated in advance.
My code is as follow:
public class AccountController {
@AuraEnabled
public static List<Account> getAccounts(String accName,String accCountry) {
List<Account> objAccount = [SELECT Id, Name, Country__c FROM Account where name like '%:accName%' ];
return objAccount;
}
}
I need to perform searching on 'accName' value as a substring.
public class AccountController {
@AuraEnabled
public static List<Account> getAccounts(String accName,String accCountry) {
List<Account> objAccount = [SELECT Id, Name, Country__c FROM Account where name like '%:accName%' ];
return objAccount;
}
}
I need to perform searching on 'accName' value as a substring.
- shivram survase
- March 18, 2015
- Like
- 1
- Continue reading or reply
"ApexPages.CurrentPage().getparameters().get('id')"
How to get object ID dyanamically using "ApexPages.CurrentPage().getparameters().get('id')".I have ipmlemeted using this but each time
I need to copy ID in Url of VF's output page to get object record.Please let me know,Where am i going wrong.
I need to copy ID in Url of VF's output page to get object record.Please let me know,Where am i going wrong.
- shivram survase
- February 18, 2015
- Like
- 0
- Continue reading or reply
Difference between Contact And Contacts
[select id,name,(select name,AccountId from Contacts) from Account where id in(select AccountId from Contact)]
In this SOQL query,What's the difference between Contacts and Contact.I didn't get this relationship.
Please give a hand.
In this SOQL query,What's the difference between Contacts and Contact.I didn't get this relationship.
Please give a hand.
- shivram survase
- February 17, 2015
- Like
- 1
- Continue reading or reply
how to store value permanently in apex controller
Hi,
I'm using same controller for 2 vf pages.The data entered on one vf page wanted to display on other vf page.
When I try to display data on other vf page getting NULL.I'm using <Apex:Actionfunction> for passing the passing the perameter
and calling the method defined in Controller.Also used Actionpoller to rerender the certain portion on vf page.
Help is appreciated in advance !
Here is the code..
---------- Controller method --------------------
public void echoVal()
{
system.debug('After 30 Seconds==>'+enteredText1);
val = 'You have entered : - '+enteredText1;
system.debug('Testing..parameter==>'+val);
}
-------------- VF page1 (getting data from user) ---------------------
Enter SR_Description :
<apex:inputText id="txt1" />
<apex:outputPanel id="resultPanel">
<b><apex:outputLabel value="{!val}" />
</b></apex:outputPanel>
<apex:actionFunction name="echo" action="{!echoVal}" reRender="resultPanel">
<apex:param name="firstParam" assignTo="{!enteredText1}" value="" />
</apex:actionFunction>
<apex:outputLabel rendered="{!uploadFlag}" value="{!uploadMessage}"></apex:outputLabel>
<!-- <center><apex:commandButton value="Save" onclick="CallContr();"/> -->
<center><apex:commandButton value="Click here" onclick=" return callActionMethod();"/>
<script>
function callActionMethod()
{
alert('working..');
var txtVal1 = document.getElementById("{!$Component.theForm.SRpageblock.pgbSec.txt1}").value;
alert(txtVal1 );
/*Below Method is generated by "apex:actionFunction" which will call Apex Method "echoVal" */
echo(txtVal1);
return false;
}
</script>
------------- VF Page (Where data is displaying) -------------------
<apex:form id="frmSRdescription">
<apex:actionPoller reRender="frmSRdescription" interval="30" rendered="true" action="{!echoVal}"/>
<apex:pageBlock >
<apex:outputLabel value="{!test}"></apex:outputLabel>
<b><apex:outputLabel value="{!val}" /></b> <b><apex:outputLabel value="{!enteredText1}" /></b>
I'm using same controller for 2 vf pages.The data entered on one vf page wanted to display on other vf page.
When I try to display data on other vf page getting NULL.I'm using <Apex:Actionfunction> for passing the passing the perameter
and calling the method defined in Controller.Also used Actionpoller to rerender the certain portion on vf page.
Help is appreciated in advance !
Here is the code..
---------- Controller method --------------------
public void echoVal()
{
system.debug('After 30 Seconds==>'+enteredText1);
val = 'You have entered : - '+enteredText1;
system.debug('Testing..parameter==>'+val);
}
-------------- VF page1 (getting data from user) ---------------------
Enter SR_Description :
<apex:inputText id="txt1" />
<apex:outputPanel id="resultPanel">
<b><apex:outputLabel value="{!val}" />
</b></apex:outputPanel>
<apex:actionFunction name="echo" action="{!echoVal}" reRender="resultPanel">
<apex:param name="firstParam" assignTo="{!enteredText1}" value="" />
</apex:actionFunction>
<apex:outputLabel rendered="{!uploadFlag}" value="{!uploadMessage}"></apex:outputLabel>
<!-- <center><apex:commandButton value="Save" onclick="CallContr();"/> -->
<center><apex:commandButton value="Click here" onclick=" return callActionMethod();"/>
<script>
function callActionMethod()
{
alert('working..');
var txtVal1 = document.getElementById("{!$Component.theForm.SRpageblock.pgbSec.txt1}").value;
alert(txtVal1 );
/*Below Method is generated by "apex:actionFunction" which will call Apex Method "echoVal" */
echo(txtVal1);
return false;
}
</script>
------------- VF Page (Where data is displaying) -------------------
<apex:form id="frmSRdescription">
<apex:actionPoller reRender="frmSRdescription" interval="30" rendered="true" action="{!echoVal}"/>
<apex:pageBlock >
<apex:outputLabel value="{!test}"></apex:outputLabel>
<b><apex:outputLabel value="{!val}" /></b> <b><apex:outputLabel value="{!enteredText1}" /></b>
- shivram survase
- November 24, 2015
- Like
- 1
- Continue reading or reply
Hi,How can i use the method parameter in LIKE query to perform substring operation?Help is appreciated in advance.
My code is as follow:
public class AccountController {
@AuraEnabled
public static List<Account> getAccounts(String accName,String accCountry) {
List<Account> objAccount = [SELECT Id, Name, Country__c FROM Account where name like '%:accName%' ];
return objAccount;
}
}
I need to perform searching on 'accName' value as a substring.
public class AccountController {
@AuraEnabled
public static List<Account> getAccounts(String accName,String accCountry) {
List<Account> objAccount = [SELECT Id, Name, Country__c FROM Account where name like '%:accName%' ];
return objAccount;
}
}
I need to perform searching on 'accName' value as a substring.
- shivram survase
- March 18, 2015
- Like
- 1
- Continue reading or reply
Difference between Contact And Contacts
[select id,name,(select name,AccountId from Contacts) from Account where id in(select AccountId from Contact)]
In this SOQL query,What's the difference between Contacts and Contact.I didn't get this relationship.
Please give a hand.
In this SOQL query,What's the difference between Contacts and Contact.I didn't get this relationship.
Please give a hand.
- shivram survase
- February 17, 2015
- Like
- 1
- Continue reading or reply
Bulk Child Record Update using Process Builder and Flows
Is it possible to do bulk record update in my Child Record using Process Builder and Flows Combination ?
My Scenario is - Whenever the Account Owner Changes (in Bulk), the related Contact Owners should be changed.
Can someone help me how to achieve this using Process Builder and Flows Combination ?
My Scenario is - Whenever the Account Owner Changes (in Bulk), the related Contact Owners should be changed.
Can someone help me how to achieve this using Process Builder and Flows Combination ?
- Madhanprabhu Thangadurai 1
- April 12, 2015
- Like
- 1
- Continue reading or reply
Hi,I wanted to excute inner <aura:if> only once.I'm unable to set the attribute value to false.Help is appreciated.
<aura:attribute name="native" type="boolean" default="true"/>
<aura:attribute name="accounts" type="Account[]"/>
<div class="pink">
<table style="width:100%">
<aura:iteration var="acc" items="{!v.accounts}">
<aura:if isTrue="{!acc.Id != ' '}">
<aura:if isTrue="{!v.native}">
<tr>
<th>Account Id</th>
<th>Name</th>
<th>Country</th>
<th>City</th>
<th>Email</th>
</tr>
{!v.native}=false;
component.set("v.native",'false');
{!v.native};
</aura:if>
<tr>
<td>{!acc.Id} </td>
<td>{!acc.Name} </td>
<td>{!acc.Country__c} </td>
<td> {!acc.City__c} </td>
<td>{!acc.Email__c}</td>
</tr>
</aura:if>
</aura:iteration>
</table>
</div>
I wanted to set "native" attribute to false without using the client controller.If anyone having another solution to this problem.
Please share it.
<aura:attribute name="accounts" type="Account[]"/>
<div class="pink">
<table style="width:100%">
<aura:iteration var="acc" items="{!v.accounts}">
<aura:if isTrue="{!acc.Id != ' '}">
<aura:if isTrue="{!v.native}">
<tr>
<th>Account Id</th>
<th>Name</th>
<th>Country</th>
<th>City</th>
<th>Email</th>
</tr>
{!v.native}=false;
component.set("v.native",'false');
{!v.native};
</aura:if>
<tr>
<td>{!acc.Id} </td>
<td>{!acc.Name} </td>
<td>{!acc.Country__c} </td>
<td> {!acc.City__c} </td>
<td>{!acc.Email__c}</td>
</tr>
</aura:if>
</aura:iteration>
</table>
</div>
I wanted to set "native" attribute to false without using the client controller.If anyone having another solution to this problem.
Please share it.
- shivram survase
- March 31, 2015
- Like
- 0
- Continue reading or reply
Hi,How can i use the method parameter in LIKE query to perform substring operation?Help is appreciated in advance.
My code is as follow:
public class AccountController {
@AuraEnabled
public static List<Account> getAccounts(String accName,String accCountry) {
List<Account> objAccount = [SELECT Id, Name, Country__c FROM Account where name like '%:accName%' ];
return objAccount;
}
}
I need to perform searching on 'accName' value as a substring.
public class AccountController {
@AuraEnabled
public static List<Account> getAccounts(String accName,String accCountry) {
List<Account> objAccount = [SELECT Id, Name, Country__c FROM Account where name like '%:accName%' ];
return objAccount;
}
}
I need to perform searching on 'accName' value as a substring.
- shivram survase
- March 18, 2015
- Like
- 1
- Continue reading or reply
Trailhead challenge(Create an Apex class that returns an array (or list) of strings.) is throwing error
Create an Apex class that returns an array (or list) of strings:
Create an Apex class that returns an array (or list) of formatted strings ('Test 0', 'Test 1', ...). The length of the array is determined by an integer parameter.The Apex class must be called 'StringArrayTest' and be in the public scope.
The Apex class must have a public static method called 'generateStringArray'.
The 'generateStringArray' method must return an array (or list) of strings. Each string must have a value in the format 'Test n' where n is the index of the current string in the array. The number of returned strings is specified by the integer parameter to the 'generateStringArray' method.
MyApexClass to above Challenge:
public class StringArrayTest {
public static List<string> generateStringArray(Integer n)
{
List<String> myArray = new List<String>();
for(Integer i=0;i<n;i++)
{
myArray.add('Test'+i);
System.debug(myArray[i]);
}
return myArray;
}
It's compile and execute as per requirement in Developer console. But Traihead showing the below error:
Challenge not yet complete... here's what's wrong:
Executing the 'generateStringArray' method failed. Either the method does not exist, is not static, or does not return the proper number of strings.
Anyhelp would be greatly appreciated. Thanks.
Create an Apex class that returns an array (or list) of formatted strings ('Test 0', 'Test 1', ...). The length of the array is determined by an integer parameter.The Apex class must be called 'StringArrayTest' and be in the public scope.
The Apex class must have a public static method called 'generateStringArray'.
The 'generateStringArray' method must return an array (or list) of strings. Each string must have a value in the format 'Test n' where n is the index of the current string in the array. The number of returned strings is specified by the integer parameter to the 'generateStringArray' method.
MyApexClass to above Challenge:
public class StringArrayTest {
public static List<string> generateStringArray(Integer n)
{
List<String> myArray = new List<String>();
for(Integer i=0;i<n;i++)
{
myArray.add('Test'+i);
System.debug(myArray[i]);
}
return myArray;
}
It's compile and execute as per requirement in Developer console. But Traihead showing the below error:
Challenge not yet complete... here's what's wrong:
Executing the 'generateStringArray' method failed. Either the method does not exist, is not static, or does not return the proper number of strings.
Anyhelp would be greatly appreciated. Thanks.
- Sattibabu
- January 15, 2015
- Like
- 8
- Continue reading or reply