testauth.tag

来自「某石油系统正在使用的实时报表平台系统」· TAG 代码 · 共 34 行

TAG
34
字号
<%@ tag body-content="empty" %>
<%@ attribute name="auth" required="true" %>
<%@ attribute name="privilege" required="true" %>
<%@ attribute name="truestring" required="true" %>
<%@ attribute name="falsestring" required="false" %>

<%@ include file="/Components/tourFunLibs.jsp" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<c:set var="result" value="NULL" />

<%
	String result = "null";
	
	boolean testResult;
	try
	{
		testResult = tflHasAuth((char)Integer.parseInt(auth), privilege);
	}
	catch(Exception e)
	{
		testResult = false;
	}

	if ( testResult )
		result = truestring;
	else
		if (falsestring!=null)
			result=falsestring;
		
	jspContext.setAttribute("result", result);
%>

<c:out value="${result}" />

⌨️ 快捷键说明

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