This is the second post in a series of posts that offer a preview of the new feature in the upcoming UltraLightClient ’08 release. The first post was about forms. This post describes how to bind a collection of business objects to a table widget.

In 99% of the time, the data displayed in a table widget represents a collection of business objects, where each table row selects one business object out of the collection, and each table column represents one property of the selected business object. Until now, you are forced to implement a table model to define the data displayed in a table widget. And as these table models all represent a collection of business objects, you have to write the same boilerplate code over and over again. Moreover, some visual aspects of the table cannot be defined by the table model, e.g. the preferred column size.

But this will change with UltraLightClient ’08! In UltraLightClient ’08 this important use case will become an ultra easy implementation task. Instead of implementing a table model, you just bind business object properties to table columns. No need to implement table models anymore!

Java

1

2

3

4

5

6

7

8

9

10

11

12

13

TableBinding tableBinding=TableBinding

.createTableBindingFromBeanList(persons,table,Person.class,false);

tableBinding.addColumnBinding("firstName")

.setColumnHeaderValue("First Name")

.setColumnPreferredWidth(150);

tableBinding.addColumnBinding("lastName")

.setColumnHeaderValue("Last Name")

.setColumnPreferredWidth(150);

tableBinding.addColumnBinding("vip")

.setColumnHeaderValue("VIP")

.setColumnPreferredWidth(50)

.setColumnType(Boolean.class);

The previous code snippet binds three properties of the person business object to table columns. With UltraLightClient ’08 it is ultra easy to define the visual representation of the table columns. Just set corresponding properties on the column binding! In the previous snippet all three column bindings define the header value and the preferred width of the columns. In addition, the third binding defines the column type. This changes the look of the cells in the third table column to check boxes, as shown in the following screen shot:

In the screenshot you can see a sort indicator placed in the header of third column. Until now, implementing a sortable table required a decorating table model, an action listener on the table header, and a sorting algorithm. With UltraLightClient ’08 the decorating table model has vanished as well, and implementing a sortable table is just a one liner!

Java

1

table.setRowSorter(newTableRowSorter(table.getModel()));

Summary: With the new table binding offered in UltraLightClient ‘08, implementing tables is an ultra easy task. No need to write stupid boilerplate code again and again. You can concentrate on the essential parts. Plus UltraLightClient ‘08 enables sortable tables with just one line of code.

We plan to publish an UltraLightClient ‘08 milestone release in early April. Stay tuned!

Share and Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.

Since the 2007 JavaOne℠ conference, the JavaFX™ Script technology-based application MusicPinboard has been justifiably cited by many (including Sun) as a significant demonstration of the power of JavaFX Script technology as well as a radical improvement over Java™ technology in terms of developer productivity.

One year on, in this session, one of the original team of first-time JavaFX Script technology users that knocked out the sexy-looking MusicPinboard application in just 20 developer-days shares his thoughts about what kind of audience JavaFX Script technology is likely appeal to, today and in the future. In addition, he offers objective comparisons with some rising competitors in what he calls the RIA/mobile space:

Groovy, which has in recent months encroached on the JavaFX Script technology space by including a data binding mechanism as part of its Swing GUI Builder

Google’s prototype Android platform, which the global giant hopes to position as the platform of choice for providers of high-end mobile device and business applications alike

The speaker argues that each of the solutions described embodies a different vision of how the mobile experience will evolve in the near future and that the time frame may be shorter than we think when it comes to seeing which technology gains the upper hand.

Canoo is exhibiting at booth #429.

Share and Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.

In the second Canoo RIA newsletter, we added a new category featuring cool sample applications. Here’s what we had to say about Adobe’s online word processor, Buzzword:

Buzzword (http://www.buzzword.com/) an online word processor is an example of a successful Rich Internet Application.
The application is based on Adobe’s Flash, Flex, and AIR technologies. Users access the software by means of a hyperlink and can open, write, and edit documents just like in MS Word. A local installation of the Buzzword software is not required. Like Google Docs, the documents are accessible online.

Another cool Adobe Flex / AIR application that I’ve seen running on the screens of our developers’ laptops is Parleys.com. Christian wrote about this application in his JavaPolis blog post. Parleys is an online application to view the JavaPolis video and slides (there is a Canoo talk as well, but the sound is very low and hardly audible 🙁 ). After installing Adobe AIR, the videos can be downloaded and viewed offline. A cool feature if you’re travelling with lots of time to spare.

For further details on how to login into the browser version or how to install the standalone version, see this page.