How to get a TableModel?

I’m testing the JTable bean and to set the model I need a TableModel.
The dataset function “getAsTableModel()” seems to be deprecated so is there another way to get it?

Thanks in advance.

Build the tableview as a form with the solutionModel?
A solutionModel form can have a datasource attached, which can be created from a dataset.

I think this is a much nicer option as it is native Servoy and behaves like all your other forms.

Yes… but the problem is that I want to select some colums of some records, not all the record. Because of this I try the JTable.

victor.rojo:
Yes… but the problem is that I want to select some colums of some records, not all the record. Because of this I try the JTable.

Still no problem, there’s more options:

  1. build a custom query which returns a dataset directly with the things you want.
  2. start of with an empty dataset an add rows with the information you want to be in there…

Then $dataset.createDataSource(etc.etc.etc.)
This datasource can be connected to a ‘normal’ form.

I want to emulate this
[attachment=0]Example.PNG[/attachment]
but in table view all the row is selected.