Act as For Actions
(Created page with "In the ViewModelEditor the property "Act As For Actions" helps you in the following ways: If you have a grid with objects of type B - but many of the actions you want to expo...")
 
No edit summary
Line 1: Line 1:
In the ViewModelEditor the property "Act As For Actions" helps you in the following ways:
In the ViewModelEditor the property "Act As For Actions" helps you in the following ways:


If you have a grid with objects of type B - but many of the actions you want to expose on these objects reside on class A then you enter an expression in the "Act As For Actions" that navigate from type B to type A (expression must end up in 1 or 0 objects). This would save you the trouble of creating new class actions on B that repeat the logic for the class actions on A.
If you have a grid with objects of type B - but many of the actions you want to expose on these objects reside on class A then you enter an expression in the "Act As For Actions" that navigate from type B to type A (expression must end up in 1 or 0 objects). This would save you the trouble of creating new class actions on B that repeat the logic for the class actions on A. This will make your B's to act as A's when it comes to what actions to expose.


This scenario is common for association objects (multi link between A and C with a link class B in between) - you want to precision offered by B in the grid - but you want the actions of A to be available also. In this case the context is B and the expression would be self.A.
This scenario is common for association objects (multi link between A and C with a link class B in between) - you want to precision offered by B in the grid - but you want the actions of A to be available also. In this case the context is B and the expression would be self.A.

Revision as of 08:05, 13 July 2018

In the ViewModelEditor the property "Act As For Actions" helps you in the following ways:

If you have a grid with objects of type B - but many of the actions you want to expose on these objects reside on class A then you enter an expression in the "Act As For Actions" that navigate from type B to type A (expression must end up in 1 or 0 objects). This would save you the trouble of creating new class actions on B that repeat the logic for the class actions on A. This will make your B's to act as A's when it comes to what actions to expose.

This scenario is common for association objects (multi link between A and C with a link class B in between) - you want to precision offered by B in the grid - but you want the actions of A to be available also. In this case the context is B and the expression would be self.A.

This page was edited 96 days ago on 02/10/2024. What links here