I have 3 templates, three of them should be displayed as instances in a single flex repeater, can we embedded view component along with flex repeater to implement this? Data in each template view should accessed dynamically from database

Currently, I am using a single template and instances can be created from the query table.



You need to put your three templates into one parent template which is refering to repeater, parameters can be passed from one parent template to sub templates as well.

Please don't put so many details in the subject. That's like writing a whole email in the subject instead of using the body.
The subject should give an indication about your issue, not describe it entirely. Things like the scope of your problem, the component concerned, etc...
Then detail the issue in the message.

As for your issue: make a wrapper for your 3 views. You can then use that wrapper in the repeater.
it should take the parameters you want to pass to your views plus an additional one that will be used to decide which view should be displayed.
At this point, you can handle it in 2 different ways:

  • Use a single embedded view, and use the parameter to configure its path property
  • Put your 3 views into one single views, in 3 different containers, then use the parameter to show one and hide the others.

The first solution is probably the best.

3 Likes