radio控制对应select
?ActionSendMessage
package cn.ict.mp.webservice;import com.opensymphony.xwork2.ActionSupport;public class ActionSendMessage extends ActionSupport {/** * */private static final long serialVersionUID = -6652169340293756648L; private String title; private String content; private String url; private String equipmentRange; private String sendRange; private String radio; private String select; private String markUser; private String personal; private String area; public String getTitle() {return title;} public void setTitle(String title) {this.title = title;} public String getContent() {return content;} public void setContent(String content) {this.content = content;} public String getUrl() {return url;} public void setUrl(String url) {this.url = url;} public String getEquipmentRange() {return equipmentRange;} public void setEquipmentRange(String equipmentRange) {this.equipmentRange = equipmentRange;} public String getSendRange() {return sendRange;} public void setSendRange(String sendRange) {this.sendRange = sendRange;} public static long getSerialversionuid() {return serialVersionUID;}public String getRadio() {return radio;}public void setRadio(String radio) {this.radio = radio;}public String getSelect() {return select;}public void setSelect(String select) {this.select = select;}public String getMarkUser() {return markUser;}public void setMarkUser(String markUser) {this.markUser = markUser;}public String getPersonal() {return personal;}public void setPersonal(String personal) {this.personal = personal;}public String getArea() {return area;}public void setArea(String area) {this.area = area;}public String execute() throws Exception { System.out.println("标题---------- "+title); System.out.println("通知内容---------- "+content); System.out.println("url地址--------- "+url); System.out.println("设备范围---------"+equipmentRange); if(radio != null){ if(radio.equals("所有人")) { radio = "all"; sendRange = radio; } else if(radio.equals("标签用户")) { radio = "mark"; if(markUser.equals("员工")) { markUser = "markUser1"; } else if(markUser.equals("班长")) { markUser = "markUser2"; } else if(markUser.equals("领导")) { markUser = "markUser3"; } sendRange = radio +":"+ markUser; } else if(radio.equals("个人")) { radio = "personal"; sendRange = radio +":"+ personal; } else if(radio.equals("区域")) { radio = "area"; if(area.equals("北翼基站")){ area = "area1"; } else if(area.equals("南翼基站")){ area = "area2"; } else if(area.equals("地面基站")){ area = "area3"; } sendRange = radio +":"+ area; } System.out.println("发送范围------------"+sendRange); } return SUCCESS;}}
?