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<E> 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<Rating>, line 8
Override reason:
This commit is contained in:
Jialin Wang
2008-01-21 23:45:22 +00:00
parent 8f7e045d2c
commit 0f6cb26ad1
5 changed files with 25 additions and 9 deletions

View File

@@ -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

View File

@@ -21,6 +21,7 @@
<tr>
<td>${criterion.name}</td>
<form:hidden path="simpleRatings[${j.index}].name"></form:hidden>
<td>
<c:forEach var="i" begin="${criterion.min_rating}" end="${criterion.max_rating}" step="1">
<c:out value="${i}"/>

View File

@@ -106,6 +106,11 @@
<property name="articleManager" ref="articleManager" />
<property name="usersManager" ref="usersManager" />
<property name="conferenceManager" ref="conferenceManager"/>
</bean>
<bean name="/createReport.htm" class="org.yacos.web.PCmember.controller.CreateReportController">
<property name="articleManager" ref="articleManager" />
</bean>
<!-- List all conference -->

View File

@@ -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() {

View File

@@ -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<String, String> model = new HashMap<String, String>();
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<String, Report> model1 = new HashMap<String, Report>();
model1.put("report", rpt);
return new ModelAndView(new RedirectView("createReport.htm"),model1);
request.getSession().setAttribute("report", rpt);
//Map<String, Report> model1 = new HashMap<String, Report>();
//model1.put("report", rpt);
//return new ModelAndView(new RedirectView("createReport.htm"),model1);
return new ModelAndView(new RedirectView("createReport.htm"));
}
public IArticleManager getArticleManager() {