Questions tagged [selectionmodel]

Abstract class used by UI controls to provide a consistent API for maintaining selection. Used in Java(FX), GWT and other libraries / languages, too.

A SelectionModel is Model used to provide an API for maintaining data and/or visual item selection. The term SelectionModel was primarily established in the Java environment and now is used as a generally admitted term for abstract kinds of models used for data / item selection.

Resources

Java

JavaScript

80 questions
25
votes
8 answers

Combobox clearing value issue

I've stumbled on an issue with Comboboxes in javafx2.2. This is the scenario: Users click on the 'editFile' button. Another pane becomes visible (with the setVisible method). This pane contains 6 comboboxes. Three of them have fixed items:…
Perneel
  • 3,317
  • 7
  • 45
  • 66
10
votes
3 answers

How do I get a selection model to work with a proxy model?

I have a model and two views set up like this: Model ---> OSortFilterProxyModel ---> OListView Model ------------------------------> OTableView When the user selects something in one of the views, I want the other view to mirror that selection. So…
Marius
  • 57,995
  • 32
  • 132
  • 151
7
votes
2 answers

JTable.clearSelection() vs Jtable.getSelectionModel.clearSelection() - When to use what?

I need to cancel all selections within a JTable model object. Java provides this function "clearSelection()" which does, what I need, as far as I understand. But I am confused why this function can be called on a JTable object as well as on a…
Simeon
  • 748
  • 1
  • 9
  • 26
6
votes
3 answers

Is it possible to set the CompareWith function of Angular SelectionModel object in TypeScript

I have a component that renders mat-table in it's template. I want to pre-select some of the rows. The SelectionModel I have contains objects representing each selected item (not simple strings or numbers) and the method for comparing these is more…
6
votes
3 answers

ExtJs - Checkbox selection model, disable checkbox per row

I have a grid with a checkbox selection model. Ext.define('Mb.view.ship.OrdersGrid', { extend: 'Ext.grid.Panel', selType: 'checkboxmodel', selModel: { injectCheckbox: 0, pruneRemoved: false }, ... There are some…
Lorenz Meyer
  • 19,166
  • 22
  • 75
  • 121
6
votes
1 answer

GWT 2.5 DataGrid SelectionModel with Subrows

When using TableBuilder to create rows and sub rows, selection model isn't working as expected. When clicking on a subrow's checkbox the row isn't been selected, however, the parent row become selected instead. I tried to overload onBrowserEvent of…
YardenST
  • 5,119
  • 2
  • 33
  • 54
4
votes
1 answer

previous data not getting selected after search in selectionmodel angular

I am working on angular selectionmodel where I have a search bar where user searches for list and selects items and if user closes the search keyword then previous selected values i.e., before search not getting selected in the selectionmodel…
Prasad Patel
  • 707
  • 3
  • 16
  • 53
4
votes
3 answers

How to select multiple rows in QTableView using selectionModel

With: tableView = QTableView() rows = [0, 1, 2] tableView.selectRow(0) or tableView.selectRow(2) won't work in this situation since selectRow() selects only single row deselecting all others. There is selectionModel().select() method available. But…
alphanumeric
  • 17,967
  • 64
  • 244
  • 392
4
votes
1 answer

Proper way of Implementing JavaFX' SelectionModel to a View that doesn't have it

I'm attempting to implement a MultipleSelectionModel for ControlsFX' GridView. Researching the internet, Jonathan Giles mentioned that it was a bad idea to add listeners to every GridCell. This left me wondering how to notify the selection model of…
Adam Law
  • 542
  • 1
  • 7
  • 21
3
votes
3 answers

Select element in CellList using SelectionModel or ListDataProvider

I have used CellList for listing my data using ListDataProvider for managing the data and SelectionModel for selecting an element from CellList and generating events accordingly. Now when i update or delete element using…
vbjain
  • 547
  • 2
  • 7
  • 23
3
votes
1 answer

Set SelectionModel for TableView in FXML

I want to set the SelectionModel of the TableView from the FXML, but I can not find how to do this. I already tried the following: 1.Just set it as a property of the TableView: 2.Set the property the same as…
bashoogzaad
  • 4,611
  • 8
  • 40
  • 65
3
votes
1 answer

Selection mode in JTable?

I couldn't understand the difference between multiple_selection_interval and single_interval_selection in JTable. table.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION); next,…
Venkat
  • 20,802
  • 26
  • 75
  • 84
3
votes
2 answers

Ext js grid remove selection model

I have a situation where I need to dynamically add or remove grids selection model. Searching the documentation I see that the selection model doesn't have a destroy() method or anything similar. How can I remove or destroy a selection model from a…
Jacob
  • 3,580
  • 22
  • 82
  • 146
3
votes
2 answers

GWT CellTable Custom Selection Model

I need a 'custom selection model' for GWT CellTable. One of the columns in CellTable is a Checkbox column. Basic rquirements (both work in solution below): - Row click (not on checkbox), selects that row and un-selects all other rows. - Checkbox…
3
votes
1 answer

Cause TableView to not respond to mouse clicks in JavaFX 2.0

I want a JavaFX 2.0 TableView, but I don't want it to respond to mouse clicks. Of course, I can disable the control/widget but then it appears disabled. tableview.setSelectionModel(null) gives the behavior I'd like, but the UI dumps stack traces…
Scott Serr
  • 263
  • 2
  • 6
1
2 3 4 5 6