ViewInView
No edit summary
No edit summary
Line 1: Line 1:
The ViewInView feature is a way to bring in a view within a view. It is another way to add a Nested ViewModel that does not use the table grid. ViewInView uses the mount strategy to add Nested ViewModels. [[Documentation:Mounted ViewModel|The Mounted ViewModel]] is merged into the view where it is mounted.
The ViewInView feature is a way to bring in a view within a view. It is another way to add a Nested ViewModel that does not use the table grid. ViewInView uses the mount strategy to add Nested ViewModels. [[Documentation:Mounted ViewModel|The Mounted ViewModel]] is merged into the view where it is mounted.
Mounted ViewModels can be used to display data from association links.


=== Example ===
=== Example ===

Revision as of 04:09, 20 July 2024

The ViewInView feature is a way to bring in a view within a view. It is another way to add a Nested ViewModel that does not use the table grid. ViewInView uses the mount strategy to add Nested ViewModels. The Mounted ViewModel is merged into the view where it is mounted.

Mounted ViewModels can be used to display data from association links.

Example

Showing a category and it's products without using the Nested ViewModel.

Mounted ViewModel Example

1. Create the the ViewModel to be mounted, the ViewModel should be rooted for instances attributes.

View to be mounted

2. Go to the category page and add the ViewInView widget to page by selecting it from the options on the right and drawing it on the page.

3. Set the Column Name

4. Set the expression for the data to be loaded in the Mounted View Model.

5. Set the ViewModel property to the ViewModel to be mounted.

Example of ViewInView feature

The ViewInView widget is also available in the context menu of the ViewModel

2024-07-18 17h03 36.png

Other Pages on ViewModels

This page was edited 46 days ago on 07/30/2024. What links here