/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.yuntong.action.ajaxaction;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.yuntong.business.vo.Y_CueInfoVO;

/** 
 * MyEclipse Struts
 * Creation date: 04-16-2007
 * 得到提示信息
 * XDoclet definition:
 * @struts.action validate="true"
 */
public class Y_getInfoAction extends Action {
	
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) throws IOException {
		response.setContentType("text/xml");
		PrintWriter out = response.getWriter();
		String strid=request.getParameter("infoid");
		if(strid==""){
			return null;
		}		
		HttpSession session=request.getSession();
		List list=(List) session.getAttribute("Y_shubiaotishi");
		//条件判断
		for (int i = 0; i < list.size(); i++) {
			if(((Y_CueInfoVO)(list.get(i))).getCueName().equals(strid)){
				out.print(((Y_CueInfoVO)(list.get(i))).getCueInfo());
			}
		}		
		out.close();
		return null;
	}
}