I want to make sure i understand something with respect to the solution model. If i have a button that when pressed allows a user to create a calculation or relation via solution model, is the scope of that calculation/relation limited to the particular user only? Meaning, no other users can “see” it? And the duration is limited to while the user is logged in, correct? When the user logs out the solution model additions are closed out as well?
every time you startup a client a blueprint of the solution is downloaded from the application server to the client (using a web-client this is registered on the application server itself)
if you use the solutionModel to add/change objects of the application, you will alter the local blueprint of the application.
So, yes this is a per session change which will dissapear when you close the client.
Please be aware that objects can not be changed as soon as they’ve been cached by the client.
As soon as objects have been cached they are read from the blueprint as it exists at that particular moment, when you will alter this blueprint afterwards this has no effect anymore.
Thank you for the quick reply. That was how I was thinking it worked.
Also, out of curiosity and for my own edification - why are aggregates not currently available within the solution model? What makes it more difficult for Servoy to program the creation of an aggregate versus a calculation in SM?
matthewbrice:
Also, out of curiosity and for my own edification - why are aggregates not currently available within the solution model? What makes it more difficult for Servoy to program the creation of an aggregate versus a calculation in SM?
One more remark on altering the blueprint after objects have been cached (thnkx Roclasi for reminding me):
There’s an exception for some objects:
global methods (so far I experienced they refresh quite well)
forms, here you have 2 choices:
use controller.recreateUI() after editing the blueprint
go through the whole process of: hiding, destroying, altering blueprint, loading of the form (seems harder than it actually is)
If you don’t go one of the ways as described, Servoy will help you reminding with the error message ‘Stale forms detected’.
Please also note that both option 1 and 2 will also clear form-variables.
I could register a feature request to add aggregates to the SM, but assumed that is in the works already (if possible) so is not necessary. I have a project that it would be a big benefit on so hope servoy implements soon.
I knew about controller.recreateui as that is how i do things now, but didn’t know about form variables getting cleared. That is a good tip to know.
matthewbrice:
I could register a feature request to add aggregates to the SM, but assumed that is in the works already (if possible) so is not necessary.