Migration from WebRatio 6.0 to WebRatio 6.1
From WebRatio WebML Wiki
|
Introduction
Please follow this guide in order to migrate correctly all your projects from WebRatio 6.0 to WebRatio 6.1.
Validation Rules
Form-based custom units willing to support the new validation framework must adapt their Java unit service:
- The
localizeFieldsmethod must be modified removing the parameter namedformConfiguration. - The implementation of two new methods must be provided:
getValidationSupportandgetFields
Refer to the source code of predefined units (Entry Unit, Multi Entry, Power Index, Multi Choice) for details on how to implement such methods.
Field templates willing to print an asterisk character near mandatory fields must modify the condition check in case they're are using the new validation rules. The code testing if a mandatory validation rule exists must be modified from
if (field.selectSingleNode("ValidationRule[@predicate='notNull']") != null) {
...
}
to
if (isMandatoryField(field)) {
...
}
CKEditor
The old FCKEditor 2.6.4 used for rendering HTML text fields has been replaced with the new CKEditor 3.5.2. The new editor brings added performance, greater accessibility, new features and an improved look & feel.
To convert a custom style which used the old editor, the following steps have to be taken.
-
In custom field templates that directly used FCKeditor, the entire
FCK:editortag must be replaced with the combination of ahtml:textareaand ascriptblock sharing the same field property name.<html:textarea property="fieldProperty"/> <script type="text/javascript"> if (CKEDITOR.instances['fieldProperty']) { CKEDITOR.remove(CKEDITOR.instances['fieldProperty']); } CKEDITOR.replace('fieldProperty', { // additional configuration baseHref : '<%= wrBaseURI %>' }); </script> -
Besides the mandatory
baseHrefproperty, more configuration properties may be specified. - Any customization to the FCKEditor/fckconfig.js configuration file must be ported to the equivalent CKEditor/config.js file. See the " mapping between old and new properties.
-
Custom JavaScript code using
FCKeditorAPImust be rewritten using the newCKEDITORAPI. See the official API documentation for details.
Related articles:
|
