Migration from WebRatio 6.0 to WebRatio 6.1

From WebRatio WebML Wiki

Jump to: navigation, search


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 localizeFields method must be modified removing the parameter named formConfiguration.
  • The implementation of two new methods must be provided: getValidationSupport and getFields

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:editor tag must be replaced with the combination of a html:textarea and a script block 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 baseHref property, 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 FCKeditorAPI must be rewritten using the new CKEDITOR API. See the official API documentation for details.


Related articles:
Category Difficulty Refers
Migration from WebRatio 5.X to WebRatio 6.0 Migration Intermediate Migration
Migration from WebRatio 6.0 to WebRatio 6.1 Migration Intermediate Migration












Did you find this article useful? Please rate it!

Rating: 0.0/5 (0 votes cast)

Personal tools