From deab4f9271521ce2332c4686cb20368b4e2d05f9 Mon Sep 17 00:00:00 2001 From: mpeters <mpeters@dsv.su.se> Date: Thu, 28 Jul 2011 16:36:50 +0200 Subject: [PATCH] Fix of broken ui-logic, was impossible to create new final seminar (unless there was one already) Change-Id: Ia190765d0df29c0e730653e724b80e6018522b89 --- .../panels/ProjectFinalSeminarContainerPanel.java | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/main/java/se/su/dsv/scipro/opponent/panels/ProjectFinalSeminarContainerPanel.java b/src/main/java/se/su/dsv/scipro/opponent/panels/ProjectFinalSeminarContainerPanel.java index 8a7fa59e52..adcd3edf62 100644 --- a/src/main/java/se/su/dsv/scipro/opponent/panels/ProjectFinalSeminarContainerPanel.java +++ b/src/main/java/se/su/dsv/scipro/opponent/panels/ProjectFinalSeminarContainerPanel.java @@ -23,22 +23,15 @@ public class ProjectFinalSeminarContainerPanel extends Panel { public ProjectFinalSeminarContainerPanel(final String id, final Project project, final boolean isSupervisorView){ super(id); - final List<FinalSeminar> seminars = finalSeminarDao.findFinalSeminarsByProject(project); + List<FinalSeminar> seminars = finalSeminarDao.findFinalSeminarsByProject(project); - if(isSupervisorView && !seminars.isEmpty() ){ + if(isSupervisorView && seminars.isEmpty() ){ add(new OpponentPanel("addSeminar", project)); } else { add(new EmptyPanel("addSeminar")); } - add(new Label("noSeminarsMessage", "No final seminar has been created for this project"){ - private static final long serialVersionUID = 1L; - - @Override - public boolean isVisible(){ - return seminars.size() == 0; - } - }); + add(new Label("noSeminarsMessage", "No final seminar has been created for this project").setVisible(seminars.isEmpty())); add(new ListView<FinalSeminar>("seminarList", seminars){ private static final long serialVersionUID = 1L;