Eclipse Scout. Migration Guide. Scout Team. Version 7.0

Similar documents
Eclipse Scout. Release Notes. Scout Team. Version 7.0

Eclipse Scout. Release Notes. Scout Team. Version 7.1

Eclipse Scout. Migration Guide. Scout Team. Version 7.1

5.1 Registration and Configuration

Eclipse Scout. Migration Guide. Scout Team. Version 8.0

Setting up a Maven Project

Eclipse Scout JS. Technical Guide. Scout Team. Version 8.0

MIGRATION GUIDE DIGITAL EXPERIENCE MANAGER 7.2

Rest Client for MicroProfile. John D. Ament, Andy McCright

NODE.JS MOCK TEST NODE.JS MOCK TEST I

JAX-RS and Jersey Paul Sandoz

Selenium Testing Course Content

Rest Client for MicroProfile. John D. Ament, Andy McCright

OSGi on the Server. Martin Lippert (it-agile GmbH)

JAVA. 1. Introduction to JAVA

CHAPTER 1: A GENERAL INTRODUCTION TO PROGRAMMING 1

Automatically Generating Refactorings to Suppport API Evolution

Rest Client for MicroProfile. John D. Ament

ApacheCon NA How to Avoid Common Mistakes in OFBiz Development Presented by Adrian Crum

Oracle Utilities Application Framework

SERVICE TECHNOLOGIES

JavaEE Interview Prep

JVA-563. Developing RESTful Services in Java

SSC - Web applications and development Introduction and Java Servlet (I)

Baking a Java EE 8 Micro Pi Mike Croft Ondrej Mihályi. Payara Support

Rest Client for MicroProfile. John D. Ament, Andy McCright

News in RSA-RTE 10.1 updated for sprint Mattias Mohlin, November 2017

Apache Wicket. Java Web Application Framework

Patterns and Best Practices for dynamic OSGi Applications

2 Apache Wink Building Blocks

Java J Course Outline

Apache Wink Developer Guide. Draft Version. (This document is still under construction)

NEOGRID USER MANUAL (VERSION )

Implement a Multi-Frontend Chat Application based on Eclipse Scout

Apache Wink User Guide

TRANSFER MANAGER 2017

Complete Java Contents

Oracle - Developing Applications for the Java EE 7 Platform Ed 1 (Training On Demand)

Session 9. Introduction to Servlets. Lecture Objectives

Simile Tools Workshop Summary MacKenzie Smith, MIT Libraries

Tapestry. Code less, deliver more. Rayland Jeans

04 Webservices. Web APIs REST Coulouris. Roy Fielding, Aphrodite, chp.9. Chp 5/6

Application Development in JAVA. Data Types, Variable, Comments & Operators. Part I: Core Java (J2SE) Getting Started

Type of Classes Nested Classes Inner Classes Local and Anonymous Inner Classes

IBM. Enterprise Application Development with IBM Web Sphere Studio, V5.0

News in RSA-RTE 10.1 updated for sprint Mattias Mohlin, January 2018

Eclipse Lyo Overview. Michael Fiedler, Eclipse Lyo committer IBM Corporation

IBM. IBM WebSphere Application Server Migration Toolkit. WebSphere Application Server. Version 9.0 Release

classjs Documentation

Apache Wink 0.1 Feature Set

What s new in IBM Operational Decision Manager 8.9 Standard Edition

FUEGO 5.5 WORK PORTAL. (Using Tomcat 5) Fernando Dobladez

Developing Applications for the Java EE 7 Platform 9-2

CS506 Web Design & Development Final Term Solved MCQs with Reference

News in RSA-RTE 10.2 updated for sprint Mattias Mohlin, May 2018

NetBeans 6.5.1, GlassFish v 2.1, Web Space Server 10 Patient Lookup Portlet with a Google Map, Route and Directions

VidyoEngage for Genesys Widgets

AngularJS Fundamentals

Introduction to Web Application Development Using JEE, Frameworks, Web Services and AJAX

Introduction & Basics! Technical Foundation! Authentication! Obtaining a token!... 4 Using the token! Working with notes!...

"Web Age Speaks!" Webinar Series

Java SE7 Fundamentals

A Model-Controller Interface for Struts-Based Web Applications

Call: Core&Advanced Java Springframeworks Course Content:35-40hours Course Outline

BPM Case Study - Managing Regulatory Controls in the Banking and Financial Sector with Activiti. Greg Harley Director - Special Projects BP3 Global

Policy Based Device Access Security Position Paper to Device Access Policy Working Group

wcm.io Context-Aware Configuration

web.xml Deployment Descriptor Elements

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS

APACHE SLING & FRIENDS TECH MEETUP BERLIN, SEPTEMBER APACHE JACKRABBIT: BASIC CONCEPTS Christian Riemath, Igor Sechyn

Simplifying Development and Testing of GUIs with SAF (JSR 296) and FEST. Michael Hüttermann Training & Consulting Alex Ruiz Oracle Corporation

Introduction Haim Michael. All Rights Reserved.

Extensibility, Componentization, and Infrastructure

CO Java EE 6: Develop Web Services with JAX-WS & JAX-RS

The Struts MVC Design. Sample Content

JAVA+ANDROID CURRICULUM 6 WEEKS. INTRODUCTION TO JAVA Understanding Requirement: Why Java Why Java is important to the Internet JAVA on LINUX Platform

Networking & The Web. HCID 520 User Interface Software & Technology

Writing Servlets and JSPs p. 1 Writing a Servlet p. 1 Writing a JSP p. 7 Compiling a Servlet p. 10 Packaging Servlets and JSPs p.

Contents. 1. JSF overview. 2. JSF example

DEVELOPMENT OF A SOFIA2 CLIENT (KP) FOLLOWING THE MODEL KP ARCHITECTURE

Session 12. RESTful Services. Lecture Objectives

Timelog System on Android OS

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Is OSGi Modularity Always Worth It? Glyn Normington

The jpos REST tutorial shows you how to use an out-of-the-box binary distribution of jpos to build a REST server that responds to an /echo call.

Simplifying GWT RPC with

Liferay DXP profile for Dynatrace

NetAdvantage for ASP.NET Release Notes

NetAdvantage for jquery SR Release Notes

SUN. Java Platform Enterprise Edition 6 Web Services Developer Certified Professional

widgetjs Documentation

Software Engineering 2 A practical course in software engineering. Ekkart Kindler

/ / JAVA TRAINING

Java- EE Web Application Development with Enterprise JavaBeans and Web Services

IBM Best Practices Working With Multiple CCM Applications Draft

JavaServer Faces Technology, AJAX, and Portlets: It s Easy if You Know How!

J2EE Development. Course Detail: Audience. Duration. Course Abstract. Course Objectives. Course Topics. Class Format.

Introduction: Manual Testing :

BEAAquaLogic. Service Bus. Interoperability With EJB Transport

The Eclipse Rich Ajax Platform

Transcription:

Eclipse Scout Migration Guide Scout Team Version 7.0

Table of Contents About This Document....................................................................... 1 Service Release Migration................................................................. 1 API Changes (Java).......................................................................... 1 New Scout Modules for Jackson-based REST Services........................................ 1 Removed Properties "enabledprocessing" on IButton and IAction............................. 2 Added HTTP Abstraction Layer: Google HTTP Client......................................... 3 IGroupBox: Changed Behavior of "getgridcolumncount"..................................... 3 ScoutTexts............................................................................... 3 ISmartField(2) (since 7.0.100).............................................................. 4 Deprecated Property "focusable" From IFormField, AbstractFormField (since 7.0.300).......... 4 API Changes (JavaScript)..................................................................... 5 render().................................................................................. 5 Promises................................................................................. 5 Removed addclasssvg, removeclasssvg, attrsvg, removeattrsvg............................ 5 Property Change Event.................................................................... 5 Logical Grid Validation.................................................................... 6 Event Naming............................................................................ 6 Graphic Utility Naming (since 7.0.100)...................................................... 7 Focus and RequestFocus Merged (since 7.0.100)............................................. 8 Table Column Index Now Optional (since 7.0.100)........................................... 8 AbstractLifecycle and FormLifecycle Simplified (since 7.0.100)............................... 8 GroupBox: "mainbox" Flag Now Set Automatically (since 7.0.100)............................. 9 Charts: Fixed Typo in Function Name (since 7.0.300)......................................... 9 Other Changes.............................................................................. 9 Maven "provided" Dependencies........................................................... 9

About This Document This document describes all relevant changes from Eclipse Scout 6.1 to Eclipse Scout 7.0. If existing code has to be migrated, instructions are provided here. If you are upgrading from version 6.0, please also read the migration guide for the 6.1 (Oxygen preview) release: https://eclipsescout.github.io/6.1/migration-guide.html Service Release Migration The following changes were made after the initial 7.0 release (Eclipse Oxygen release). Additionally follow these instructions when updating to a service release. Oxygen.3 (7.0.300) Release Expected on March 21, 2018 Attention: The here described functionality has not yet been released and is part of an upcoming release. <a anchor="deprecated Property "focusable" from IFormField">AbstractFormField (since 7.0.300)</a> Charts: Fixed Typo in Function Name (since 7.0.300) Oxygen.2 (7.0.200) Released on December 20, 2017 Oxygen.1 (7.0.100) Released on September 27, 2017 Graphic Utility Naming (since 7.0.100) Focus and RequestFocus Merged (since 7.0.100) ISmartField(2) (since 7.0.100) Table Column Index Now Optional (since 7.0.100) AbstractLifecycle and FormLifecycle Simplified (since 7.0.100) GroupBox: "mainbox" Flag Now Set Automatically (since 7.0.100) API Changes (Java) New Scout Modules for Jackson-based REST Services The following new Scout modules have been added to support REST services with Jackson as marshaller: org.eclipse.scout.rt.rest 1

org.eclipse.scout.rt.rest.test org.eclipse.scout.rt.jackson org.eclipse.scout.rt.jackson.test In order to use REST services based on the JAX-RS Jersey implementation, the following section must be added to the project web.xml: <!-- JAX-RS Jersey Servlet --> <servlet> <servlet-name>api</servlet-name> <servlet-class>org.glassfish.jersey.servlet.servletcontainer</servlet-class> <init-param> <param-name>javax.ws.rs.application</param-name> <param-value>org.eclipse.scout.rt.rest.restapplication</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> The RestApplication class searches for all implementations of IRestResource and exposes them as REST services. Removed Properties "enabledprocessing" on IButton and IAction When a user performs two consecutive clicks on a button or a menu within a very short period of time, the action is executed twice. In some cases, this is an unwanted behavior. A new property "preventdoubleclick" was added to IButton and IMenu to disable it (see release notes). In older Scout versions, two flags (m_enabledprocessing and m_enabledprocessingaction, respectively) were use to accomplish a similar objective. Whenever the click/action handler was started, the flag was set to false, and set back to true at the end of the execution. A second call to the method had no effect. However, this logic no longer works since the introduction of the HTML UI. The new UI strictly allows only one UI event to work on the client model simultaneously (subsequent click events are hold back by the UiSession lock). Consequently, the "enabledprocessing" flag is never false, and no clicks are prevented. Because this construct no longer works, the corresponding properties and methods were removed, namely: AbstractButton: m_enabledprocessing IButton/AbstractButton: isenabledprocessing() IButton/AbstractButton: setenabledprocessing() IButton/AbstractButton: disarm() ButtonEvent: TYPE_DISARM AbstractAction: m_enabledprocessingaction IAction/AbstractAction: isenabledprocessingaction 2

Migration: Delete any code that references any of the removed methods. There is not replacement, as the whole concept became disfunctional with the HTML UI. To prevent accidental double clicks, use the new getconfiguredpreventdefault() property. If for very rare and special cases such a flag is required, it has to be implemented manually by overriding AbstractButton.doClick() and AbstractAction.doAction(). Added HTTP Abstraction Layer: Google HTTP Client If your application previously used a custom (not provided by Scout) implementation of the org.eclipse.scout.rt.shared.servicetunnel.http.httpservicetunnel class a migration might be necessary. For the service tunnel and a few other HTTP usages a new HTTP abstraction layer (Google HTTP Client 1.22) was introduced to support different low-level HTTP libraries (previously just the java.net.httpurlconnection was used). The new default low-level HTTP library is the Apache HTTP Client 4.5.3, more details are available in the release notes. As the java.net connections are not used anymore by default the MultiSessionCookieStore (for java.net connections) is not installed by default (could be installed manually). For the HttpServiceTunnel class the method URLConnection createurlconnection(servicetunnelrequest call, byte[] calldata) has been replaced by HttpResponse executerequest(servicetunnelrequest call, byte[] calldata). Also several methods (addcustomheaders, addsignatureheader, addcorrelationid, createauthtoken and intercepthttpresponse) signatures have changed their URLConnection parameter to either a HttpRequest or HttpResponse parameter. The same migration applies for subclasses of the org.eclipse.scout.rt.server.commons.servlet.httpproxy class. IGroupBox: Changed Behavior of "getgridcolumncount" The function getgridcolumncount() returned the calculated column count of the grid. This has been changed so that it returns the configured one which is not necessarily the same. Example: the default of the property gridcolumncount is -1 which will typically result in 2 columns. So in case you used this method, you should consider calling getfieldgrid().getgridcolumncount() instead. ScoutTexts Removed support for session scope specific ScoutTexts instances because support of scoped services was removed in Scout without OSGi (version >= 5.0). Changes: ScoutTexts is now an application-scoped bean 3

ScoutTexts.CURRENT thread local removed without replacement (use BEANS.get(ScoutTexts.class) instead) Deprecations (methods will be removed in P-release): Deprecated method ScoutTexts.get ScoutTexts.getInstance() ISession.getTexts() AbstractSqlService.getConfiguredNlsProvider() AbstractSqlService.getNlsProvider() Comments Replacement: TEXTS.get Replacement: BEANS.get(ScoutTexts.class) Replacement: BEANS.get(ScoutTexts.class) Method is not used anymore (returns null) Method is not used anymore (returns null) ISmartField(2) (since 7.0.100) The following methods have been removed from ISmartField(2): String getbrowsenewtext() setbrowsenewtext(string s) void dobrowsenew(string newtext) The following methods have been removed from AbstractSmartField(2): protected ILookupRow<VALUE> execbrowsenew(string searchtext) protected String getconfiguredbrowsenewtext() Note: with 7.0 these methods still exist on the old smart field ISmartField but are marked as deprecated. Deprecated Property "focusable" From IFormField, AbstractFormField (since 7.0.300) Since the new Html UI was introduced with Scout 5.2 the property focusable had no effect on the UI anymore. Instead the UI uses sensible defaults for each field type. For instance: a LabelField is never focusable, a normal StringField is always focusable, as long as it is enabled. Since the property was rarely used, we deprecated the related code and plan to remove it with the following release. The following methods/properties will be removed with Scout 7.1: Method boolean IFormField#isFocusable() Method void IFormField#setFocusable(boolean f) Field boolean IFormField#PROP_FOCUSABLE Method boolean AbstractFormField#getConfiguredFocusable() Class AbstractNonFocusableButton Class AbstractNonFocusableRadioButton 4

You should no longer use these methods. Since there will be no replacement in later Scout releases, you should delete code that uses these methods/properties. API Changes (JavaScript) render() The parameter $parent has been removed from the _render method because this.$parent is available for every widget. There is no need to have a parameter $parent which points to the same variable. Use this.$parent instead. Also $parent is now optional when calling widget.render(). The $parent may be resolved using this.parent. No need to always write widget.render(this.$container) anymore, instead just write widget.render() if the $container of the parent should be used as $parent. Promises With jquery 3 the promise API is now Promises/A+ compliant. This means you may need to adjust your code if you use promises. We noticed the following effects: If a rejection is catched using a fail handler, the fail handler has to return a rejected promise as well, otherwise the next success handler would be called instead of the next fail handler. Every callback is now executed asynchronously. This is especially relevant for the tests. Catch has been added replace fail(null, func) for better readability. See also https://jquery.com/upgrade-guide/3.0/ for details. Removed addclasssvg, removeclasssvg, attrsvg, removeattrsvg These functions are now supported by jquery directly. Just use addclass, removeclass, attr and removeattr. Migration: Replace all function calls in your code by the corresponding alternative (see above). Property Change Event The property change event has been simplified. The event had 3 properties: newproperties oldproperties changedproperties 5

This was added to be able to react to multiple property change events at once. Since 6.1, bulk property changes don t exist anymore, so there is no need for these properties anymore. Now, with 7.0, the property change event has the following properties: propertyname oldvalue newvalue This makes handling the event easier. Check your propertychange event handlers and adjust them accordingly. Logical Grid Validation Automatic Grid Data Validation has been introduced. This means there is no need to manually create a Logical Grid (e.g. VerticalSmartGroupBoxBodyGrid or HorizontalGroupBoxBodyGrid and validate it anymore, this will be done by the LogicalGridLayout itself. Also, check your JSON files, remove any explicit x, y grid definitions because they will be calculated by the LogicalGrid. Make sure to always use the property griddatahints instead of griddata. Event Naming The naming of the events has been harmonized to conform with the event naming guide. This is only relevant, if you attached listeners using JavaScript or if you do some kind of load testing using the events in the requests. The following changes have been made: Rename doaction to action Rename linkpagewithrow to pagerowlink Rename initpage to pageinit Rename exporttoclipboard to clipboardexport Rename parseerror to parseerror Rename selectionchanged to selectionchange Rename callaction to action Remove inserttext Rename displaytextchanged to acceptinput Rename popupopen to popupopen Rename locationchanged to locationchange Rename sessionready to sessionready Rename desktopcreated to desktopready Rename positionchanged to positionchange Rename scrollstart to scrollstart 6

Rename scrollend to scrollend Rename clicked to click Rename modelchanged to modelchange Rename selectionchanged to selectionchange Rename viewrangechanged to viewrangechange Rename formactivated to formactivate Rename historyentryactivated to historyentryactivate Rename viewadded to viewadd Rename viewremoved to viewremove Rename viewactivated to viewactivate Rename viewdeactivated to viewdeactivate Rename tabclicked to click Rename tabselected to tabselect Rename nodeclicked to nodeclick Rename rowclicked to rowclick Rename rowssorted to sort Remove sortrows Rename rowsgrouped to group Remove grouprows Rename exporttoclipboard to clipboardexport Rename rowsfiltered to filter Rename addfilter to filteradded Rename removefilter to filterremoved Rename filterresetted to filterreset Remove groupingchanged Graphic Utility Naming (since 7.0.100) The naming of the functions of scout.graphics and scout.htmlcomponent has been harmonized. Also, they now consistently use an options parameter. The following changes have been made: scout.graphics: Rename getmargins to margins Rename getinsets to insets Rename getsize to size 7

Remove getbounds scout.htmlcomponent: Rename getmargins to margins Rename getinsets to insets Rename getsize to size Rename getpreferredsize to prefsize Rename getavailablesize to availablesize Remove getbounds The old methods still exists but are marked as deprecated. Note that getbounds does not include margins anymore, and bounds and offsetbounds now take an options object instead of 2 boolean parameters. Focus and RequestFocus Merged (since 7.0.100) scout.widget had a function called requestfocus. Some concrete widgets provided a function named focus. Because there is no need to have two methods doing the same, these functions have been merged. scout.widget now provides a function focus. RequestFocus has been deprecated. Table Column Index Now Optional (since 7.0.100) When creating a table using JavaScript and scout.create('table'), specifying the index for each column has been necessary. This has changed, the column indices are now set automatically based on the order of the columns. Just remove the index settings from your JSON files. AbstractLifecycle and FormLifecycle Simplified (since 7.0.100) The life cycle has been reworked and simplified: Renamed AbstractLifecycle to Lifecycle. Installed form life cycle by default and added delegating functions to the form to make it easier to use. Implemented reset. Added default callbacks on form which may be implemented by subclasses: _load, _save, importdata, exportdata Removed dofinally, because it is not needed yet. Renamed disposewidget to close. Removed the do prefix from all the life cycle functions. Added system menus (OkMenu, CancelMenu etc.). 8

Migration: Check your forms, remove the life cycle, use the new callback functions and system menus if needed, adjust your custom life cycles. GroupBox: "mainbox" Flag Now Set Automatically (since 7.0.100) Every form needs a root group box. That box has the flag mainbox set to true. Until now, this has to be set explicitly. From now on, you can omit it. To migrate just remove the explicit mainbox flags. Charts: Fixed Typo in Function Name (since 7.0.300) Incorrect function name handeltobiglabels in AbstractGridChartRenderer.js was renamed to handletoobiglabels. You must apply this renaming to your code if this function is called or overridden. Other Changes Maven "provided" Dependencies In Maven dependencies with the scope provided are not transitive. This makes sense if a dependency is set to provided depending on the environment. Any artifacts that are not intended to be used in a certain environment should not have the scope provided and are therefore now transitive. We removed any current dependency javax.servlet:javax.servlet-api except for the one in the artifact org.eclipse.scout.rt.server.commons. To migrate your project, remove any dependency to javax.servlet:javax.servlet-api, javax.xml.ws:jaxws-api or javax.ws.rs:javax.ws.rs-api. Then add to all artifacts with packaging type war the dependency to javax.servlet:javax.servlet-api with scope provided. Depending on the container, you may want also to add the depdendency javax.xml.ws:jaxws-api with scope provided to the war artifact. 9

<project> <artifactid>myproject.server.war</artifactid> <packaging>war</packaging> <dependencies> <dependency> <groupid>myproject</groupid> <artifactid>myproject.server</artifactid> </dependency> <!-- provided by container --> <dependency> <groupid>javax.servlet</groupid> <artifactid>javax.servlet-api</artifactid> <scope>provided</scope> </dependency> </dependencies> </project> Do you want to improve this document? Have a look at the sources on GitHub. 10