pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gk_br...@verizon.net>
Subject Re: Adding domain object data to tableview
Date Wed, 16 Nov 2011 13:38:41 GMT
You can just use instances of your bean as your table rows. Just name the columns according
to your bean property names.

FYI, this is not considered "data binding". TableView is considered a "data-driven" component.

On Nov 16, 2011, at 8:32 AM, jensebhasen <Jens.Hansen@motorolasolutions.com> wrote:

> Hi,
> 
> I've been looking at the data binding example, tried searching this
> mailinglist, and looked in the java API, but it all left me a bit confused
> with regards to how I can easily map data from my domain objects (plain
> beans) to columns in a tableview.
> 
> I managed to create BeanAdapter for one of my domain objects:
> 
>        Device device = new Device();
>        device.setDeviceName("device1");
>        BeanAdapter beanAdapter = new BeanAdapter(device);
> 
> And that works as expected. The TableView class do have a
> setTableDataBindMapping() method, but I simply cannot get my head around how
> I easily map the data and the table together.
> 
> The basic scenario is that I get a list of devices, and each device should
> populate a row in the TableView. The number of columns might be <= the
> number of properties available in the domain object; in other words the end
> user might choose to only view a subset of the properties available, but I
> think that is a minor issue, which I can figure out myself later.
> 
> -----
> Regards
> Jens
> --
> View this message in context: http://apache-pivot-users.399431.n3.nabble.com/Adding-domain-object-data-to-tableview-tp3512621p3512621.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Mime
View raw message