Skip to content
Snippets Groups Projects
Commit 767d645b authored by vincent.steinman's avatar vincent.steinman
Browse files

Edit: selected_id + instanceof

parent 05a68119
No related branches found
No related tags found
No related merge requests found
......@@ -251,11 +251,11 @@ public class HelloController {
contactArray.get(selected_id).setEmail(emails);
contactArray.get(selected_id).setSocial(social);
contactArray.get(selected_id).setJob(job);
if(contactArray.get(LstCt.getSelectionModel().getSelectedIndex()) instanceof Family){
if(contactArray.get(selected_id) instanceof Family){
Family fam = (Family)contactArray.get(selected_id);
fam.setRelation(other);
contactArray.set(selected_id, fam);
} else if(contactArray.get(LstCt.getSelectionModel().getSelectedIndex()).getType().equals("Professional")){
} else if(contactArray.get(selected_id) instanceof Professional){
Professional pro = (Professional)contactArray.get(selected_id);
pro.setWork(other);
contactArray.set(selected_id, pro);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment