CodeCoupler UI Update from 1.x (cc-complete) to 2.x (cc-ui)
Changed Initializing procedure
Before:
After:
Stage loading option run
changed to stage
.
Before:
After:
System changes
- Function
getAuthModule
removed. Usesystem.auth.module
instead. - Functions
getAppLauncher
,getAppLauncherUI
andgetAppUIName
removed. - Function
run
renamed toapp
Stage changes
- Stage object must be derived from object
Stage
and will not use the old Widget-Factory anymore. Implications: - The HTML will not be loaded automatically
- The class with the dashed name of the stage will not appended on the parent stage.
initState
is nowinitialized
and will be automatically handled by base class.- The constructor arguments changed from (
current stage
,options
) to (environment
,options
). - The property
$ccSystem
will not merged anymore intooptions
. Use instead the propertysystem
from the argumentenvironment
. - The css class
cc-os-stage
will not set to new stages anymore.
DataSource "LoopbackRepeating" changes
All the special properties was moved from trasnportSettings
to transport
.
These properties changed:
- UnauthorizedStatus: Changed name to
repeatOnStatus
and fromint
toArray
. - onUnauthorizedError: Change name to
repeatProcess
. Arguments is now the result object of the ajax request and not anymore a message which is configured inUnauthorizedMessage
. - The property
UnauthorizedMessage
do noit exist anymore.
Also keep in mind, that the repeating request feature was outsourced into the own base class
DataSourceRepeating
.
Launcher (now Sidebar) changes
Launcher
renamed toSidebar
once
(boolean) do not exist anymore, useid
(string) now.
App changes
- Everything inside the property
definition
is now moved to the root.
Before:
Now:
initPrepare
,initPanel
,initApp
andinitWidgets
moved to only one functioninit
Return of prepare
is now always:
window.libs
Registration not used anymoreblock
will use the argumentstype, text
like theSystem.block
function and nothtml
anymore- CSS class derived from name will not be set automatically
closeApp
renamed toclose
widgetsById
,widgetsAll
andwidgetsByName
replaced withwidgets
where you can acces only widgets which have anid
.- With the new
widgetsContainer
you can access the container of each widget.
Changes to Layout configuration:
widget
andcomponentName
is not used anymore. Set the widget class directly intocomponentType
.config
is not used anymore. UsecomponentState
instead
Widget Changes
_storage
(Cookie based storage) not supported anymore-
definition.templateFilename
and automatic template loading not supported anymore -
Everything inside the property
definition
is now moved to the root.
Before:
Now:
init
renamed tostart
. The method cannot return false to reject initialisation. It should just throw an error.- jQuery Wrapper not supported anymore
- Plugin Data-API not supported anymore
block
will use the argumentstype, text
like theSystem.block
function and nothtml
anymoreshowHint
reneamed tohint
Widget Quick Start Migration Steps
If the widget is written based on the template in the documentation, you can follow these steps to get the work done:
- Remove encapsulation bracket with a standard class definition:
- Remove the
widgetDefinition
and thewidgetObject
assignment. - Change the
widgetDefaults
assignment into a static property:
- Replace the
init
function withasync init(env, options)
and add these three lines to get the old functionality:
- Replace all other functions into class methods:
- You can replace private functions into real private class methods:
- Replace calling private functions with invoking real class methods:
- Replace the following variables:
Panel changes
Moved functionality from Panel
to Apllication
:
- Button Shortcuts for
footerToolbar
- Block and Unblock
- Hints
- Layout:
- Option
component
will not moved toapplication
. Onlylayout
allowed. - Option
layoutTarget
moved tolayout.element
- Option
register
removed