package faqapp.struts.forms;

import java.io.Serializable;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionMapping;

import faqapp.AreaTO;

/**
 * Struts TopicForm bean. This form has the following fields:
 * <ul>
 * <li><b>id</b> - Auto-generated Topic ID
 * <li><b>action</b> - Form action
 * <li><b>topicDesc</b> - Entered Topic description
 * <li><b>areaID</b> - Selected associated areaID
 * <li><b>areas</b> - Array of all Areas stored by TopicAction
 * </ul>
 */
public final class TopicForm extends FAQAbstractForm implements Serializable {
    private String topicDesc;
    private int areaID;
    private AreaTO[] areas;

    public String getTopicDesc() {
	    return topicDesc;
    }

    public void setTopicDesc(String topicDesc) {
        this.topicDesc = topicDesc;
    }

    public int getAreaID() {
        return areaID;
    }

    public void setAreaID(int areaID) {
        this.areaID = areaID;
    }

    public AreaTO[] getAreas() {
        return areas;
    }

    public void setAreas(AreaTO[] areas) {
        this.areas = areas;
    }

    public void reset(ActionMapping mapping, HttpServletRequest request) {
        super.reset();
        topicDesc = null;
        areaID = 0;
        areas = null;
    }
}

