|
@@ -84,7 +84,6 @@ public class UpdateController {
|
|
|
public void refreshTableHolonElement(PropertyTable multiTable, PropertyTable singleTable) {
|
|
|
// Update of the Information about the HolonElements - only for
|
|
|
// HolonObjects
|
|
|
-
|
|
|
if (model.getSelectedCpsObjects().size() > 1) {
|
|
|
deleteRows(multiTable);
|
|
|
fillElementTable(model.getSelectedCpsObjects(), multiTable);
|
|
@@ -159,7 +158,9 @@ public class UpdateController {
|
|
|
if (obj == null) {
|
|
|
String tempStringObj = tables.get(1).getValueAt(yTemp, 0).toString();
|
|
|
int idTempObj = Integer.parseInt(tempStringObj.split(", ")[1]);
|
|
|
- obtTemp = (HolonObject) controller.searchByID(idTempObj);
|
|
|
+ if (model.getSelectedCpsObjects() != null) {
|
|
|
+ obtTemp = (HolonObject) getHolonObjSelected(idTempObj);
|
|
|
+ }
|
|
|
id = Integer.parseInt(tables.get(1).getValueAt(yTemp, 1).toString());
|
|
|
ArrayList<HolonElement> eleTemp = new ArrayList<HolonElement>();
|
|
|
if (model.getEleToDelete().containsKey(idTempObj) && toMultiHash == 2) {
|
|
@@ -322,4 +323,14 @@ public class UpdateController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public AbstractCpsObject getHolonObjSelected(int id) {
|
|
|
+ AbstractCpsObject obj = null;
|
|
|
+ for (AbstractCpsObject o : model.getSelectedCpsObjects()) {
|
|
|
+ if (o.getID() == id) {
|
|
|
+ obj = o;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return obj;
|
|
|
+ }
|
|
|
+
|
|
|
}
|