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.