Servoy 4.1 PreRelease version is on your hand now, with lots of fixes and enhancements and in addition to these with a new revolutionary change called, "Solution Model".
With this PreRelease of Servoy 4.1, you can now able to see a node "SolutionModel" just below to the Application node. SolutionModel node gives you the capability to change or create new form & form objects such as forms, fields, labels, buttons, and tabpanels (portals coming in b2) on the FLY. yes, at the runtime....
and the most important and surprising thing is...... You can have this with your WebClient also. Yes, You can change or create new form & form objects on the fly in your WebClient also.
You can add whatever or any number of controls to your form or a newly created form. For the first time, you can now able to change any of the properties on objects , even the data binding on any object at runtime. You can also able to add/change parts of a form at runtime.
Isn't it a revolutionary change in Servoy ??
NOTE :-
- You can only change the properties of an object on a form that is not currently visible;
- The changes only persist as long as the client session does. So if you want to keep the changes between sessions - you need to code your solution to restore the changes the user made.
Just looking at to the SolutionModel node....
Let you want to change the style class of the form on the fly(on the runtime) :
//Get the form that you want to change the Style Class
var form = solutionModel.getForm("formName");
//Change the StyleClass
form.styleClass = "newStyleClass"
Let you want to add a new button to a newly created form :
//Get the Form
var newForm = solutionModel.newForm("frm", controller.getServerName(), controller.getTableName(), "svy_Cherry", true, 200, 200);
//Add a button to the newly created Form
newForm.newButton("showForm",100,100, 80,20,showForm);
//Show the newly crated form
forms['frm'].controller.show();
NOTE :- this is PRE-RELEASE software - so make sure to back up your databases and workspace before trying it out.
0 comments:
Post a Comment