The easiest way to get an ObservableList<Record> is this:
ObservableList<Record> obsResult =
javafx.collections.FXCollections.observableArrayList(
create.select().from(CUSTOMER).fetch()
);
The javafx.collections.FXCollections utility contains other useful methods
to manage and construct ObservableList and ObservableSet types.
Hope this helps,
Lukas
2015-04-26 10:06 GMT+02:00 <[email protected]>:
> Hello, I'm new to Jooq and I'm running some tests with Java/JavaFx.
>
> The problem I'm having now is that I want to put results of a query into
> an ObservableList, so that I can assign it to a ListView.
> I tried the following:
>
> Result<Record> result = create.select().from(CUSTOMER).fetch();
> ObservableList<Record> obsResult = (ObservableList<Record>)
> result;
>
> but (as I was quite expecting) I get an error.
> Is there any other way to do this or should I adopt a completely different
> strategy?
>
> Thank you.
>
> --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups "jOOQ
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.