54. What is an Apex Wrapper Class in Salesforce?
Вставка
- Опубліковано 16 жов 2024
- Wrapper classes are one of the most useful things you can do in apex to add functionality to your Salesforce pages - whether it is in Lightning Web Components, Aura or Visualforce - but what are they? Here we see a quick and easy example to show how they are most commonly used!
**Our new course Astronomical Apex Testing is now available - bit.ly/astroApex **
Very nicely explained! Great video. Thank you for sharing your knowledge. Looking forward to seeing more videos on apex concepts
Hey!
How is the getSelectedAccounts method getting called? It is nowhere being called and yet it is working. Let me admit that i am not so good with VF pages.
If you jump to ua-cam.com/video/zzZN35ZY6sM/v-deo.html (1:34) and look at line 13 you will see {!selectedAccounts}, for a property like this it calls the controller getSelectedAccounts method. You can see on the wrappers property in the controller we are using the shorthand {get; set} which provides a getter getWrappers. Hope that makes sense!
@@cloudbitestv Yep it does. Thanks for your response.