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

📄 countryandcityorderaction.java

📁 eclipse java/jsp 航空管理系统
💻 JAVA
字号:
package kangyi.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import kangyi.form.CountryManagerForm;
import kangyi.model.CountryManager;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import zhangchunliang.model.AppMode;

/**
 * <p>Description  :  按照指定的方法排序显示信息 </p>
 * <p>Project      :  ciqms
 * <p>Company      :  东软股份国际合作事业部</p>
 * <p>Create Date  :  2005.4.17</P>
 * @author         :  康毅 | kangyi@neusoft.com
 * @version        :  0.2
 * @see            :  kangyi.form.CountryManagerForm
 * @see            :  kangyi.model.CountryManager
 * 
 */

public class CountryAndCityOrderAction extends Action {
	public ActionForward execute(ActionMapping map, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		
		if(!AppMode.getAppMode()){
			System.out.println("Application is terminated...");
			return map.findForward("appInfo");
		}

		/*获得表单里的排序方法是按照国家排序还是按照城市排序*/
		String selectmethod = request.getParameter("selectmethod");
		/*把获得的值SET到自定义的 FORM 中去*/
		((CountryManagerForm) form).setSelectmethod(selectmethod);
		/*事例化表单 为传递参数做准备*/
		CountryManagerForm countrymanagerform = ((CountryManagerForm) form);
		/*事例化功能类*/
		StringBuffer countryandcityselect = new CountryManager()
				.countryAndCitySelect(countrymanagerform);
		/*把生成的动态列表Set到request中去,通过JSP页面GET出来*/
		request.setAttribute("countryandcityselect", countryandcityselect);
		return map.findForward("success");
	}
}

⌨️ 快捷键说明

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