Issue #2232 - Fix index out of bounds exception in Sub Manager Table
Change-Id: Id61f6c2ddccb965a236bf9a99412e6f6cca8cae0 Former-commit-id:3ab275aea4
[formerly974d5a05b2
[formerly baa8d402efb4aeff839e06fd180a73a857fd0766]] Former-commit-id:974d5a05b2
Former-commit-id:83c79750af
This commit is contained in:
parent
111c060d8d
commit
46a39fd7bb
1 changed files with 11 additions and 8 deletions
|
@ -103,6 +103,7 @@ import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryUtils.TABLE_TYPE;
|
|||
* May 23, 2013 2020 mpduff Call updateControls();
|
||||
* May 28, 2013 1650 djohnson More information when failing to schedule subscriptions.
|
||||
* Jun 14, 2013 2064 mpduff Null check for sorted column.
|
||||
* Jul 29, 2013 2232 mpduff IndexOutOfBoundsException check.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -701,15 +702,17 @@ public class SubscriptionTableComp extends TableComp implements IGroupAction {
|
|||
*/
|
||||
@Override
|
||||
protected void handleTableSelection(SelectionEvent e) {
|
||||
TableItem item = table.getSelection()[0];
|
||||
TableColumn[] columns = table.getColumns();
|
||||
if (table.getSelectionIndex() > -1) {
|
||||
TableItem item = table.getSelection()[0];
|
||||
TableColumn[] columns = table.getColumns();
|
||||
|
||||
for (int i = 0; i < columns.length; i++) {
|
||||
if (columns[i].getText().equals("Active")) {
|
||||
if (item.getText(i).equalsIgnoreCase("T")) {
|
||||
subActionCallback.activateButtonUpdate("Deactivate");
|
||||
} else {
|
||||
subActionCallback.activateButtonUpdate("Activate");
|
||||
for (int i = 0; i < columns.length; i++) {
|
||||
if (columns[i].getText().equals("Active")) {
|
||||
if (item.getText(i).equalsIgnoreCase("T")) {
|
||||
subActionCallback.activateButtonUpdate("Deactivate");
|
||||
} else {
|
||||
subActionCallback.activateButtonUpdate("Activate");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue