Widgets and CSSs good practices

Valid from Datafari 5.2

Please check the DatafariUI documentation:


Valid up to Datafari 5.1 included

Deprecated for Datafari EE users !!!

We have a new scheme for widgets and CSS good practices, starting from v4.3 . Please check CSS Customization - Enterprise Edition

Datafari allows you to create your own widgets an CSSs and add them to enrich and customize the UI. The cost of such power is of course the possibility to break everything in the UI. So by reading carefully and following the few steps presented here, you will ensure an easy development, more compliant code for next Datafari updates, and fast rollback in case of problems:

  • Modify an existing AjaxFranceLabs widget for enhancement or bugfix - On one hand, if you find an improvement or a bug fix on an existing widget, our recommandation is for you to apply your modifications directly on it and create a ticket on our Jira. On another hand, If you want to change the main behavior or main features of an existing widget, we recommand that you make your own and replace the original widget by yours in the searchView.jsp and search.js

  • Modify an existing CSS for enhancement or bugfix - Same thing as the widgets: On one hand, if you find an improvement or a bug fix on an existing CSS, you can apply your modifications directly on it and create a ticket on our Jira. On another hand, if you need to change an existing CSS of Datafari, we recommand that you make your own copy and include it in the proper file. A custom css already exists for the searchView.jsp, it is available in {Datafari_Home}/tomcat/webapps/Datafari/css/custom/customSearchView.css

  • Create your own CSS per widget - To make things clean and avoid mess, it is strongly recommended to have at least one separate CSS file per widget you made. Furthermore, there is a dedicated location for widget CSSs which is {Datafari_Home}/tomcat/webapps/Datafari/css/widgets

  • Make one file per widget - If you develop multiple widgets, be sure to have each of them in a separate file. It is easier to maintain and to deactivate in case of problems.

You can find extra information in the documentation section User Interface Configuration and Customization