corner imagecorner image
IDEPlatformPluginsDocs & SupportCommunityPartners

Working With a RESTful WS Data Source In JavaFX Composer, part 1: Overview

Written by Maros Sandor, adapted and maintained by Jeffrey Rubinoff

A JavaFX application can get and display data from a RESTful Web Service or other remote data source. To simplify access to data coming from various sources in various formats, JavaFX Composer unifies the data format on the client side so that it is easier for you to use a remote data source.

There are two basic aspects of each data source:

  • The actual source of the data (HTTP server, database, file, etc.)
  • The format of the data (XML, JSON, etc.).

The JavaFX Composer data source framework defines a specialized DataSource class for each source of data (HttpDataSource, FileDataSource, etc.) and defines a set of parsers for each supported data format (Parsers.XML_PARSER, etc.)

In this tutorial, you define a RESTful data provider and bind data it produces to your JavaFX UI components.

Lessons In This Tutorial

Content on this page applies to NetBeans IDE 6.9

This tutorial is divided into four parts:

  1. This overview.
  2. Creating a Simple List of Data — Create a very simple application that displays one column of data from a RESTful data source. Data are converted to Strings in the List View binding.
  3. Using a Cell Factory and Desktop Form — Redo the binding and add a cell factory, so the data are converted to Strings at the list cell level. Add a Desktop Form template and bind it to the List View, to display additional data when a user selects a cell.
  4. Adding More Components — Adding Next and Previous buttons to scroll through the data, along with a progress indicator.

Please read JavaFX Composer Wiki: Guide to Data Sources before taking this tutorial. This tutorial includes an example of data binding, so you should also take Data Binding With JavaFX Composer.

A complete sample of the application you develop in this tutorial is available from our Samples Catalog.

To follow this tutorial, you need the following software and resources.

Software or Resource Version Required
NetBeans IDE JavaFX download option
Java Development Kit (JDK) JDK 6 Update 13 or later

Next step:

Creating a Simple List of Data

To send comments and suggestions, get support, and keep informed on the latest developments on the NetBeans IDE JavaFX development features, join the mailing list.


See Also

For more information about using NetBeans IDE to develop JavaFX applications, see the following resources: