Package com.interceptor.organization

Source Code of com.interceptor.organization.DeptJobListInterceptor

package com.interceptor.organization;

import java.util.*;

import com.db.organization.*;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.*;

@SuppressWarnings("serial")
public class DeptJobListInterceptor extends AbstractInterceptor{
  private List<JobVO> jlist;
  private List<DeptVO> dlist;
  private DeptJobDAO orgDAO;
 
  public void setOrgDAO(DeptJobDAO orgDAO) {
    this.orgDAO = orgDAO;
  }

  @Override
  public String intercept(ActionInvocation invoc) throws Exception {
    String result = "";
    try {
      jlist = orgDAO.getJobList();
      dlist = orgDAO.getDeptList();     
      ActionContext ac = ActionContext.getContext();
      Map<String, List> orgMap = ac.getParameters();
      orgMap.put("jlist", jlist);
      orgMap.put("dlist", dlist);
     
      result = "success";
    } catch (Exception e) {
      System.out.println("DeptJobInterceptor.intercept():"+e.toString());
      result = "error";
    }
    return result;
  }
}
TOP

Related Classes of com.interceptor.organization.DeptJobListInterceptor

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.