UC Adding conference : structure (jsp/controller/modif servlet xml), but no field in form, working
This commit is contained in:
@@ -25,3 +25,6 @@ preference.dislike=Dislike
|
||||
preference.ok=You have successfully chosen all your preferences about each article
|
||||
|
||||
dispatch.title=Dispatch the articles to the members
|
||||
|
||||
# Conference Form
|
||||
conference.linkMenu.title=Adding Conference
|
||||
45
YACOSWeb/WebContent/WEB-INF/jsp/addConference.jsp
Normal file
45
YACOSWeb/WebContent/WEB-INF/jsp/addConference.jsp
Normal file
@@ -0,0 +1,45 @@
|
||||
<%@ include file="/WEB-INF/jsp/include.jsp"%>
|
||||
<%@ page session="false" %>
|
||||
|
||||
<!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>
|
||||
<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">Add new conference</h2>
|
||||
|
||||
<form:form commandName="formConference">
|
||||
|
||||
Formulaire ici
|
||||
|
||||
<input type="submit" value="<fmt:message key="button.OK" />"/> <br/><br/>
|
||||
|
||||
</form:form>
|
||||
|
||||
|
||||
|
||||
<a href="<c:url value="main.htm"/>">Home</a>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer"> </div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -8,6 +8,7 @@
|
||||
<li><a href="<c:url value="submissionArticle.htm"/>"><fmt:message key="submission.title" /></a></li>
|
||||
<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.linkMenu.title" /></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer"> </div>
|
||||
|
||||
@@ -53,6 +53,16 @@
|
||||
<property name="articleManager" ref="articleManager" />
|
||||
</bean>
|
||||
|
||||
<!-- Conference Controller and Resolver -->
|
||||
<bean name="/addConference.htm" class="org.yacos.web.chairman.controller.AddConferenceController">
|
||||
<property name="sessionForm" value="true" />
|
||||
<property name="commandName" value="formConference" />
|
||||
<property name="formView" value="addConference" />
|
||||
<property name="conferenceManager" ref="conferenceManager" />
|
||||
</bean>
|
||||
|
||||
|
||||
<!-- View Resolver -->
|
||||
<bean id="viewResolver"
|
||||
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
||||
<property name="viewClass"
|
||||
@@ -62,7 +72,6 @@
|
||||
<property name="suffix" value=".jsp"></property>
|
||||
</bean>
|
||||
|
||||
|
||||
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
|
||||
<property name="maxUploadSize" value="10000000" />
|
||||
</bean>
|
||||
@@ -73,7 +82,9 @@
|
||||
<property name="basename" value="messages" />
|
||||
</bean>
|
||||
|
||||
<!-- EJB Services Linking -->
|
||||
<jee:jndi-lookup id="articleManager" jndi-name="ArticleManagerBean/remote" cache="true"/>
|
||||
<jee:jndi-lookup id="usersManager" jndi-name="UsersManagerBean/remote" cache="true"/>
|
||||
<jee:jndi-lookup id="conferenceManager" jndi-name="ConferenceManagerBean/remote" cache="true"/>
|
||||
|
||||
</beans>
|
||||
@@ -39,8 +39,8 @@ public class DispatchArticleController extends SimpleFormController{
|
||||
Collection<Article> articles = new ArrayList<Article>();
|
||||
articles.add(a);
|
||||
articles.add(a2);*/
|
||||
User m = new User("max","max","maxime","dagnicourt","ipint","m@truc.fr",new ArrayList<Role>());
|
||||
User m2 = new User("bob","bob","bob","dupont","lifl","b@bb.fr",new ArrayList<Role>());
|
||||
User m = new User("max","max","maxime","dagnicourt","ipint","m@truc.fr");
|
||||
User m2 = new User("bob","bob","bob","dupont","lifl","b@bb.fr");
|
||||
Collection<User> members = new ArrayList<User>();
|
||||
members.add(m);
|
||||
members.add(m2);
|
||||
@@ -56,8 +56,8 @@ public class DispatchArticleController extends SimpleFormController{
|
||||
|
||||
FormDispatcher fd = (FormDispatcher)formDispatcher;
|
||||
Article article = articleManager.getArticle(fd.getIdArticle());
|
||||
User m = new User("bob","bob","maurice","dupont","lifl","b@bb.fr",new ArrayList<Role>());
|
||||
User m2 = new User("max","max","maxime","dagnicourt","ipint","m@truc.fr",new ArrayList<Role>());
|
||||
User m = new User("bob","bob","maurice","dupont","lifl","b@bb.fr");
|
||||
User m2 = new User("max","max","maxime","dagnicourt","ipint","m@truc.fr");
|
||||
//article.assignToPCMember(m);
|
||||
Collection<User> members = new ArrayList<User>();
|
||||
members.add(m);
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
package org.yacos.web.chairman.controller;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.validation.BindException;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import org.springframework.web.servlet.mvc.SimpleFormController;
|
||||
import org.yacos.core.conferences.Conference;
|
||||
import org.yacos.core.conferences.IConferenceManager;
|
||||
|
||||
public class AddConferenceController extends SimpleFormController{
|
||||
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
private IConferenceManager conferenceManager;
|
||||
public IConferenceManager getConferenceManager() {
|
||||
return conferenceManager;
|
||||
}
|
||||
public void setConferenceManager(IConferenceManager conferenceManager) {
|
||||
this.conferenceManager = conferenceManager;
|
||||
}
|
||||
|
||||
protected Object formBackingObject(HttpServletRequest request) throws Exception
|
||||
{
|
||||
Conference conference = null;
|
||||
|
||||
conference = new Conference();
|
||||
|
||||
return conference;
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected ModelAndView onSubmit(HttpServletRequest request,
|
||||
HttpServletResponse response, Object command, BindException errors)
|
||||
throws Exception
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return super.onSubmit(request, response, command, errors);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user