zoukankan      html  css  js  c++  java
  • zTree实现地市县三级级联Action类

    zTree实现地市县三级级联Action类


    ProvinceAction.java:

    /**
     * @Title:ProvinceAction.java
     * @Package:com.gwtjs.struts.action.area
     * @Description:
     * @author:Youhaidong(游海东)
     * @date:2014-5-11 上午12:27:54
     * @version V1.0
     */
    package com.gwtjs.struts.action.area;
    
    import java.util.List;
    
    import javax.annotation.Resource;
    import javax.xml.ws.Action;
    
    import org.apache.struts2.convention.annotation.Namespace;
    import org.apache.struts2.convention.annotation.ParentPackage;
    import org.apache.struts2.convention.annotation.Result;
    import org.springframework.context.annotation.Scope;
    import org.springframework.stereotype.Component;
    import org.springframework.stereotype.Controller;
    
    import com.gwtjs.model.Province;
    import com.gwtjs.service.ProvinceService;
    import com.gwtjs.struts.BaseAction;
    
    /**
     * 类功能说明
     * 类改动者 改动日期
     * 改动说明
     * <p>Title:ProvinceAction.java</p>
     * <p>Description:游海东个人开发</p>
     * <p>Copyright:Copyright(c)2013</p>
     * @author:游海东
     * @date:2014-5-11 上午12:27:54
     * @version V1.0
     */
    @Controller(value="provinceAction")
    @Scope("prototype")
    @ParentPackage("json-default")
    @Namespace(value = "/action/area")
    public class ProvinceAction extends BaseAction 
    {
    	/**
    	 * @Fields  serialVersionUID:序列化
    	 */
    	private static final long serialVersionUID = -2800613278354456551L;
    	
    	/**
    	 * 省份编码
    	 */
    	private String provinceCode;
    	
    	/**
    	 * 地市编码
    	 */
    	private String cityCode;
    	
    	/**
    	 * 县级编码
    	 */
    	private String countyCode;
    	
    	/**
    	 * list
    	 */
    	private List<Province> list;
    	
    	/**
    	 * provinceService
    	 */
    	@Resource(name = "provinceService")
    	private ProvinceService provinceService;
    
    	/* (non-Javadoc)
    	 * <p>Title:execute</p>
    	 * <p>Description:</p>
    	 * @return
    	 * @throws Exception
    	 * @see com.gwtjs.struts.BaseAction#execute()
    	 */
    	@Override
    	@Action(value = "findProvince", results = {@Result(name = "success", type = "json")})
    	public String execute() throws Exception 
    	{
    		list = provinceService.findArea(provinceCode, cityCode, countyCode);
    		return SUCCESS;
    	}
    
    	/**
    	 * @return the provinceCode
    	 */
    	public String getProvinceCode() {
    		return provinceCode;
    	}
    
    	/**
    	 * @param provinceCode the provinceCode to set
    	 */
    	public void setProvinceCode(String provinceCode) {
    		this.provinceCode = provinceCode;
    	}
    
    	/**
    	 * @return the cityCode
    	 */
    	public String getCityCode() {
    		return cityCode;
    	}
    
    	/**
    	 * @param cityCode the cityCode to set
    	 */
    	public void setCityCode(String cityCode) {
    		this.cityCode = cityCode;
    	}
    
    	/**
    	 * @return the countyCode
    	 */
    	public String getCountyCode() {
    		return countyCode;
    	}
    
    	/**
    	 * @param countyCode the countyCode to set
    	 */
    	public void setCountyCode(String countyCode) {
    		this.countyCode = countyCode;
    	}
    
    	/**
    	 * @return the list
    	 */
    	public List<Province> getList() {
    		return list;
    	}
    
    	/**
    	 * @param list the list to set
    	 */
    	public void setList(List<Province> list) {
    		this.list = list;
    	}
    	
    }
    


  • 相关阅读:
    poj1860 Currency Exchange
    poj1062 昂贵的聘礼
    CF811C Vladik and Memorable Trip
    vs2012 jsoncpp 链接错误
    poj1923 Fourier's Lines
    excel中的表格转换成word中表格
    C:Program FilesMSBuildMicrosoft.Cppv4.0V110Microsoft.CppCommon.targets(249,5): error MSB6006: “CL.exe”已退出,代码为 -1073741515。
    poj1129 Channel Allocation
    POJ 2771 Guardian of Decency(求最大点独立集)
    POJ 1724 Roads
  • 原文地址:https://www.cnblogs.com/yxwkf/p/4023940.html
Copyright © 2011-2022 走看看