Can we leverage the Dynamic Class referencing pattern (DCR) using Data Page? Define a custom property in data transform which will hold the hardcoded values of the class. Keep the context of the data page as Node. Set the class by referring DataPage.CustomPropertyRef.
Hi Manash, DCR is a method for not having to hardcode the (work) classes between framework and different implementation layers, but still if you set the class using the DCR data page in a data transform you have to set pxObjClass and get a severe warning.
1. When you are changing the context of a page, is there a inheritance relationship between two classes?
If the current class is classA and target class is classB, is there is a inheritance relationship between these two? If yes I would recommend creating a classB object using Page-New and set it to object of class A. In that case context is being changed.
2. When there is no relationship between these two classes, what is the need driving you to change the class context?
If it for executing some rules , I would recommend creating a page of target class and run the rule on it and once that is done copy the results from this page to the original page