In the last post we study how we can iterate map in Lightning. There is one more thing which we face many time is dynamic field binding. Visualforce wit dynamic field binding we can dynamically create field instance but in lightning this is a major limitation.
Today we will see how we can use dynamic sObject binding in visualforce. For this we will create a sample component to display dynamic fields.
Here we will create app to get Object details. for demo I have select Account object we can select any object here. We can also select any fields here including the parent fields(cross reference field).
Now we will pass the object and field name in another component. Where we will display them on UI.
To display on UI I am using lightning:formattedText we can also use any other component as well.
You can find the complete code here as well.
DO you want to add anything let me know in comments section. Happy programming 🙂
Usages of Lightning is increasing day by day. We face many challenge while doing development in Lightning. One of the challenge which I face recently is we can’t iterate map in lightning using aura:iteration. Map is commonly used collection type which provide Key value pair to easy binding of data.
Today I will shae a code sample of how we can iterate map in Lightning easily.
First we need a Controller which will return Map to us.
Next we will create an APP to display It on UI.
This is the output which we will get.
Do you like the post. Or want to say anything. Please let me know in comments section.
Check your computer “male” or “female”??
1. Open Notepad
2. Type the following line in notepad:
CreateObject(“SAPI.SpVoice”).Speak”I love you”
3. Save file as computer_gender.vbs in any location
4. Run the file by double clicking on it… If you hear a male voice, your computer is a boy If you hear a female voice, your computer is a girl (:
Note: Turn on the speaker before running the file 🙂