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

📄 newsform.java

📁 这个例子举例说明了一个简单的新闻 Portal。新闻内容是从数据源(这里称为 DataSource )传送到 JSP 页
💻 JAVA
字号:
/**
 * Action form for News.
 * An ActionFormBean is the definition of a form bean
 * that is loaded from a <form-bean> element in the
 * Struts configuration file
 *
 */

/**
 * Change History:
 * Author		Date		Version   Details
 * Jerome Josephraj  28 October 2002   1.00.01  Created
 */

package com.ddj.wsstruts.actionform;

//Java imports
import java.util.Vector;

public final class NewsForm extends org.apache.struts.action.ActionForm {
    
    
    //Log4J
    // define a static category variable so that it references the
    // category instance of the same name as this class.
    static final org.apache.log4j.Category category = org.apache.log4j.Category.getInstance(NewsForm.class.getName());
    
    /*
     * The News collection which will be used by the search page to display the list of news
     */
    private Vector newsList = null;
    
    /*
     * The News Content field
     */
    private String newsContent = null;
    
    /*
     * The News Content Field
     */
    private Vector newsDetails = null;
    
    /*
     *The action field
     */
    private String hdnProcessAction = null;
    
    /*
     *Vector containing the stock values
     */
    private Vector stockValuesList = null;
    
    
    // --- Properties ---
    /*
     * getter for field fldNewsDetails
     */
    public Vector getNewsDetails() {
        return this.newsDetails;
    }
    
    /*
     * setter for field fldNewsDetails
     */
    public void setNewsDetails(Vector newsDetails) {
        this.newsDetails = newsDetails;
    }
    
    /*
     *Getter for Hidden action field
     */
    public String getHdnProcessAction() {
        return this.hdnProcessAction;
    }
    
    /*
     *Setter for hidden action field
     */
    public void setHdnProcessAction(String hdnProcessAction) {
        this.hdnProcessAction = hdnProcessAction;
    }
    
    /*
     * getter for stockValuesList
     */
    public Vector getStockValuesList() {
        return this.stockValuesList;
    }
    
    /*
     *Setter for stockValuesList
     */
    public void setStockValuesList(Vector stockValuesList) {
        this.stockValuesList = (Vector) stockValuesList;
    }
}

⌨️ 快捷键说明

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