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
This tutorial is divided into four parts:
This overview.
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.
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.
Adding More Components — Adding Next and Previous buttons to scroll through the data, along with a progress indicator.
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.