OpenXava 4.2.2 released

OpenXava 5.8 released

October 17, 2017

OpenXava 5.8 allows to import data from Excel or CSV, in list mode it's possible to group by any property to get summation by group, the user can change the name of the colums in list and collections, the programmer has more flexibility defining controllers and filling combos, we have also improved the user experience and the look & feel, and many more things.

Import data

A new button in list mode called "Import data" allows you to choose a file from your computer: The file can be CSV, XLSX (Excel 2007/2010/2013) or XLS (Excel 97/2000/XP/2003). After select the file press in the "Configure import" button to show the next dialog: Here you can match columns in the Excel file to columns in your application, it tries to do an initial match for you. Now just click on "Import" to load the data into your application.

Grouping in list

On top right corner of list mode you can find a combo with all possible grouping options: Note that you can group by any property or reference in the list. Moreover for the case of dates you can group by the month or the year of the date. For example, if you choose to group by month of date you get: Here you have the total amount by month for the invoices. OpenXava shows by default all the numeric properties susceptible to be summed. You can order, filter and generate PDF for this list.

Renaming columns by user

In customization mode the user can change the labels for the columns in list or collections. Now in each column there is a new icon for that:

The change is stored by user.

Look & feel

Messages has a new appearance:

Moreover, they are in a fixed position in the screen even if you scroll, and can be closed by the user. We have also improved the tooltips: The tooltips are shown when the field get the focus and persist until the focus is lost, so you can use tooltips as alternative to a user manual. When the tooltip matches the label is not shown. We made some other look & feel improvements:

New look of buttons bar for modules and collections.

Delete icon in top bar is red on hover.

Font size for list and editors changed.

First steps screenshots upgraded.

Controllers improvements

In controllers inheritance you can exclude actions from parent controller with new excluded-actions attribute. For example:

In this case Family controller has all the action of Typical except refresh and delete. Before we needed to do a copy and paste for cases like this. Moreover, we have a new attribute available-on-new for action to exclude actions when creating a new element. Note the action delete in the next controller:

In this case new and save are shown always, but delete (because of available-on-new=false) is shown only when there is an element selected and not when a new element is being created. The default value for available-on-new is true. This allows improving the user experience with no programming.

Combos with arbitrary content

For a combo with a static list of elements you can use a property of type enum. For a combo that get data from database you can use a reference with @DescriptionsList. If you need something else since v5.8 you have some methods in org.openxava.view.View class that allows you to create a drop-down list using your own logic for any property. For example, for a simple property like this:

This creates a combo for color property with two values "wht" with label "White" and "blk" with label "Black". In addition to addValidValue(), you have removeValidValue() and getValidValues() available.

Also we have improved the flexibilitiy of @DescriptionsList, so if you have a reference like this:

@DescriptionsList
@ManyToOne
private State state;

You can add (or change) a condition programmatically in this way:

getView().setDescriptionsListCondition("state", "name like '%CA%'");

That is, no more custom editors just to get a simple combo.

User experience

We have done some usability tests and these are the consequences:

If a module has no rows it starts in detail mode executing New action.

Lists remember the last filtering and ordering by user between sessions.

Generate PDF works even if the browser does not allow popups, this applies to most IForwadAction too.

Action for deleting rows in list mode now is on top bar and it has icon.

'Sign in' link not shown when the user is in 'Sign in' page.

When Discussion editor has the focus the "Add comment" button is shown and the "Save" button for module is hidden.

Renamed button of Discussion editor from "Post" to "Add comment", moreover it is hidden on start.

Delete action in detail mode is not present if there is not an entity selected.

Search action in detail mode is no longer included by default.

Clicking in detail mode when the list has no rows executes New action.

Other improvements

We have done a lot of improvements in other areas:

Workspace included in distribution upgraded to Eclipse Oxygen, though it still works in all Eclipse 4.x.

Placeholders for fields using [placeholder] suffix in i18n label files.

New properties resetAfterOnCreate/resetAfterOnModify in SaveAction to define the behavior after saving separately for create and modify.

Module description in menu of modules is omitted if matches with module name.

Number of modules shown in the menu in the first load is 20, before it was 15.

Reduced the amount of serialization errors on stopping the application server.

New property showModulesMenuWhenNotLogged in xava.properties to hide Start button to guest users.

ModuleTestBase removes user preferences before executing each test.

Attribute label-style in property-view and descriptions-list of XML components.

Some new common use labels to be used in applications.

Property messagesOnTop removed from xava.properties, now you can use CSS to place the messages.

New showDefaultActionInBottom property in xava.properties to show/hide the default action on bottom.

New methods showButtons() and hideButtons() in ModuleManager to show/hide the button bars from UI.

Material Design Icons upgraded to 1.9.32.

Added poi-ooxml.jar library to manage Excel 2007/2010/2013 files.

New controllers TypicalWithSearch and SearchForCRUD to use the classic search action.

New method getQualifiedActionIfAvailable() in BaseAction.

New method put() in Labels to add new labels in runtime.

New method unquote() in Strings utility class.

New CancelToDefaultControllersAction that closes the dialog and set the default module controllers.

New methods selectGroupBy() and assertAllGroupBys() in ModuleTestBase for grouping in list mode.

New method assertValuesInList(int row, String ... values) in ModuleTestBase to test all row values in a shot.

New method updateModelFromView() in View to update the model set with setModel() from the view data.

Value of attribute 'label' in <property/> of XML components has preference over i18n files.