您现在的位置:主页 > 技术中心 > WEB编程 > JavaScript

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); 
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:点击我更换图片

推荐热点

  • Gb2312转utf-8编码的方法(vbs+js)
  • 如何使用Ajax技术开发Web应用程序(1)
  • js跳转路径问题
  • JavaScript模仿桌面窗口
  • 用js检测两个线段是否相交
  • 运用JavaScript构建你的第一个Metro式应用程序(o
  • 我知道的JavaScript -- 设计模式(桥接)应用之 – 验
  • 我是如何去了解jquery的(六),案例之幻灯片轮换
  • Jquery封装幻灯片效果
?? - ?? - ÝřŝžľŘÝź - TAGąęÇŠ - RSSśŠÔÄ - ??
Copyright © 2004-2024 上海卓卓网络科技有限公司