Modification AJAX ...
Policy failures: Code warning - failed on resource AddConferenceController.java. Reason: HashSet is a raw type. References to generic type HashSet<E> should be parameterized, line 110 - failed on resource AddConferenceController.java. Reason: Iterator is a raw type. References to generic type Iterator<E> should be parameterized, line 59 - failed on resource AddConferenceController.java. Reason: Map is a raw type. References to generic type Map<K,V> should be parameterized, line 168 - failed on resource AddConferenceController.java. Reason: Set is a raw type. References to generic type Set<E> should be parameterized, line 110 - failed on resource AddConferenceController.java. Reason: Set is a raw type. References to generic type Set<E> should be parameterized, line 112 ... and more. Override reason: go
This commit is contained in:
@@ -18,7 +18,7 @@ function init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var peopleCache = { };
|
var peopleCache = { };
|
||||||
var peopleCache2 = { };
|
//var peopleCache2 = { };
|
||||||
var viewed = -1;
|
var viewed = -1;
|
||||||
|
|
||||||
function fillTable() {
|
function fillTable() {
|
||||||
@@ -58,60 +58,36 @@ function fillTable2() {
|
|||||||
dwr.util.cloneNode("patternadded", { idSuffix:id });
|
dwr.util.cloneNode("patternadded", { idSuffix:id });
|
||||||
dwr.util.setValue("tablePersonadded" + id, person.name);
|
dwr.util.setValue("tablePersonadded" + id, person.name);
|
||||||
$("patternadded" + id).style.display = "";
|
$("patternadded" + id).style.display = "";
|
||||||
peopleCache2[id] = person;
|
//peopleCache2[id] = person;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function addPerson(eleid) {
|
function addPerson(eleid) {
|
||||||
var person = peopleCache[eleid.substring(6)];
|
var person = peopleCache[eleid.substring(6)];
|
||||||
/*dwr.util.cloneNode("patternadded", { idSuffix:person.id });
|
|
||||||
dwr.util.setValue("tablePersonadded" + person.id, person.name);
|
|
||||||
$("patternadded" + person.id).style.display = "";
|
|
||||||
peopleCache[person.id] = person;*/
|
|
||||||
|
|
||||||
dwr.engine.beginBatch();
|
dwr.engine.beginBatch();
|
||||||
AddCriteriaJS.setPerson(person);
|
AddCriteriaJS.setPerson(person);
|
||||||
|
fillTable();
|
||||||
fillTable2();
|
fillTable2();
|
||||||
dwr.engine.endBatch();
|
dwr.engine.endBatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
function deletePerson(eleid) {
|
function deletePerson(eleid) {
|
||||||
// we were an id of the form "delete{id}", eg "delete42". We lookup the "42"
|
var person = peopleCache[eleid.substring(11)];
|
||||||
var person = peopleCache2[eleid.substring(11)];
|
|
||||||
if (confirm("Are you sure you want to delete " + person.name + "?")) {
|
if (confirm("Are you sure you want to delete " + person.name + "?")) {
|
||||||
dwr.engine.beginBatch();
|
dwr.engine.beginBatch();
|
||||||
AddCriteriaJS.deletePerson(person);
|
AddCriteriaJS.deletePerson(person);
|
||||||
|
fillTable();
|
||||||
fillTable2();
|
fillTable2();
|
||||||
dwr.engine.endBatch();
|
dwr.engine.endBatch();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function writePerson() {
|
|
||||||
var person = { id:viewed, label:null, min:null, max:null };
|
|
||||||
dwr.util.getValues(person);
|
|
||||||
|
|
||||||
dwr.engine.beginBatch();
|
|
||||||
AddCriteriaJS.setPerson(person);
|
|
||||||
fillTable();
|
|
||||||
dwr.engine.endBatch();
|
|
||||||
}
|
|
||||||
|
|
||||||
function clearPerson() {
|
|
||||||
viewed = -1;
|
|
||||||
dwr.util.setValues({ id:-1, label:null, min:null, max:null });
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
||||||
<h2 align="center"><fmt:message key="conference.titleMenu" /></h2>
|
<h2 align="center"><fmt:message key="conference.titleMenu" /></h2>
|
||||||
|
|
||||||
<form:form commandName="formConference" name="monForm">
|
<form:form commandName="formConference" name="monForm">
|
||||||
|
|||||||
@@ -72,12 +72,16 @@ public class AddConferenceController extends AbstractWizardFormController {
|
|||||||
b.setId(getNextPerson());
|
b.setId(getNextPerson());
|
||||||
}
|
}
|
||||||
|
|
||||||
listPersonAdded.remove(b);
|
//listPersonAdded.remove(b);
|
||||||
listPersonAdded.add(b);
|
listPersonAdded.add(b);
|
||||||
|
listPersonBean.remove(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deletePerson(PersonBean b) {
|
public void deletePerson(PersonBean b) {
|
||||||
listPersonAdded.remove(b);
|
listPersonAdded.remove(b);
|
||||||
|
listPersonBean.add(b);
|
||||||
|
|
||||||
|
// FIXME b different du b d'avant (dans le set...)
|
||||||
}
|
}
|
||||||
|
|
||||||
private static synchronized int getNextPerson()
|
private static synchronized int getNextPerson()
|
||||||
|
|||||||
Reference in New Issue
Block a user