Ztree implements three levels of action

Source: Internet
Author: User

Ztree implements three levels of 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;}}


Ztree implements three levels of action

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.