Migration to version 3.0

Libraries

Change js-optimizer from 2.0 to 2.1.

Migration to version 3.3

Ria Config

From this version each web application must have a ria-config.xml with the following line :
<property key="sweetdev-ria.resources.server.url" value="/your_application_context"/>
For example if you are deploying the application demo.war on a basic tomcat you should put the value "/demo"

Using Maven

If you were using Maven before this version, the repository on which SweetDEV RIA is hosted has been changed. It is now : http://ns353115.ovh.net:8081/archiva/repository/public

Migration to version 3.0

Control

For everyone who used a preview of the control version, in the 2.2 during the development of the 3.0 version, here are the changes to execute :
  • The constants in the class ActionTag have been moved into ActionInterface.
  • The constants in the class ControlTag and TestTag have been moved into ControlInterface.
  • The DataAction class has been split into 3 classes, easing the server side development : AbstractLoadDataAction, AbstractTestAction and AbstractSetValueAction.
  • The DataAction class has been refractored to ControlAction.
  • The AbstractLoadDataAction now returns a list of explicit beans, represented by the class ControlOptionBean.
  • The mandatoryControl component now take a list of controls and allow the execution of the form submission depending of its configuration.

Internationalization

The i18n package has been moved to com.ideo.sweetdevria.i18n (ex com.ideo.sweetdevria.tag.i18n).

Menu

The menu package has been refractored from com.ideo.sweetdevria.tag.html.menu to com.ideo.sweetdevria.taglib.menu .

Export Excel

Since the implementation of the data provider on the grid, the export excel has been upgraded.
It is now composed of a set of 3 tags :
  • gridinnerexport : Insterted into a grid tag, it renders the export on right click.
  • gridexport : Insterted anywhere in the page, it enable the export of the data gathered from a grid component.
  • singleexport : Inserted anywhere in the page, it provides the export for any data provider.
Moreover, these 3 exports can now target an other export in the page to allow multiple export buttons with a same target, avoiding code duplication.

JSO

The Servlet but be loaded on application startup. <!-- JSO servlet --> <servlet> <servlet-name>jso</servlet-name> <servlet-class>com.ideo.jso.servlet.JsoServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet>

Configuration

The configuration strategy has been modified and centralized into a single file, ria-config.xml.
Please have a look to the related section .

TreeView to Tree

The old TreeView component is now marked as deprecated and we advocate to use the Tree component instead.
This component has been fully integrated into SweetDEV RIA (that was not the case for the old one), and possess a lot of new features, like the node type modification at runtime.
As you will be able to see in the show case, the nodes are now related to a specific type to define its properties and its render, loading your data from a database...
The migration can be performed by :
  • Changing your Node class to NodeModel class
  • Defining your NodeTypeBean classes, containing the nodes configuration (drag and drop, styles...)
  • Changing the JSP declaration from ria:treeview to ria:tree.

Migration to version 2.2

DataGrid

The datagrid (ria:table ) was one of the most used component in SweetDEV RIA version < 2.2, because of the number of feature it proposed.
Despite of its good render, it became really hard to maintain over time, and its complexity made it hard to set up for a significant number of developers.

The decision to replace it with a new one without more delay has been taken and a new one is now living !
This new datagrid can be render through 3 sets of tags (no more tag ria:table exist to avoid confusion):
  • A simple set of tag, easy to set up, the one we recommend you to use :
    <ria:simplegrid ...>
    	(<ria:row .../>)
    	<ria:simplegridcolumn ...></ria:simplegridcolumn>
    	<ria:simplegridcolumn ...></ria:simplegridcolumn>
    	(<ria:griddetail ...></ria:detail>)
    </ria:simplegrid>
    					

    Easy right ? Composed of maximum 4 tags, each tag having its own responsability (explained at the end of this section) on the grid render.
  • A bean tag, that get rendered from a bean in session. Obviously, this bean has to be a GridModel, but you can fill it server side if you want to and display it into a grid :
    <ria:gridbean bean="${}".../>
    					

    Just one tag, but some Java code is necessary to fill the bean.
  • An historical hierarchy set of tag, for people who were used to this display :
    <ria:grid ...>
    	<ria:theader ...>
    		<ria:hcolumn .../>
    		<ria:hcolumn .../>
    		<ria:hcolumn .../>						
    	</ria:theader>
    	<ria:tbodyIterator ...>
    		(<ria:row .../>)
    		(<ria:griddetail .../>)
    		<ria:column ...> </ria:column>
    		<ria:column ...> </ria:column>
    		<ria:column ...> </ria:column>
    	</ria:tbodyIterator>
    </ria:grid>
    					

    Quite ugly compared to the previous ones but really similar to the old datagrid ones ! For developers who want to fast migrate their old components to the new one, this tag might be the more suitable.
Here are now the changes to operate to migrate your old datagrid to the third set described previously :
  • The attributes ajaxAnywhere, externalForm, postBackUrl... have been removed. The new grid client is now directly link to a model server that perform every action requested.
  • The tag ria:row is more lax and can be set anywhere in the tbodyIterator.
  • The itemsOnPage attribute has been refractored to rowPerPage.
  • The dataProvider attribute no longer exist.
  • The paginationControlMode attribute no longer exist (we are studying a better way to implement it).
  • A lot of attributes have been refractored to provide a more intuitive signification.
If some attributes are missing and make your application unable to run, let us know what can be done to fix this. By the way, in case of you were using the datagrid the most common way (with a collection attribute), the time to migrate a datagrid should last 5 minutes JSP side and 10 server side if you were processing some server actions on the old "model".

SweetDEV RIA and JavaScript instances

Two other features improving the library client side :
  • All the JavaScript classes have been prefixed avoiding conflicts with any other library (if an other library use the prefix SweetDevRia let us know !)
  • No more JavaScript instance are create for components, but are directly recorded in the SweetDevRia client repository (You can now set your window id 'window' :)).

This implies two incompatibilities :
  • If you were using some SweetDEV RIA JavaScript classes or method, you now have to prefix it by SweetDevRia (DomHelper became SweetDevRia.DomHelper for example).
  • If you were targeting some JavaScript instances directly (often used to open/close window...), forget about it and wrap your id by SweetDevRia.$('${id}').

A really fast and easy migration avoiding a lot of problems.

SweetDEV RIA Customization

Out sweetdev-ria.css and sweetdev-ria-custom.css. The components customization has been fully remade and is now "almost" perfect.
Check the Customization section to learn more about this new styling method and the way to migrate easily.