jquery为下拉框添加option(2)
来源:未知 责任编辑:责任编辑 发表时间:2015-03-01 01:36 点击:次
import com.aegon_cnooc.framework.base.action.BaseAction;
import com.aegon_cnooc.framework.log.Log;
import com.aegon_cnooc.oa.admin.service.LoginService;
import com.aegon_cnooc.util.LogPathUtil;
/**
*
* @Despcrition:
* @Author: liuxinghui
* @Version: 1.0
* @CreateDate: Jul 12, 2011
*/
public class OnloadEmployeeAction extends BaseAction{
private LoginService loginService;
Log logWrite=new Log();
/**
* 组织架构定义中点击单选按钮获得相应的员工
*/
public ActionForward executeAction(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
logWrite.writeLog(LogPathUtil.getPath(), "start OnloadEmployeeAction...", "info");
String employeeType=request.getParameter("employee_type");
if("all".equals(employeeType)){
//Employees all of company
List employeesAllOfCompany=loginService.getEmployeesAllOfCompany();
logWrite.writeLog(LogPathUtil.getPath(), "Load employeesAllOfCompany employeesAllOfCompany.size():"+employeesAllOfCompany.size(), "info");
JSONArray json = (JSONArray)JSONSerializer.toJSON(employeesAllOfCompany);
response.setContentType("application/json;charset=gbk");
response.setCharacterEncoding("gbk");
PrintWriter pw = response.getWriter();
pw.write(JSONUtils.valueToString(json));
pw.flush();
}else{
//Employees not belong to any groupp
List employeeNotBelongToAnyGroup=loginService.getEmployeesNotBelongToAnyGroup();
logWrite.writeLog(LogPathUtil.getPath(), "Load employeeNotBelongToAnyGroup employeeNotBelongToAnyGroup.size():"+employeeNotBelongToAnyGroup.size(), "info");
JSONArray json = (JSONArray)JSONSerializer.toJSON(employeeNotBelongToAnyGroup);
相关新闻>>
- 发表评论
-
- 最新评论 更多>>