mnt listeArticle et ChoosePreference
Policy failures: Code warning - failed on resource SArticleController.java. Reason: The local variable user is never read, line 41 - failed on resource SArticleController.java. Reason: The method toURL() from the type File is deprecated, line 6 Override reason:
This commit is contained in:
@@ -108,6 +108,7 @@
|
||||
<property name="formView" value="submissionArticle" />
|
||||
<property name="successView" value="listArticle.htm" />
|
||||
<property name="articleManager" ref="articleManager" />
|
||||
<property name="sessionService" ref="sessionService"/>
|
||||
</bean>
|
||||
|
||||
<bean id="ChoosePreferenceController"
|
||||
|
||||
@@ -45,7 +45,7 @@ public class SArticleController extends SimpleFormController {
|
||||
String mainauthor = ((FormSubmission) command).getMainauthor();
|
||||
//String secondaryauthor = ((FormSubmission) command).getSecondaryauthor();
|
||||
List<String> liste = ((FormSubmission) command).getListe();
|
||||
|
||||
|
||||
String nomFile="";
|
||||
|
||||
try {
|
||||
@@ -74,7 +74,7 @@ public class SArticleController extends SimpleFormController {
|
||||
System.out.println(e);
|
||||
}
|
||||
|
||||
articleManager.addArticle(title, theme, nomFile, user.getLogin(), liste, Article.State.SUMMARY, conf.getId());
|
||||
articleManager.addArticle(title, theme, nomFile, mainauthor, liste, Article.State.SUMMARY, conf.getId());
|
||||
|
||||
return new ModelAndView(new RedirectView(getSuccessView()));
|
||||
}
|
||||
@@ -95,4 +95,12 @@ public class SArticleController extends SimpleFormController {
|
||||
public void setArticleManager(IArticleManager articleManager) {
|
||||
this.articleManager = articleManager;
|
||||
}
|
||||
|
||||
public SessionService getSessionService() {
|
||||
return sessionService;
|
||||
}
|
||||
|
||||
public void setSessionService(SessionService sessionService) {
|
||||
this.sessionService = sessionService;
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ public class FormSubmission {
|
||||
private String theme;
|
||||
private String mainauthor;
|
||||
private String secondaryauthor;
|
||||
private ArrayList<String> liste;
|
||||
private ArrayList<String> liste = new ArrayList<String>();
|
||||
private String abstractText;
|
||||
|
||||
public FormSubmission() {
|
||||
@@ -57,7 +57,14 @@ public class FormSubmission {
|
||||
}
|
||||
|
||||
public void setListe(ArrayList<String> liste) {
|
||||
this.liste = liste;
|
||||
if(liste!=null)
|
||||
{
|
||||
this.liste=new ArrayList<String>(liste);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.liste = new ArrayList<String>();
|
||||
}
|
||||
}
|
||||
|
||||
public String getAbstractText() {
|
||||
|
||||
Reference in New Issue
Block a user