Child pages
  • Upgrading to Servoy 7.x.x

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Upgrading Servoy Application Server

As Servoy 6 is a major release a fresh Servoy Application Server installation is required.

See ... for more information.

Upgrading Servoy Developer

As Servoy 6 is a major release a fresh Servoy Developer installation is required. 

See ... for more information.

Moving the 

Export/import preferences  

Upgrading existing Solutions

Upgrading existing Solutions 

A note before getting started

Servoy 6 offers some amazing new features in the Servoy Developer IDE when it comes to designing forms and writing business logic.

Part of the latter is a greatly improved JavaScript code validation: the entire code base of a solution will be continuously checked for possible coding mistakes, like accessing or setting non existing variables, calling non-existing methods or calling methods with the wrong number or type of parameters.

While this is great once you get going, if you're upgrading an existing solution to Servoy 6, you will most likely get a lot of warnings on your code. Why is that?

JavaScript, the scripting language used in Servoy to write down the business logic is what they call "weak-typed". This means that a variable can hold any type of value, that a function can return any type of value and that the parameter values that can be send into a method call can be of any type. At least: this hold true for JavaScript in it's core.

The new script validation in Servoy Developer 6 however tries to determine if the the properties you access actually exist, if the method you call exist and if you call them with the right number and type of arguments. The validation mechanism tries to be as clever as possible to determine which code is correct and which code isn't, but due to the weak-typed (and dynamic) nature of JavaScript, somethings clever logic just isn't enough and the validator requires more input from the developer in order to do proper validation. This developer input is done in the form of JSDoc.

While previous versions of Servoy already had support for JSDoc, in Servoy 6 this support has been extended and improved, in order to better facilitate the validation process.

So, while you might get numerous warnings once you open your existing solutions in Servoy 6, remember that these are just "warnings", not errors, they do not mean that your solution is not working. While we advise to solve the warnings, so you can also reliable start using some of the other great features of Servoy 6, like automatic code refactoring or search for references, you can ignore the warnings. It's even possible to turn off all the warnings, see Window > Preferences > JavaScript > Error/Warnings.

...

JSDoc primer

...

Behavior changes

Changes that might break existing code

  • Bugfix: JSFoundSet.getRecordIndex(JSRecord) now returns -1 instead of 0 when the record is not found, to be inline with other functions that return -1 to indicate "not found"
  • BugFix: When passing JavaScript Arrays into the Scripting API (Servoy Scripting API or plugins), previously empty Array positions were removed, not they are reserved
  • plugins.rawSQL.executeStoredProcedure() now returns the last resultset retunred by the stored procedure, instead of the first
  • In the solutionModel when asking for a specific element on a form, if the element is not on the form, the super scope will be inspected and return the element if the element in inherited. For the plural getElements() type of functions, an optional paramter has been added to include the inherited elements in the return value or not.
  • When adding a tableFilter on a column that already has a tablefilter on it, the newly applied filter will not override the existing filter, but the new filter will be appended, so both the existing and newly added tableFilter are in effect. To implement the old behavior, the TableFilters need to be created with a name and then when applying a new TableFilter the old one needs to be removed through scripting.
  • In Smart Clients running under Java 6, Modal Dialogs (JSWindow of type MODAL_DIALOG and the dialogs displayed using the dialogs plugin) will be modal for their parent window (hierargy). This means that when having multiple windows (JSWindow of type WINDOW) open, a Modal dialog opened in one window will only block that window, not the other Windows. This aligns the behavior with the Web Client behavior. Unfortunately, the ability to set the scope of dialog modality in only possible from Java 6 onwards. When running Smart Clients on Java 5 modal dialogs will block all windows.
  • The passing of deepLink arguments to the onOpen methods of both the Login solution (if applicable) and the main solution has been normalized:
    • Proper supports for deeplinks that specify multiple values for both the predefined "argument" parameter as well as custom named parameters. 
    • The difference between deeplinks using the full syntax ("arguments") or short syntax ("a") for specifying arguments has been hidden: short syntax will be automatically converted to full syntax.
    • The query arguments in the URL that represent the solutionName or the methodName are filtered out, so only the real arguments are send into the onOpen method
      Examples:
      Code Block
      
      http://domain:port/servoy-webclient/ss/s/{solutionName}/argument/1/m/{globalMethodName}/a/2/a/3/b/1/b/2/b/3 or
      http://domain:port/servoy-webclient/ss?s={solutionName}&a=1&method={globalMethodName}&a=2&a=3&b=1&b=2&b=3 or
      http://domain:port/servoy-client/{solutionName}.jnlp?a=1&a=3&b=1&a=2&b=2&b=3
      
      all results in the following arguments applied to the onOpen method
      Code Block
      
      arguments[0]: 1
      arguments[1]: {argument: [1,2,3], b: [1,2,3]}]
      

Behavior changes

  • BugFix: A bug was fixed that allowed making elements visible in scripting on which there was a security constraint that made the element invisible. The new behavior is that security takes preference over scripting for "visibility", like was already the case for "enabled"
  • The position and dimensions of JSWindow's (Windows and Dialogs) are now persisted over client sessions
  • The client that gets started as Authenticator during the login process isn't consuming a license any more
  • controller.recreateUI() will keep the existing x and y scrollPosition of the form being recreated.
  • application.getTimeStamp() in the Web client will return the timestamp based on the timezone of the Client and the time of the Server: Before it would just return the timestamp based on the time and timezone of the server.
  • Tooltips in the Web Client are not shown immediately, but after a short delay, to synchronize the behavior between the Smart and Web Client. Note that through the UIProperties APP_UI_PROPERTY.TOOLTIP_INITIAL_DELAY & APP_UI_PROPERTY.TOOLTIP_DISMISS_DELAY the initial show delay and the dismiss delay are now controllable by the developer in both the Smart and Web Client
  • DeepLink arguments are now also applied to the onOpen method of the login solution. As a result of that, the application.getStartupArguments() method is deprecated, as it's no longer needed
  • Enhanced Security is now the default mode. The UI in Servoy Developer and in the Application Server to disable it has been removed. It is only possible to disable Enhance Security through setting the relevant property in the servoy.properties file: "servoy.application_server.enhancedSecurity=false"

Changes affecting the appearance

  • Fonts inside an HTMLArea expressed in "pt" instead of "px" will display slightly smaller due to a bugfix.
  • Non-modal Dialogs in the Web Client rendered inside the main window, instead of as new browser windows due to JSWindow implementation, allowing multiple modal and non modal in the same window
  • Default alignment for text in TableView & Portal headers brought inline (Centered)
  • Aligned default border and alignment for all elements between Smart Client and Web Client
  • When using labels with labelFor link to other elements in TableViews to control the TableView header rendering, the first label will now determine the height of the header
  • Due to added support for vertical and horizontal alignment on labels and buttons in the Web Client, any custom HTML displayed in a non-editable HTMLArea in the Web Client will be offset from the top by 50% of the height of the element, if the vertical alignment is left on Default, with means center. Set the vertical alignment to Top to get the HTML to display correctly again.
  • Due to the added support for an editable HTMLArea in the Web Client, end users will now see an HTML Editor in the Web Client if the HMTLArea is left enabled in the Solution Design, whereas in previous versions it would show the raw content of the dataprovider.
Form Design
Deprecated API

...

Stoc

Upgrading Installations

In order to provide the best possible security, Servoy 7 comes with a renewed Code Signing certificate, that utilizes OCSP. As Java 5 is End Of Live (see http://www.oracle.com/technetwork/java/eol-135779.html) it does not support OCSP, which makes Java 6 the new minimum Java version for Servoy 7.

Upgrade Servoy 6.1.x Installations to Servoy 7.x

As of November 8th 2013, the Servoy 6.1.x branch is merged into the 7.x branch, as outlined in the Servoy Release Policy update post on the Servoy Blog. The specific details of upgrading Servoy 6.1.x Developer or Servoy 6.1.x Application Server installations to 7.3 are detailed in the Servoy 6.1.6 to Servoy 7.3 upgrade on Servoy Talk.

Upgrading Servoy Application Server

Installations running an older version of Servoy can't be upgraded, thus a new installation is required. See Installing the Application Server for more information.

Upgrading Servoy Developer

Existing Servoy 6.1.x installation can be upgraded to Servoy 7.0.x. In order to do so, open the Available Update Sites preferences and edit the URL of the Servoy update site entry:

  • Open Window > Preferences > Install/Update > Available Software Sites
  • Find the entry named Servoy update site and select the row
  • Click Edit 
  • Change the Location field from https://www.servoy.com/developer/61x_updates to https://www.servoy.com/developer/70x_updates
  • Close all dialogs
  • Go to Help > Check for updates to trigger the update
  • After the update has completed, restart Servoy Developer
  • when Servoy Developer is launched again, it will prompt for an update of the underlying Servoy Application Server.

Servoy Developer installations of older Servoy version cannot be upgraded, so a new installation with the Servoy 7 installer is required. See Installing Developer for more information.

Upgrading Existing Solutions

Upgrading existing Solutions to Servoy 7 is as easy as opening Servoy Developer 7 and getting the Solutions into the workspace or opening an existing workspace in Servoy 7. Note that once solutions are edited using Servoy 7, they cannot be used in earlier versions of Servoy anymore.

Once imported, the Solutions can be tested with Servoy 7. Servoy 7 introduces a few minor behavior changes, some of which could potentially break existing code. It should be investigated if the upgraded solutions are affected by these changes. The behavior changes are listed and discussed in the paragraph #Behavior Changes.

Behavior Changes

This paragraph describes the behavior changes that are introduced in Servoy 6.0. There are three categories of behavior changes:

  1. Changes that might break existing code
  2. Real behavior changes
  3. Changes that affect the display of the UI
Changes That Might Break Existing Code
  • As of Servoy 7 Forms that are in ClientDesign mode will retain their Client Design mode status if they are hidden from the UI and then shown again
  • As of Servoy 7 when a column has a Column Converter attached, the output of the converter will be used for the SQL layer of Servoy in FindMode or with Table/FoundSet filters. Prior to Servoy 7, the supplied values in FindMode by the user or through scripting or the values used in Table/FoundSet filters would not be passed through the column Converter before being used in the SQL layer
  • As of Servoy 7 when altering inherited elements their z-index will remain the same, unless the z-index is explicitly altered by the developer. Prior to Servoy 7, altering any property of an inherited element would cause the z-index to change.

Deprecated API

Servoy 7 deprecates parts of the existing API, as it has become obsolete or has been replaced by better alternatives. This section lists the deprecated methods or properties with their replacement where applicable.

Designtime API

The list of deprecated properties in the Designtime API is limited. Except for the deprecation of the rowBGColorCalculation on Forms and Portals, the deprecation of the properties require no action on behalf of the developer, as Servoy Developer will automatically handle the changes.

Object

Deprecated method or property

Replacement

Comment

Field

text

titleText

To better align name with actual function

Label, Button, Image

rotation

textRotation

To better align name with actual function

Runtime API

The majority of the deprecations in the Runtime API are related to the new windowing API and the refactored HTTP plugin. 

Object

Deprecated method or property

Replacement

Comment

globals

allmethods

solutionModel.getGlobalMethods("scopeName")

an exact replacement would be:
solutionModel.getGlobalMethods("scopeName").map(function (jsMethod) { return jsMethod.getName() } )

globals

allrelations

solutionModel.getRelations(null)

an exact replacement would be:
solutionModel.getRelations(null).map(function (jsRelation) { return jsRelation.name })

globals

allvariables

solutionModel.getGlobalVariables("scopeName")

an exact replacement would be:
solutionModel.getGlobalVariables("scopeName").map(function (jsVariable) { return jsVariable.name } )

forms

allnames

solutionModel.getForms()

an exact replacement would be:
solutionModel.getForms().map(function (jsForm) { return jsForm.name })

RuntimeForm

alldataproviders

foundset.alldataproviders

 

RuntimeForm

allnames

elements.allnames

 

RuntimeForm

allrelations

solutionModel.getRelations(dataSource) where dataSource is provided by solution model's JSForm.dataSource or controller.getDataSource()

an exact replacement would be: solutionModel.getRelations(controller.getDataSource()).map(function (jsRelation) { return jsRelation.name } )

RuntimeForm

allvariables

solutionModel - JSForm.getVariables(Boolean) or JSForm.getVariables()

an exact replacement would be:
'solutionModel.getForm(controller.getName()).getVariables().map(function (jsVariable) { return jsVariable.name })

ELEMENT_TYPES

LIST_BOX

LISTBOX

Alignment of names used

JSField

LIST_BOX

LISTBOX

Alignment of names used

ALIGNMENT

ACCORDION_PANEL

JSTabPanel.ACCORDION_PANEL

 

ALIGNMENT

SPLIT_HORIZONTAL

JSTabPanel.SPLIT_HORIZONTAL

 

ALIGNMENT

SPLIT_VERTICAL

JSTabPanel.SPLIT_VERTICAL

 

JSPart,
JSRelationItem,
JSTab

getDesignTimeProperty
putDesignTimeProperty,
removeDesignTimeProperty

 

Not relevant

databaseManager

hasNewRecords(JSRecord)

JSRecord.isNew()

 

databaseManager

hasRecordChanges(JSRecord)

JSRecord.hasChangedData()

 

databaseManager

revertEditedRecords(JSRecord)

JSRecord.revertChanges()

 

I18N

setI18NMessagesFilter

Use TableFilters instead