Child pages
  • RC4 additions
Skip to end of metadata
Go to start of metadata

See the Servoy 6.0 RC4 Release post  on the Servoy Talk forum for a list of all bugfixes.

For a complete overview of everything new and improved in Servoy 6.0 see New in this release.

The following notable additions and changes were made in RC4:


  • Added builder marker for labels with the labelFor property set to a non-existing element
  • Different icons for private and protected method in the Solution Explorer
  • Added 'wrongparameters' as option to @SuppressWarnings JSDoc tag
  • Support in JSDoc for optional properties on objects. There are two different syntaxes allowed: 
    • Square brackets around the property name: @param {{sDocID:String, [beta:sTemplateID]:String}} oArg
    • An equal-sign behind the type: @param {{sDocID:String, sTemplateID:String=}} oArg
  • Search i.c.w. Enclosing Projects now works properly: it searches within the selected solution/module and it's child modules.

Solution Development


A change was made to the state of the Renderable object that gets passed into the onRender event handler. It will now have the actual runtime state, including changes made in the previous onRender cycle, whereas before it would be the designtime state. "State" refers to the values of the properties of the Renderable object that can be set in the onRender event, like the fgcolor, bgcolor or font

This change was made to simplify the programming model: any changes made to elements through the scripting layer would previously be undone by the onRender event, as the onRender event took the designtime state as baseline for the rendering. Persisting the scripted changes all the way through an onRender event would require a lot of code. Basically the developer would have to pay very good attentions when adding onRender event handlers, because they could interfere with changes made to the UI thorugh business logic.

In order to separate these concerns, the baseline for the rendering in the new approach is the actual runtime state of the element. So if business logic has changes the bgcolor property of the element, the updated bgcolor value will be the value of the bgcolor inside the onRender event and if not further altered by the onRender logic, the element will display with the bgcolor value as it was set in the business logic. (prior to this behavior change the onRender logic would receive the designtime bgcolor value and the element would render with that value (unless otherwise specified inside the onRender event handler), basically overriding/undoing the scripted change to the bgcolor value).

The new approach does mean that in the onRender logic, both states of a property need to be handled. This means that if the onRender is used to set the fgcolor of a field depending if the dataprovider's value is negative or not, the fgcolor needs to be explicitly set for both negative and positive numbers. When the same foreground property is also set in scripting and should overrule the onRender, the developer needs to take care of this inside the onRender logic:

 * Called before the form component is rendered.
 * @param {JSRenderEvent} event the render event
function onRender(event) {
 /** @type {JSRecord<db:/udm/orders>}*/
 var rec = event.getRecord()
 if (rec.amt_tax == 0) {
    event.getRenderable().fgcolor = '#ff6600';
 } else if (rec.amt_tax < 0) {
    event.getRenderable().fgcolor = '#ff0000';
 } else {    event.getRenderable().fgcolor = '#000000'; }

Other Changes:

  • Support for vertical alignment of labels and buttons in the Web Client


  • Improved Web Client source generation: The generated source will always use short, dynamic ID's, to lower the amount of data that needs to be send back and forth between the browser and the server.
  • The option on the Servoy Admin page to use Local ID's (servoy.webclient.templates.use_local_ids) has been removed, as it's no longer needed.
    The HTML/CSS templates contain the long UUID and Servoy will automatically map the UUID's in customized templates at runtime to the internal ID's that end up in the Web Client's page markup
  • Removed "servoy.webclient.templates.use_local_ids" preference, see previous item
  • No labels