DWR
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 Criterions.java. Reason: HashSet is a raw type. References to generic type HashSet<E> should be parameterized, line 11 - failed on resource AddConferenceController.java. Reason: HashSet is a raw type. References to generic type HashSet<E> should be parameterized, line 45 - failed on resource AddConferenceController.java. Reason: Map is a raw type. References to generic type Map<K,V> should be parameterized, line 103 - failed on resource Criterions.java. Reason: Set is a raw type. References to generic type Set<E> should be parameterized, line 11 ... and more. Override reason: DWR
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="./stylesheets/calendar.css" type="text/css" />
|
||||
<script src="./stylesheets/calendar.js"></script>
|
||||
<script src="./javascripts/calendar.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
@@ -1,7 +1,87 @@
|
||||
<%@ include file="/WEB-INF/decorators/include.jsp"%>
|
||||
|
||||
<html>
|
||||
<head></head>
|
||||
<head>
|
||||
|
||||
<script type='text/javascript' src='./dwr/engine.js'></script>
|
||||
<script type='text/javascript' src='./dwr/util.js'></script>
|
||||
<script type='text/javascript' src='./dwr/interface/AddCriteriaJS.js'></script>
|
||||
<script type='text/javascript' src='./javascripts/prototype.js'></script>
|
||||
|
||||
<script type='text/javascript'>
|
||||
|
||||
function addCriteria() {
|
||||
var criteria = new Array();
|
||||
var myString = "" + $F("monForm.labelCriteria") + " - Notation : Between " + $F("monForm.minCriteria") + " and " + $F("monForm.maxCriteria");
|
||||
criteria.push(myString);
|
||||
dwr.util.addOptions("listCriteria", criteria);
|
||||
$("divCriteria").style.display = "";
|
||||
}
|
||||
|
||||
function init() {
|
||||
fillTable();
|
||||
}
|
||||
|
||||
var peopleCache = { };
|
||||
var viewed = -1;
|
||||
|
||||
function fillTable() {
|
||||
AddCriteriaJS.getAllCriteria(function(criteria) {
|
||||
// Delete all the rows except for the "pattern" row
|
||||
dwr.util.removeAllRows("criteriabody", { filter:function(tr) {
|
||||
return (tr.id != "pattern");
|
||||
}});
|
||||
// Create a new set cloned from the pattern row
|
||||
var person, id;
|
||||
criteria.sort(function(p1, p2) { return p1.label.localeCompare(p2.label); });
|
||||
for (var i = 0; i < criteria.length; i++) {
|
||||
person = criteria[i];
|
||||
id = person.id;
|
||||
dwr.util.cloneNode("pattern", { idSuffix:id });
|
||||
dwr.util.setValue("tableCriterion" + id, person.label);
|
||||
dwr.util.setValue("tableCriterionMin" + id, person.min);
|
||||
dwr.util.setValue("tableCriterionMax" + id, person.max);
|
||||
$("pattern" + id).style.display = "table-row";
|
||||
peopleCache[id] = person;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function editClicked(eleid) {
|
||||
// we were an id of the form "edit{id}", eg "edit42". We lookup the "42"
|
||||
var person = peopleCache[eleid.substring(4)];
|
||||
dwr.util.setValues(person);
|
||||
}
|
||||
|
||||
function deleteClicked(eleid) {
|
||||
// we were an id of the form "delete{id}", eg "delete42". We lookup the "42"
|
||||
var person = peopleCache[eleid.substring(6)];
|
||||
if (confirm("Are you sure you want to delete " + person.label + "?")) {
|
||||
dwr.engine.beginBatch();
|
||||
AddCriteriaJS.deleteCriterion({ id:id });
|
||||
fillTable();
|
||||
dwr.engine.endBatch();
|
||||
}
|
||||
}
|
||||
|
||||
function writePerson() {
|
||||
var person = { id:viewed, label:null, min:null, max:null };
|
||||
dwr.util.getValues(person);
|
||||
|
||||
dwr.engine.beginBatch();
|
||||
AddCriteriaJS.setCriterion(person);
|
||||
fillTable();
|
||||
dwr.engine.endBatch();
|
||||
}
|
||||
|
||||
function clearPerson() {
|
||||
viewed = -1;
|
||||
dwr.util.setValues({ id:-1, label:null, min:null, max:null });
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
@@ -10,18 +90,71 @@
|
||||
<form:form commandName="formConference" name="monForm">
|
||||
|
||||
<fieldset><legend>Criteria</legend> Label : <input
|
||||
type="text"> Notation : Between <input type="text">
|
||||
and <input type="text"></fieldset>
|
||||
id="monForm.labelCriteria" name="labelCriteria" type="text"> <br />
|
||||
<br />
|
||||
Notation : Between <input id="monForm.minCriteria" name="minCriteria"
|
||||
type="text"> and <input id="monForm.maxCriteria"
|
||||
name="maxCriteria" type="text"></fieldset>
|
||||
<br />
|
||||
<input type="button" value="Add criteria" onclick="addCriteria()">
|
||||
|
||||
<input type="button" value="Add criteria">
|
||||
<!--<div id="divCriteria" style="display:none;">
|
||||
<ul id="listCriteria">
|
||||
|
||||
</ul>
|
||||
</div>-->
|
||||
|
||||
<br /><br />
|
||||
<h3>Edit Person</h3>
|
||||
<table class="plain">
|
||||
<tr>
|
||||
<td>Label:</td>
|
||||
<td><input id="label" type="text" size="30" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Min:</td>
|
||||
<td><input id="min" type="text" size="20" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Max:</td>
|
||||
<td><input id="max" type="text" size="40" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right"><small>(ID=<span id="id">-1</span>)</small>
|
||||
<input type="button" value="Save" onclick="writePerson()" /> <input
|
||||
type="button" value="Clear" onclick="clearPerson()" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table border="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Criterion</th>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="criteriabody">
|
||||
<tr id="pattern" style="display: none;">
|
||||
<td><span id="tableCriterion">Criterion</span></td>
|
||||
<td><span id="tableCriterionMin">Min</span></td>
|
||||
<td><span id="tableCriterionMax">Max</span></td>
|
||||
<td><input id="edit" type="button" value="Edit"
|
||||
onclick="editClicked(this.id)" /> <input id="delete" type="button"
|
||||
value="Delete" onclick="deleteClicked(this.id)" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<input type="submit" align="middle" name="_target2" value="Back">
|
||||
<input type="submit" align="middle" name="_target4" value="Next" />
|
||||
|
||||
|
||||
</form:form> <br />
|
||||
|
||||
</form:form>
|
||||
<br />
|
||||
<a href="<c:url value="main.htm"/>">Home</a>
|
||||
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user