Child pages
  • Upgrading to Servoy 7.x.x

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

...

Deprecated API
Designtime API

...

...

  • "extendsForm" has been renamed to "extends"
  • "rowBGColorCalculation" has been replaced by Row styling through CSS and the new onRender event for conditional styling

...

  • "resizeble" has been renamed to "resizable"
  • "rowBGColorCalculation" has been replaced by Row styling through CSS and the new onRender event for conditional styling

...

  • "onTabChange" has been renamed to "onChange"

...

Runtime API

...

Object

Deprecated method or property

Replacement

Comment

Form

extendsForm

extends

 

 

rowBGColorCalculation

CSS Row Styling & onRender event

 

Portal

resizeble

resizable

Fix typo

 

rowBGColorCalculation

CSS Row Styling & onRender event

 

TabPanel

onTabChange

onChange

 

...

Runtime API

...

Object

Deprecated method or property

Replacement

Comment

controller

.getContainerName()

controller.getWindow().getName()

 

Button

...


Label
Fields
Rectangle
TabPanel
SplitPane
Portal

.setBorder()

...


.setFont()

...


.getTitleText()

...


.setImageURL()

...


.border

...


.font

...


.titleText

...


.imageURL

...


Matching getters or setters added, allowing both getting and setting the value.

...

Not all mentioned properties are applicable to each mentioned type of object

...

RuntimeLabel

.getParameterValue()

...


N/A

Never worked properly

Date

...

.setYear()

.getFullYear()

...


This function is deprecated in the JavaScript specification

...


Application

...

.getStartupArguments()

...


onOpen event handler of the solution

Deeplink arguments are now passed to both the onOpen event handler of the Login and Main solution.

...


The .getStartupArgument() is therefor no longer required to get access to the startupArguments prior to login

...


 

.closeForm()

JSWindow.hide()

Servoy 6 contains a complete new Windowing API. A window or dialog is now an instance of the JSWindow class to which a lot of the methods have been moved. New methods were added to the application and controller objects to interact with windows

...


 

.

...

getWindowHeight()

...


JSWindow.

...

getHeight()

...


 

 

.getWindowWidth()

...


JSWindow.getWidth()

 

 

.getWindowX()

...


JSWindow.getX()

 

 

.getWindowY()

...


JSWindow.getY()

 

 

.setWindowLocation()

...


JSWindow.setLocation()

 

 

.setWindowSize()

...


JSWindow.setSize()

 

 

.showFormInDialog()

...


application.createWindow('name',JSWindow.DIALOG).show('formName')

...


application.createWindow('name',JSWindow.MODAL_DIALOG

...

).show('formName')

...


...

The method application.createWindow(..) returns an object of type JSWindow, which has an Scripting API to control additional things like the title, resizability, initial bounds and whether or not to show a

...

textToolbar

 

.showFormInWindow()

application.createWindow('name',JSWindow.WINDOW).show('formName')

 

UICONSTANTS

.FULL_SCREEN

...


JSWindow.FULL_SCREEN

 

JSForm

...


.rowBGColorCalculation

...


CSS Row Styling & onRender event

 

JSPortal

.resizeble

.resizable

Fix typo

 

.rowBGColorCalculation

CSS Row Styling & onRender event

 

JSTabPanel

...

  • "onTabChange" replaced by "onChange"


.onTabChange

.onChange

 

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="6836ec4e-b17e-494c-b18f-b19ae51ce868"><ac:plain-text-body><![CDATA[

databaseManager

.getFoundSetDataProviderAsArray()

.convertToDataSet(['dataProviderId']).getColumnAsArray(1)

Duplicate functionality

]]></ac:plain-text-body></ac:structured-macro>

ServoyException

.INVALID_INPUT_FORMAT

N/A

never raised

plugins.file

.getHomeDirectory

...

()

.getHomeFolder()

Match naming convention

 

.getRemoteList()

.getRemoteFolderContents()

Match naming convention

plugins.http

.createHttpClient()

.createNewHttpClient()

The HTTP plugin was refactored to support all types of HTTP Requests and support more finegrained control over the requests. Instead of creating an HttpClient and referencing it by name, the HttpClient is now an object with it's own set of methods, for example methods to create all the different types of HttpRequests. Each XxxxRequest object has a .executeRequest() function that returns a Response object again with it's own methods.

...

 

.deleteHttpClient()

...


N/A

No longer required

 

.getHttpClientCookie()

...


.getCookie()

...

on HttpClient object

 

 

.getHttpClientCookies()

...


.getCookies()

...

on HttpClient object

 

 

.getLastPageCharset()

...


replaced by .getCharset()

...

on Response object returned by the .executeRequest() method on any of the XxxxRequest objects created by the .createXxxRequest() methods on the HttpClient object

 

 

.getPoster()

...


.createPostRequest()

...

on HttpClient object

 

 

.put()

...


.createPutRequest()

...

on HttpClient object

 

 

.setClientProxyUserNamePassword()

...


.setClientProxyCredentials()

...

on HttpClient object

 

 

.setHttpClientCookie()

...


.setCookie()

...

on HttpClient object

 

plugins.window

...


setToolBarVisible()

...


.setToolBarAreaVisible()

...


Name now matches what the function does

...

MenuBar
Toolbar

.validate()

...

N/A

No longer required

New Features