RRRRHHHH_Code
Diff Revisions
799949 ...
vs
578bec ...
for ruralHouses client/src/gui/listOfOwnerAddittionRequests.java
|
@@ -106,23 +106,22 @@ |
106 |
106 |
|
|
107 |
107 |
|
try { |
108 |
108 |
|
acm = (AccountInterface) Naming |
109 |
|
- |
.lookup(___IntNames.AdminManager); |
|
109 |
+ |
.lookup(___IntNames.AccountManager); |
110 |
110 |
|
} catch (Exception e1) { |
111 |
111 |
|
System.out.println("Error accessing remote authentication: " |
112 |
112 |
|
+ e1.toString()); |
113 |
113 |
|
} |
114 |
|
- |
Account accou = accounts.get(table.getSelectedRow()); |
|
114 |
+ |
|
115 |
115 |
|
try { |
116 |
|
- |
acm.addAccount(accou); |
117 |
|
- |
am.removeOwnerAdditionRequests(accou); |
|
116 |
+ |
acm.addAccount(table.getSelectedRow()); |
|
117 |
+ |
am.removeOwnerAdditionRequests(table.getSelectedRow()); |
118 |
118 |
|
am.saveInstance(); |
119 |
119 |
|
} catch (RemoteException e1) { |
120 |
120 |
|
// TODO Auto-generated catch block |
121 |
121 |
|
e1.printStackTrace(); |
122 |
122 |
|
} |
123 |
123 |
|
|
124 |
|
- |
((DefaultTableModel)table.getModel()).removeRow(accounts.indexOf(accou)); |
125 |
|
- |
accounts.remove(accou); |
|
124 |
+ |
((DefaultTableModel)table.getModel()).removeRow(table.getSelectedRow()); |
126 |
125 |
|
} |
127 |
126 |
|
} |
128 |
127 |
|
}); |
|
@@ -133,17 +132,16 @@ |
133 |
132 |
|
btnDenyAddition.addActionListener(new ActionListener() { |
134 |
133 |
|
public void actionPerformed(ActionEvent arg0) { |
135 |
134 |
|
if (table.getRowCount()!=0 && table.getSelectedRow() != -1) { |
136 |
|
- |
Account acc = accounts.get(table.getSelectedRow()); |
137 |
135 |
|
try { |
138 |
|
- |
am.removeOwnerAdditionRequests(acc); |
|
136 |
+ |
am.removeOwnerAdditionRequests(table.getSelectedRow()); |
139 |
137 |
|
am.saveInstance(); |
140 |
138 |
|
} catch (RemoteException e) { |
141 |
139 |
|
// TODO Auto-generated catch block |
142 |
140 |
|
e.printStackTrace(); |
143 |
141 |
|
} |
144 |
142 |
|
|
145 |
|
- |
((DefaultTableModel)table.getModel()).removeRow(accounts.indexOf(acc)); |
146 |
|
- |
accounts.remove(acc); |
|
143 |
+ |
((DefaultTableModel)table.getModel()).removeRow(table.getSelectedRow()); |
|
144 |
+ |
accounts.remove(table.getSelectedRow()); |
147 |
145 |
|
} |
148 |
146 |
|
} |
149 |
147 |
|
}); |