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
getAuthModuleremoved. Usesystem.auth.moduleinstead. - Functions
getAppLauncher,getAppLauncherUIandgetAppUINameremoved. - Function
runrenamed toapp
Stage changes
- Stage object must be derived from object
Stageand 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.
initStateis nowinitializedand will be automatically handled by base class.- The constructor arguments changed from (
current stage,options) to (environment,options). - The property
$ccSystemwill not merged anymore intooptions. Use instead the propertysystemfrom the argumentenvironment. - The css class
cc-os-stagewill 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
repeatOnStatusand frominttoArray. - 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
UnauthorizedMessagedo noit exist anymore.
Also keep in mind, that the repeating request feature was outsourced into the own base class
DataSourceRepeating.
Launcher (now Sidebar) changes
Launcherrenamed toSidebaronce(boolean) do not exist anymore, useid(string) now.
App changes
- Everything inside the property
definitionis now moved to the root.
Before:
Now:
initPrepare,initPanel,initAppandinitWidgetsmoved to only one functioninit
Return of prepare is now always:
window.libsRegistration not used anymoreblockwill use the argumentstype, textlike theSystem.blockfunction and nothtmlanymore- CSS class derived from name will not be set automatically
closeApprenamed toclosewidgetsById,widgetsAllandwidgetsByNamereplaced withwidgetswhere you can acces only widgets which have anid.- With the new
widgetsContaineryou can access the container of each widget.
Changes to Layout configuration:
widgetandcomponentNameis not used anymore. Set the widget class directly intocomponentType.configis not used anymore. UsecomponentStateinstead
Widget Changes
_storage(Cookie based storage) not supported anymore-
definition.templateFilenameand automatic template loading not supported anymore -
Everything inside the property
definitionis now moved to the root.
Before:
Now:
initrenamed 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
blockwill use the argumentstype, textlike theSystem.blockfunction and nothtmlanymoreshowHintreneamed 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
widgetDefinitionand thewidgetObjectassignment. - Change the
widgetDefaultsassignment into a static property:
- Replace the
initfunction 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
componentwill not moved toapplication. Onlylayoutallowed. - Option
layoutTargetmoved tolayout.element - Option
registerremoved
- Option