USEPA / emf

Emissions Modeling Framework (EMF)
6 stars 3 forks source link

confirmation message is wrong when removing dataset keywords #63

Closed cseppan closed 2 years ago

cseppan commented 2 years ago

Note: this problem only has to do with the confirmation message. The underlying delete of selected items is correct.

Steps to reproduce:

Edit Properties of a dataset Switch to Keywords tab Select multiple keywords to remove Click Remove Confirmation message asks "Are you sure you want to remove the 1 selected items?" instead of the correct number of selected items

Screen Shot 2021-08-05 at 7 08 59 PM

The generic widget EditableTablePanel checks for the number of selected rows, but that's actually the selected rows in the JTable, i.e. how many rows are highlighted not EMF's definition of "selected".

https://github.com/USEPA-OAQPS/emf/blob/2e8c6ef08a1cdf25dd823e6160e695d028af316d/EMF/src/client/gov/epa/emissions/framework/ui/EditableTablePanel.java#L108-L123

Similarly, if you highlight a row but don't click the Select checkbox, then click Remove, the confirmation message pops up. In this case, even if you click Yes, no items are actually deleted.

Screen Shot 2021-08-05 at 7 08 32 PM