diff --git a/YACOSWeb/WebContent/WEB-INF/jsp/addConference4.jsp b/YACOSWeb/WebContent/WEB-INF/jsp/addConference4.jsp
index f7e79b8..75e4c1a 100644
--- a/YACOSWeb/WebContent/WEB-INF/jsp/addConference4.jsp
+++ b/YACOSWeb/WebContent/WEB-INF/jsp/addConference4.jsp
@@ -43,8 +43,7 @@ function fillTable() {
}
function editClicked(eleid) {
- // we were an id of the form "edit{id}", eg "edit42". We lookup the "42"
- alert(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);
}
@@ -75,6 +74,15 @@ function clearPerson() {
dwr.util.setValues({ id:-1, label:null, min:null, max:null });
}
+function submitIfNotEnter(theForm){
+ if(theForm.elements["submit"] || theForm.elements["submit"]){
+ return true;
+ } else {
+ writePerson();
+ return false;
+ }
+}
+
@@ -83,9 +91,9 @@ function clearPerson() {
-
+
- Criteria
+ Criteria
Label:
@@ -101,8 +109,8 @@ function clearPerson() {
(ID=-1 )
- " >Save
- " >Clear
+ Save
+ Clear
@@ -123,9 +131,9 @@ function clearPerson() {
Criterion
Min
Max
-
-
-
+
+ Edit
+ Delete
@@ -133,11 +141,17 @@ function clearPerson() {
-
-
+
+
+
+
+
+
">Home
diff --git a/YACOSWeb/WebContent/WEB-INF/jsp/addConference5.jsp b/YACOSWeb/WebContent/WEB-INF/jsp/addConference5.jsp
index 9203d0b..dbe08ba 100644
--- a/YACOSWeb/WebContent/WEB-INF/jsp/addConference5.jsp
+++ b/YACOSWeb/WebContent/WEB-INF/jsp/addConference5.jsp
@@ -1,7 +1,114 @@
<%@ include file="/WEB-INF/decorators/include.jsp"%>
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -9,13 +116,47 @@
- Page 5
+
+
+
+
+
+
+
+ Person
+
+ Delete
+
+
+
+
+
+
-
+
+
+
+
+
">Home
diff --git a/YACOSWeb/src/org/yacos/web/chairman/controller/AddConferenceController.java b/YACOSWeb/src/org/yacos/web/chairman/controller/AddConferenceController.java
index 91e3887..86279a7 100644
--- a/YACOSWeb/src/org/yacos/web/chairman/controller/AddConferenceController.java
+++ b/YACOSWeb/src/org/yacos/web/chairman/controller/AddConferenceController.java
@@ -1,6 +1,10 @@
package org.yacos.web.chairman.controller;
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.servlet.http.HttpServletRequest;
@@ -13,6 +17,8 @@ import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.ModelAndViewDefiningException;
import org.springframework.web.servlet.mvc.AbstractWizardFormController;
import org.yacos.core.conferences.IConferenceManager;
+import org.yacos.core.users.IUserManager;
+import org.yacos.core.users.User;
import org.yacos.web.chairman.form.FormConference;
@@ -22,7 +28,15 @@ public class AddConferenceController extends AbstractWizardFormController {
protected final Log logger = LogFactory.getLog(getClass());
private IConferenceManager conferenceManager;
+
+ private IUserManager usersManager;
+ public IUserManager getUsersManager() {
+ return usersManager;
+ }
+ public void setUsersManager(IUserManager usersManager) {
+ this.usersManager = usersManager;
+ }
public IConferenceManager getConferenceManager() {
return conferenceManager;
}
@@ -31,6 +45,58 @@ public class AddConferenceController extends AbstractWizardFormController {
}
+
+
+ // ###########################################################
+
+ private static int nextPerson = 1;
+
+ private List listPersonBean;
+ private List listPersonAdded;
+
+ public void initPerson() {
+ listPersonBean = new ArrayList();
+ listPersonAdded = new ArrayList();
+ List listUsers = usersManager.getUsers();
+ for (Iterator i = listUsers.iterator(); i.hasNext();) {
+ User user = (User) i.next();
+
+ PersonBean pb = new PersonBean();
+ pb.setId(getNextPerson());
+ pb.setName(user.getFirstName());
+ // TODO : voir login FIX (because, we need the login to tie the user with the conf)
+ listPersonBean.add(pb);
+ }
+ }
+
+ public void setPerson(PersonBean b) {
+ if (b.getId() == -1) {
+ b.setId(getNextPerson());
+ }
+
+ listPersonAdded.remove(b);
+ listPersonAdded.add(b);
+ }
+
+ public void deletePerson(PersonBean b) {
+ listPersonAdded.remove(b);
+ }
+
+ private static synchronized int getNextPerson()
+ {
+ return nextPerson++;
+ }
+
+ public List getUsers() {
+ return listPersonBean;
+ }
+
+ public List getUsersAdded() {
+ return listPersonAdded;
+ }
+
+
+
// ###########################################################
diff --git a/YACOSWeb/src/org/yacos/web/chairman/controller/PersonBean.java b/YACOSWeb/src/org/yacos/web/chairman/controller/PersonBean.java
new file mode 100644
index 0000000..81f4fd7
--- /dev/null
+++ b/YACOSWeb/src/org/yacos/web/chairman/controller/PersonBean.java
@@ -0,0 +1,26 @@
+package org.yacos.web.chairman.controller;
+
+public class PersonBean {
+
+ private int id;
+ private String name;
+
+ public PersonBean() {}
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+}