modif d'evaluation
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 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:
@@ -13,6 +13,7 @@
|
||||
<li><a href="<c:url value="choosePreference.htm"/>"><fmt:message key="preference.title" /></a></li>
|
||||
<li><a href="<c:url value="dispatchArticle.htm"/>"><fmt:message key="dispatch.title" /></a></li>
|
||||
<li><a href="<c:url value="addConference.htm"/>"><fmt:message key="conference.titleMenu" /></a></li>
|
||||
<li><a href="<c:url value="evaluation.htm"/>"><fmt:message key="evaluation.title" /></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,24 +1,14 @@
|
||||
<%@ include file="/WEB-INF/jsp/include.jsp"%>
|
||||
<%@ include file="/WEB-INF/decorators/include.jsp"%>
|
||||
|
||||
|
||||
<!--
|
||||
<%@ page session="false" %> spring -> true par defaut
|
||||
-->
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title><fmt:message key="title"/></title>
|
||||
<link rel="stylesheet" href="./stylesheets/base.css" type="text/css" />
|
||||
</head>
|
||||
<head></head>
|
||||
<body>
|
||||
|
||||
<jsp:include page="/WEB-INF/jsp/header.jsp" />
|
||||
<div class="mainBloc">
|
||||
<div class="header"> </div>
|
||||
<div class="content">
|
||||
|
||||
<jsp:include page="/WEB-INF/jsp/menu.jsp" />
|
||||
<div id="main_content">
|
||||
|
||||
<h2 align="center"><fmt:message key="evaluation.title"/></h2>
|
||||
|
||||
@@ -27,17 +17,16 @@
|
||||
<form:form method="post" commandName="evaluationForm">
|
||||
|
||||
<table>
|
||||
<c:forEach items="${simpleRatings}" var="criterion" varStatus="j">
|
||||
<c:forEach items="${evaluationForm.simpleRatings}" var="criterion" varStatus="j">
|
||||
|
||||
<tr>
|
||||
<td>${criterion.name}</td>
|
||||
|
||||
<c:forEach varStatus="i" begin="${criterion.min_rating}" end="${criterion.max_rating}">
|
||||
|
||||
<td>${i}</td>
|
||||
|
||||
<td><form:radiobutton path="simpleRatings[${j.index}].value" value="${i}" /></td>
|
||||
<td>
|
||||
<c:forEach var="i" begin="${criterion.min_rating}" end="${criterion.max_rating}" step="1">
|
||||
<c:out value="${i}"/>
|
||||
<form:radiobutton path="simpleRatings[${j.index}].value" value="${i}" />
|
||||
</c:forEach>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
|
||||
@@ -61,10 +50,8 @@
|
||||
<a href="<c:url value="main.htm"/>">Home</a>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer"> </div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -42,22 +42,16 @@ public class EvaluationController extends SimpleFormController {
|
||||
conferenceManager.addConference("myTitre", "myDescirption", "myInfoComplementray", new Date(1/1/2008), new Date(1/1/2008), new Date(1/1/2008), new Date(1/1/2008), new Date(1/1/2008));
|
||||
Conference conf=conferenceManager.getConference(1);
|
||||
ArrayList<Criterion> criterionList = new ArrayList<Criterion>();
|
||||
Criterion c1=new Criterion();
|
||||
c1.setName("respect du theme");
|
||||
c1.setConference(conf);
|
||||
c1.setMax(new Integer(5));
|
||||
c1.setMin(new Integer(1));
|
||||
Criterion c1=new Criterion("respect du theme",new Integer(1),new Integer(5),conf );
|
||||
|
||||
|
||||
Criterion c2=new Criterion("coherence",new Integer(1),new Integer(3),conf );
|
||||
|
||||
Criterion c2=new Criterion();
|
||||
c2.setName("exactitude");
|
||||
c2.setConference(conf);
|
||||
c2.setMax(new Integer(4));
|
||||
c2.setMin(new Integer(1));
|
||||
|
||||
criterionList.add(c1);
|
||||
criterionList.add(c2);
|
||||
|
||||
FormEvaluation evaluationForm=new FormEvaluation();
|
||||
FormEvaluation fe=new FormEvaluation();
|
||||
|
||||
List<SimpleCriterion> liste=new ArrayList<SimpleCriterion>();
|
||||
for (Criterion c : criterionList)
|
||||
@@ -69,11 +63,11 @@ public class EvaluationController extends SimpleFormController {
|
||||
liste.add(sc);
|
||||
|
||||
}
|
||||
|
||||
evaluationForm.setSimpleRatings(liste);
|
||||
evaluationForm.setCommentAuthor("no comment by author");
|
||||
evaluationForm.setCommentPCMember("no comment by pc member");
|
||||
return evaluationForm;
|
||||
if (liste!=null){System.out.println("liste n'est pas null");}
|
||||
fe.setSimpleRatings(liste);
|
||||
fe.setCommentAuthor("no comment by author");
|
||||
fe.setCommentPCMember("no comment by pc member");
|
||||
return fe;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user