How to read Salesforce lightning components attributes from APEX
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
2
down vote
favorite
This use case is tricky.
We need to have a way to read Salesforce lightning component attributes from the APEX code.
We don't want to pass the attributes from the Salesforce lightning javascript but wanna try to read the component attributes from the backend code.
Is it possible?
lightning-components
add a comment |Â
up vote
2
down vote
favorite
This use case is tricky.
We need to have a way to read Salesforce lightning component attributes from the APEX code.
We don't want to pass the attributes from the Salesforce lightning javascript but wanna try to read the component attributes from the backend code.
Is it possible?
lightning-components
1
Its actually very interesting question but my guess it is not possible to do something like that. LEX is like normal js framework and it is using standard client (web) server (backend apex) architecture. But maybe I am wrong and someone smarter would provide some more info about this topic
â user1974566
2 hours ago
1
I agree with Charles. This seems like an X-Y problem. You might want to take a step back and explain what you're trying to do.
â sfdcfox
1 hour ago
@sfdcfox Lightning components are stored as a JSON object... perhaps it's possible to query for them. But of course, as Charles says, we are probably trying to solve the wrong problem.
â Caspar Harmer
13 mins ago
Of course, they would be in raw, unevaluated form... so many attributes would be invalid.
â Caspar Harmer
11 mins ago
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
This use case is tricky.
We need to have a way to read Salesforce lightning component attributes from the APEX code.
We don't want to pass the attributes from the Salesforce lightning javascript but wanna try to read the component attributes from the backend code.
Is it possible?
lightning-components
This use case is tricky.
We need to have a way to read Salesforce lightning component attributes from the APEX code.
We don't want to pass the attributes from the Salesforce lightning javascript but wanna try to read the component attributes from the backend code.
Is it possible?
lightning-components
lightning-components
asked 2 hours ago
newBike
1686
1686
1
Its actually very interesting question but my guess it is not possible to do something like that. LEX is like normal js framework and it is using standard client (web) server (backend apex) architecture. But maybe I am wrong and someone smarter would provide some more info about this topic
â user1974566
2 hours ago
1
I agree with Charles. This seems like an X-Y problem. You might want to take a step back and explain what you're trying to do.
â sfdcfox
1 hour ago
@sfdcfox Lightning components are stored as a JSON object... perhaps it's possible to query for them. But of course, as Charles says, we are probably trying to solve the wrong problem.
â Caspar Harmer
13 mins ago
Of course, they would be in raw, unevaluated form... so many attributes would be invalid.
â Caspar Harmer
11 mins ago
add a comment |Â
1
Its actually very interesting question but my guess it is not possible to do something like that. LEX is like normal js framework and it is using standard client (web) server (backend apex) architecture. But maybe I am wrong and someone smarter would provide some more info about this topic
â user1974566
2 hours ago
1
I agree with Charles. This seems like an X-Y problem. You might want to take a step back and explain what you're trying to do.
â sfdcfox
1 hour ago
@sfdcfox Lightning components are stored as a JSON object... perhaps it's possible to query for them. But of course, as Charles says, we are probably trying to solve the wrong problem.
â Caspar Harmer
13 mins ago
Of course, they would be in raw, unevaluated form... so many attributes would be invalid.
â Caspar Harmer
11 mins ago
1
1
Its actually very interesting question but my guess it is not possible to do something like that. LEX is like normal js framework and it is using standard client (web) server (backend apex) architecture. But maybe I am wrong and someone smarter would provide some more info about this topic
â user1974566
2 hours ago
Its actually very interesting question but my guess it is not possible to do something like that. LEX is like normal js framework and it is using standard client (web) server (backend apex) architecture. But maybe I am wrong and someone smarter would provide some more info about this topic
â user1974566
2 hours ago
1
1
I agree with Charles. This seems like an X-Y problem. You might want to take a step back and explain what you're trying to do.
â sfdcfox
1 hour ago
I agree with Charles. This seems like an X-Y problem. You might want to take a step back and explain what you're trying to do.
â sfdcfox
1 hour ago
@sfdcfox Lightning components are stored as a JSON object... perhaps it's possible to query for them. But of course, as Charles says, we are probably trying to solve the wrong problem.
â Caspar Harmer
13 mins ago
@sfdcfox Lightning components are stored as a JSON object... perhaps it's possible to query for them. But of course, as Charles says, we are probably trying to solve the wrong problem.
â Caspar Harmer
13 mins ago
Of course, they would be in raw, unevaluated form... so many attributes would be invalid.
â Caspar Harmer
11 mins ago
Of course, they would be in raw, unevaluated form... so many attributes would be invalid.
â Caspar Harmer
11 mins ago
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
3
down vote
No. Those parameters are known only on the front end and never passed to the back at all. The whole idea of making calls to static functions in an Apex controller from Lightning is that behaviour should flow directly from the parameters passed in.
This seems like an X/Y problem. The question you are asking is confusing. What is the real problem you are trying to solve that makes you so reluctant to pass Lightning component parameters to Apex?
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
No. Those parameters are known only on the front end and never passed to the back at all. The whole idea of making calls to static functions in an Apex controller from Lightning is that behaviour should flow directly from the parameters passed in.
This seems like an X/Y problem. The question you are asking is confusing. What is the real problem you are trying to solve that makes you so reluctant to pass Lightning component parameters to Apex?
add a comment |Â
up vote
3
down vote
No. Those parameters are known only on the front end and never passed to the back at all. The whole idea of making calls to static functions in an Apex controller from Lightning is that behaviour should flow directly from the parameters passed in.
This seems like an X/Y problem. The question you are asking is confusing. What is the real problem you are trying to solve that makes you so reluctant to pass Lightning component parameters to Apex?
add a comment |Â
up vote
3
down vote
up vote
3
down vote
No. Those parameters are known only on the front end and never passed to the back at all. The whole idea of making calls to static functions in an Apex controller from Lightning is that behaviour should flow directly from the parameters passed in.
This seems like an X/Y problem. The question you are asking is confusing. What is the real problem you are trying to solve that makes you so reluctant to pass Lightning component parameters to Apex?
No. Those parameters are known only on the front end and never passed to the back at all. The whole idea of making calls to static functions in an Apex controller from Lightning is that behaviour should flow directly from the parameters passed in.
This seems like an X/Y problem. The question you are asking is confusing. What is the real problem you are trying to solve that makes you so reluctant to pass Lightning component parameters to Apex?
answered 2 hours ago
Charles T
5,1701518
5,1701518
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f232681%2fhow-to-read-salesforce-lightning-components-attributes-from-apex%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
Its actually very interesting question but my guess it is not possible to do something like that. LEX is like normal js framework and it is using standard client (web) server (backend apex) architecture. But maybe I am wrong and someone smarter would provide some more info about this topic
â user1974566
2 hours ago
1
I agree with Charles. This seems like an X-Y problem. You might want to take a step back and explain what you're trying to do.
â sfdcfox
1 hour ago
@sfdcfox Lightning components are stored as a JSON object... perhaps it's possible to query for them. But of course, as Charles says, we are probably trying to solve the wrong problem.
â Caspar Harmer
13 mins ago
Of course, they would be in raw, unevaluated form... so many attributes would be invalid.
â Caspar Harmer
11 mins ago