From 0f6cb26ad1e4abc9ce504e87465d123a50021847 Mon Sep 17 00:00:00 2001 From: Jialin Wang Date: Mon, 21 Jan 2008 23:45:22 +0000 Subject: [PATCH] modif d'evaluation ,ca marche mnt Policy failures: Code warning - failed on resource EvaluationController.java. Reason: ArrayList is a raw type. References to generic type ArrayList should be parameterized, line 83 - failed on resource CreateReportController.java. Reason: The import java.util.List is never used, line 4 - failed on resource CreateReportController.java. Reason: The import org.yacos.core.article.Article is never used, line 14 - failed on resource CreateReportController.java. Reason: The import org.yacos.core.conferences.Conference is never used, line 16 - failed on resource EvaluationController.java. Reason: Type safety: The expression of type ArrayList needs unchecked conversion to conform to ArrayList, line 8 Override reason: --- .../WEB-INF/classes/messages.properties | 3 +++ .../WebContent/WEB-INF/jsp/evaluation.jsp | 1 + YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml | 5 +++++ .../controller/CreateReportController.java | 4 ++-- .../controller/EvaluationController.java | 21 ++++++++++++------- 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/YACOSWeb/WebContent/WEB-INF/classes/messages.properties b/YACOSWeb/WebContent/WEB-INF/classes/messages.properties index 987a813..8b1bea0 100644 --- a/YACOSWeb/WebContent/WEB-INF/classes/messages.properties +++ b/YACOSWeb/WebContent/WEB-INF/classes/messages.properties @@ -61,3 +61,6 @@ conference2.evaluation=Evaluation's deadline evaluation.title=Evaluation of an article evaluation.commentPCMember=Comment of PC Member evaluation.commentAuthor=Comment of author +evaluation.headPage=Here is a report of the evaluation +evaluation.titleArticle=The title of article is +evaluation.note=The note for the criterion diff --git a/YACOSWeb/WebContent/WEB-INF/jsp/evaluation.jsp b/YACOSWeb/WebContent/WEB-INF/jsp/evaluation.jsp index 9cbfd68..cff7bd0 100644 --- a/YACOSWeb/WebContent/WEB-INF/jsp/evaluation.jsp +++ b/YACOSWeb/WebContent/WEB-INF/jsp/evaluation.jsp @@ -21,6 +21,7 @@ ${criterion.name} + diff --git a/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml b/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml index 6b8701f..b03ef23 100644 --- a/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml +++ b/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml @@ -106,6 +106,11 @@ + + + + + diff --git a/YACOSWeb/src/org/yacos/web/PCmember/controller/CreateReportController.java b/YACOSWeb/src/org/yacos/web/PCmember/controller/CreateReportController.java index 13529d3..bda5174 100644 --- a/YACOSWeb/src/org/yacos/web/PCmember/controller/CreateReportController.java +++ b/YACOSWeb/src/org/yacos/web/PCmember/controller/CreateReportController.java @@ -25,8 +25,8 @@ public class CreateReportController extends SimpleFormController { throws ServletException, IOException { - - return new ModelAndView("creatReport"); + logger.info("j'arrive a creer le report"); + return new ModelAndView("createReport"); } public IArticleManager getArticleManager() { diff --git a/YACOSWeb/src/org/yacos/web/PCmember/controller/EvaluationController.java b/YACOSWeb/src/org/yacos/web/PCmember/controller/EvaluationController.java index 28a21d5..149eaef 100644 --- a/YACOSWeb/src/org/yacos/web/PCmember/controller/EvaluationController.java +++ b/YACOSWeb/src/org/yacos/web/PCmember/controller/EvaluationController.java @@ -85,15 +85,20 @@ public class EvaluationController extends SimpleFormController { for(SimpleCriterion sc : liste){ Rating rt=new Rating(); + Criterion cn=new Criterion(); + cn.setName(sc.getName()); + rt.setCriterion(cn); rt.setValue(sc.getValue()); listeRating.add(rt); } - Map model = new HashMap(); - model.put("message", "preference.ok"); - Article article=articleManager.getArticle(1); + + // Article article=articleManager.getArticle(new Integer(1)); + Article article = new Article(); + article.setTitle("myTitle"); + System.out.println("le title est: "+article.getTitle()); User toto = userManager.getUser("toto"); if(toto == null){ toto = userManager.addUser("toto", "toto", "Toto", "Toto", "Toto corp.", "toto@totocorp.com"); @@ -105,10 +110,12 @@ public class EvaluationController extends SimpleFormController { rpt.setRatings(listeRating); rpt.setReferee(toto); - Map model1 = new HashMap(); - model1.put("report", rpt); - return new ModelAndView(new RedirectView("createReport.htm"),model1); - + + request.getSession().setAttribute("report", rpt); + //Map model1 = new HashMap(); + //model1.put("report", rpt); + //return new ModelAndView(new RedirectView("createReport.htm"),model1); + return new ModelAndView(new RedirectView("createReport.htm")); } public IArticleManager getArticleManager() {