package weber_4_0_sample.org.itscool.ajax;

import org.itscool.weber.action.Action;
import org.itscool.weber.action.ActionBucket;
import org.itscool.weber.controller.Globals;

public class AjaxSampleAction extends Action {
    public String doExecute(ActionBucket bucket)throws Exception{
        String emp_no = (String)getParameter("emp_no");
        String emp_name = "該当なし";
        
        if( emp_no.equals("0000")){
            emp_name="太郎";
        }else if( emp_no.equals("0001")){
            emp_name="加納";
        }else if( emp_no.equals("0002")){
            emp_name="hanako";
        }
        System.out.println(emp_name);
        bucket.print(emp_name);
        
        return Globals.RET_NOFORWARD;
    }
}
