⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 command.java

📁 企业进销存源码
💻 JAVA
字号:
package com.web.tag;

import javax.servlet.jsp.tagext.*;
import javax.servlet.jsp.*;

import com.business.*;
import com.business.vo.*;
import com.web.util.StringUtil;



import java.util.*;

import java.io.*;
/**
 * 
 *
 * To change this generated comment edit the template variable "typecomment":
 * Window>Preferences>Java>Templates.
 * To enable and disable the creation of type comments go to
 * Window>Preferences>Java>Code Generation.
 */
public class Command extends TagSupport {
	private String name = "";
	private String roleCode = "";
	private String resourceCode = "";
	private String formName = "";
	public int doStartTag() throws JspException { 
		try {
			JspWriter out = pageContext.getOut();
			RoleResBusiness bs = new RoleResBusiness();
			ResourceOperBusiness obs = new ResourceOperBusiness();
			RoleRes vo = bs.findEntityByRoleIdResId(roleCode,resourceCode);
			
			if(vo!=null&&vo.getOperate()!=null&&!vo.getOperate().equals("")){
				String[] operIdArray = StringUtil.split(vo.getOperate(),",");
				if(operIdArray!=null){
					CustomOper oper = null;
					out.println("<td align=right>");
					for(int i=0;i<operIdArray.length;i++){
						oper = obs.findEntity("operId",operIdArray[i]);
						out.println("<input type=button class=btn3_mouseout onmouseover=\"this.className='btn3_mouseover'\" onmouseout=\"this.className='btn3_mouseout'\" onclick=\""+oper.getOperAction()+"\" value="+oper.getOperName()+">");
					}out.println("</td>");
				}
			}
			

		} catch (Exception e) {
			throw new JspException(e.toString());
		}

		return EVAL_BODY_INCLUDE;
	}

	public int doEndTag() throws JspException {
		return EVAL_PAGE;
	}

	/**
	 * Returns the formName.
	 * @return String
	 */
	public String getFormName() {
		return formName;
	}

	/**
	 * Sets the formName.
	 * @param formName The formName to set
	 */
	public void setFormName(String formName) {
		this.formName = formName;
	}

	/**
	 * Returns the resourceCode.
	 * @return String
	 */
	public String getResourceCode() {
		return resourceCode;
	}

	/**
	 * Returns the roleCode.
	 * @return String
	 */
	public String getRoleCode() {
		return roleCode;
	}

	/**
	 * Sets the resourceCode.
	 * @param resourceCode The resourceCode to set
	 */
	public void setResourceCode(String resourceCode) {
		this.resourceCode = resourceCode;
	}

	/**
	 * Sets the roleCode.
	 * @param roleCode The roleCode to set
	 */
	public void setRoleCode(String roleCode) {
		this.roleCode = roleCode;
	}

	/**
	 * Returns the name.
	 * @return String
	 */
	public String getName() {
		return name;
	}

	/**
	 * Sets the name.
	 * @param name The name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -