Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reinserting generic typing in page content, added by Rob Gansevles Saved on Mar 12, 2012
Stoc

Highlights

Include Page
newFeatureHighLights
newFeatureHighLights

Servoy Developer

First Launch Experience

...

  • Code completion inside JSDoc for supported JSDoc tags and on Types (type '@' first, then Control-Space). Supported tags:
    • @AllowToRunInFind
    • @author {userName}
    • @constructor
    • @deprecated
    • @example
    • @param {Type} name mandatory name property
    • @param {Type} [beta:name] optional name property
    • @private
    • @protected
    • @return {Type}
    • @see
    • @since
    • @SuppressWarnings (warning)
    • @throws {Type}
    • @type {Type}
    • @version
  • Support for automatically creating the basic JSDoc tags for an existing function: See context menu of the Script Editor > Source > Generate Element Comment (Alt-Shift-J) 
  • Support for inline JSDoc to provide type information for objects: 

    Code Block
    function demo(){
       /** @type {JSFoundset<db:/udm/contacts>}*/
       var x = databaseManager.getFoundset('udm', 'contacts');
       x. //Code-completion here will know that x is a FoundSet on table Contacts in the UDM database, thus will include all columns, calculations and aggregates
    }
  • Support for the @deprecated tag: When a variable or function is marked as deprecated any reference to the object will generate a builder marker
  • Support for the @private tag: Hides the object for access from outside the current scope, including child scopes. Accessing the hidden object from outside the scope in which it is defined will generate a builder marker
  • Support for the @protected tag: Hides the object for access from outside the current scope. Accessing the hidden object from outside the scope in which it is defined will generate a builder marker 
  • Support for typed Arrays: 
    • @type {String[]}
    • @type {ArrayArray<String>}
    • @type {ArrayArray<Byte>}
  • Support for types Objects:
    • @type {ObjectObject<String>}
    • @type {Object>Object<Array<String>>}: equivalent of {[beta:'one', 'two', 'three'], [beta:'four', 'five', 'six'], [beta:'seven', 'eight', 'nine']}
  • Support for typing JSFoundsets and JSRecord: 
    • @type {JSFoundsetJSFoundset<datasource>}
    • @type {JSRecordJSRecord<datasource>}
      (a datasource string is build up like this: "db:/{serverName}/{tableName}", for example "db:/udm/contacts")
    • @type {JSFoundset<{column1:String,column2:Number}>}
    • @type {JSRecord<{column1:String,column2:Number}>}
  • Support for typing as a RecordType:
    • @type {JSDataSet<{name:String, age:Number}>}
    • @param { {name:String, age:Number}} person A JavaScript object with a name and age property representing a person
  • Support for optional properties on RecordType. 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

...

  • Support for typing parameters as Objects with certain properties:
  • Code Block
    /**
     * @param {Object} person
     * @param {String} person.name
     * @param {String} person.email
     * @param {Number} [person.age] optional "age" property
     */
    function processPerson(person) {
      application.output(person.name);
      application.output(person.email);
    }
  • Support for rest parameters: Allows to indicate through JSDoc that a function can take unlimited trailing arguments of the specified type:

    Code Block
    /**
      * @param {...String} someExtraStrings One or more additional String can be send into this function
      */
    function methodWithRestParams(someExtraString){}
    
    
    function test() {
       methodWithRestParams('one', 'two', 'three', 'four');
    }
  • Support for typing as an instance of a Form. Can also be used to indicate that the Form must extend the specified Form:
    • @type {FormForm<mySuperFormName>}
  • Support for the so-called "AnyType"
    • @param * myParam A parameter that can contain any type of value. 
  • Beans are made available as types in CodeCompletion, to be used for type checking and JSDoc 
  • Support for @AllowToRunInFind on functions to indicate that the the function should be executed on event handlers while in FindMode:
    Eliminates the //controller.search() workaround. Note that that running JavaScript while in FindMode has it's limitations and not all behavior is 100% defined. More details will follow.
  • Support for @constructor tag, to indicate that a function declaration is to be used as a Constructor. Functions marked as Constructor also display differently in the Script Outline view 
  • Automatic JSDoc @type setting on global and Form variables
  • Ability to update the type of a variable by updating the JSdoc @type tag value AND the default value
  • Added specific JSDoc context for Templates (Window > Preferences > JavaScript > Editor > Templates), besides the already existing JavaScript context.
  • Added dedicated RuntimeXxxx types for all runtime element types and for Forms. For example RuntimeLabel, RuntimeTextField and RuntimeForm. These types can be used in JSDoc, but also in scripting to check if an object is and instance of a certain type, using the instanceOf operator. Note that RuntimeForm and Form are the same, RuntimeForm was added for consistency. RuntimeComponent is the base type for all default elements that Servoy Ships with
  • Removed Strict Mode option from the JavaScript Preferences: the additional warnings that where generated with Strict Mode enabled are now part of the extended JavaScript Error/Warnings preferences and thus can be enabled/disabled on individual basis  

...

  • If a font in html_area is expressed in "pt" instead of "px" -> it will get smaller.
  • Non-modal Dialogs in WC 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
  • 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.   
  • 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.
  • 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.
  • controller.recreateUI() will keep the existing x and y scrollPosition of the form being recreated.
  • When adding a tableFilter on a column that already has a tablefilter on it, the newly applied filter will not override the existign 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. 
  • 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 
  • The client that gets started as Authenticator during the login process isn't consuming a license any more 
  • 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"
  • plugins.rawSQL.executeStoredProcedure() now returns the last resultset retunred by the stored procedure, instead of the first
  • The position and dimensions of JSWindow's (Windows and Dialogs) are now persisted over client sessions
  • 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
  • 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.
  • 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"
  • 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
  • Related null-searches will no longer return records without related records (for example in find mode: orders_to_details.detail_date='^=' will only return orders that have one or more detail records with null-detail_date and not orders without detail records), this change can be suppressed with setting servoy.client.relatedNullSearchAddPkCondition=false in the servoy.properties file.
  • BugFix: When passing JavaScript Arrays into the Scripting API (Servoy Scripting API or plugins), previously empty Array positions were removed, not they are reserved
  • 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"
  • 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]}]
      

...

Example use: Making negative values in a column red and zero values orange

Code Block

/**
 * 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'; 
 }
}

...

  • Support added to Icons on Tabs of a Tabpanel
  • Support added for percentage values when setting the divider position of Splitpanes (values between 0 and 1 are considered percentage values e.g. 0.5 means 50%)
  • Support added for .replaceSelectedText(...) on fields
  • Support added for rollOverImageMedia
  • Support for "media:///...." in HTML inside tooltips
  • Support for "media:///...." for the "scr" attribute of Script and Style tags included in non-editable HTMLArea's and HTML contained in the text property of Labels
  • Added mnemonic support in Web Client
  • Added horizontal & vertical alignment support to labels/buttons with images in the Web Client
  • Link tags contained in non-editable HTMLArea's are now inserted into the HEAD part of the Markup
  • Support for HTML on nodes of the DBTree(Table)View beans
  • Support for separators within ComboBox dropdown
  • Partial Dialogs plugin support (see Plugins & Beans
  • Added support for editable HTMLArea: editable HTMLArea's in the Web Client will now display a full WYSIWYG HTML editor. due to the nature of the Web Client, the HTML Editor displays all it's buttons inside the HMTLArea, whereas in the Smart Client, the buttons are displayed in a ToolBar in the main Toolbar area 
  • Added anchoring support for non-Servoy-aware beans 
  • Performance improvement of the Web Client due to compression enabling by default
  • Moved all styling of Tabpanels to the servoy_default_webclient_stylesheet.css 
  • Moved default form background-color into servoy_default_webclient_stylesheet.css 
  • Exposed an 'indicator' styleClass in servoy_default_webclient_stylesheet.css, to allow customization of the Loading indicator
  • Ability to control the text of the "Loading..." indicator by specifying an i18n key with the following name: servoy.general.loading
  • Disabled tooltips on touch devices 
  • Upgraded several used libraries:
    • Upgraded to jQuery 1.5
    • Upgraded to YUI 2.8.2r1
  • Support for retrieving browser-side variables in JavaScript callbacks inside non-editable HTMLArea's by using a prefix

    Code Block
    <html>
    <body>
    <button onclick="javascript:globals.myCallBackMethod(browser:browserSideVariableName1, browser:browserSideVariableName1)">test</button>
    </body>
    </html>

...

  • Added support to ws_read & ws_create method to optionally return an XML object instead of a JavaScript Object. (see JS Lib > XML)
  • Added support for retrieving the Query Parameters of the Request: they will be passed in an Array as the last argument into the ws_ call.
Code Block

/**
 * @param {String...} pathArguments
 * @param {Object<Array<String>>} requestParams
 */
function ws_read(pathArgument, requestParams) {
    var _requestParams;
    if (arguments.length > 0 && arguments[arguments.length -1 ] instanceOf Array) {
	_requestParams = arguments[arguments.length - 1];
    }
}
  • Added support for returning specific HTTP Status codes from the ws_* methods, by throwing an exception with a number as value:
Code Block

throw 404; //404 is the HTTP status code for Not Found, for example. (see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html)
  • Ability to implement custom authentication, by implementing a ws_authenticate method, similar to the other ws_ methods:
Code Block

/**
 * @param {String} userName
 * @param {String} password
 * @returns {Boolean}
 */
function ws_authenticate(userName, password) {
   //Implement custom authentication logic here
   return true; 
}

...