⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 newsactionform.java

📁 功能完善的java开发框架
💻 JAVA
字号:
package news.web;

import com.jdon.model.*;
import org.apache.struts.action.*;
import javax.servlet.http.*;
import java.util.Collection;
import news.model.NewsType;
import java.util.ArrayList;
import news.model.User;

public class NewsActionForm extends ModelForm {
  private String newsId;
  private String subject;
  private String content;


  private Collection opinions = new ArrayList();
  private NewsType newsType = new NewsType();


  private Collection newsTypes = new ArrayList();
  private User user = new User();

  public NewsActionForm(){
    //this is test how NewsActionForm init
    NewsType newsType = new NewsType();
    newsType.setTypeId("1");
    newsType.setTypeName("hello");
    newsTypes.add(newsType);

  }

  public void setNewsId(String newsId) {
    this.newsId = newsId;
  }

  public void setSubject(String subject) {
    this.subject = subject;
  }

  public void setContent(String content) {
    this.content = content;
  }

  public void setOpinions(Collection opinions) {
    this.opinions = opinions;
  }

  public void setNewsType(NewsType newsType) {
    this.newsType = newsType;
  }

  public void setNewsTypes(Collection newsTypes) {
    this.newsTypes = newsTypes;
  }

  public void setUser(User user) {
    this.user = user;
  }

  public String getNewsId() {
    return newsId;
  }

  public String getSubject() {
    return subject;
  }

  public String getContent() {
    return content;
  }

  public Collection getOpinions() {
    return opinions;
  }

  public NewsType getNewsType() {
    return newsType;
  }

  public Collection getNewsTypes() {
    return newsTypes;
  }

  public User getUser() {
    return user;
  }

  public ActionErrors validate(ActionMapping actionMapping, HttpServletRequest httpServletRequest) {
    /**@todo: finish this method, this is just the skeleton.*/
    return null;
  }
  public void reset(ActionMapping actionMapping, HttpServletRequest httpServletRequest) {
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -