当前位置: 首页>>代码示例>>Java>>正文


Java ExpressionEvaluatorManager.evaluate方法代码示例

本文整理汇总了Java中org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager.evaluate方法的典型用法代码示例。如果您正苦于以下问题:Java ExpressionEvaluatorManager.evaluate方法的具体用法?Java ExpressionEvaluatorManager.evaluate怎么用?Java ExpressionEvaluatorManager.evaluate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager的用法示例。


在下文中一共展示了ExpressionEvaluatorManager.evaluate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doEvaluate

import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager; //导入方法依赖的package包/类
@SuppressWarnings("rawtypes")
protected Object doEvaluate(String expression, Class expectedType, javax.servlet.jsp.el.FunctionMapper functionMapper)
		throws javax.servlet.jsp.el.ELException {

	if (functionMapper != null) {
		throw new IllegalArgumentException("Custom FunctionMapper not supported");
	}
	try {
		return ExpressionEvaluatorManager.evaluate("JSP EL expression", expression, expectedType, this.pageContext);
	}
	catch (JspException ex) {
		throw new javax.servlet.jsp.el.ELException("Parsing of JSP EL expression \"" + expression + "\" failed", ex);
	}
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:15,代码来源:MockExpressionEvaluator.java

示例2: doStartTag

import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager; //导入方法依赖的package包/类
public int doStartTag()
throws JspTagException, JspException
{
	Object val = null;

	if (mVar.indexOf("$") > -1)
		{
			val = ExpressionEvaluatorManager.evaluate("thing", mVar, Object.class, this, pageContext);
		}
	else
		{
			val = pageContext.findAttribute(mVar);
		}

	String partial = retrievePartial(val);

	HttpServletRequest req = (HttpServletRequest) pageContext.getRequest();
	HttpServletResponse resp = (HttpServletResponse) pageContext.getResponse();

	try
		{
			pageContext.getOut().print(resp.encodeURL(req.getContextPath() + partial));
		}
	catch (IOException e)
		{
			throw new JspTagException("URLTag: " + e.getMessage());
		}

	return SKIP_BODY;
}
 
开发者ID:iwethey,项目名称:iwethey,代码行数:31,代码来源:URLTag.java

示例3: doEvaluate

import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager; //导入方法依赖的package包/类
protected Object doEvaluate(
		String expression, Class expectedType, FunctionMapper functionMapper)
		throws ELException {

	if (functionMapper != null) {
		throw new IllegalArgumentException("Custom FunctionMapper not supported");
	}
	try {
		return ExpressionEvaluatorManager.evaluate("JSP EL expression", expression, expectedType, this.pageContext);
	}
	catch (JspException ex) {
		throw new ELException("Parsing of JSP EL expression \"" + expression + "\" failed", ex);
	}
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:15,代码来源:MockExpressionEvaluator.java

示例4: setLanguage

import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager; //导入方法依赖的package包/类
public void setLanguage(String language) throws JspException {
	this.language = language;
	if (language != null && language.startsWith("${")
			&& language.endsWith("}")) {
		this.language = (String) ExpressionEvaluatorManager.evaluate(
				"language", language, Object.class, this, pageContext);
	}
}
 
开发者ID:wangzijian777,项目名称:contentManager,代码行数:9,代码来源:CodeTag.java

示例5: evaluatePortletId

import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager; //导入方法依赖的package包/类
/**
 * Evaluates the portlet ID attribute passed into this tag. This method
 * evaluates the member variable <code>portletId</code> and saves the
 * evaluated result to <code>evaluatedPortletId</code>
 * @throws JspException  if an error occurs.
 */
private void evaluatePortletId() throws JspException {
    Object obj = ExpressionEvaluatorManager.evaluate(
            "portletId", portletId, String.class, this, pageContext);
    if (LOG.isDebugEnabled()) {
        LOG.debug("Evaluated portletId to: " + obj);
    }
    evaluatedPortletId = (String) obj;
}
 
开发者ID:apache,项目名称:portals-pluto,代码行数:15,代码来源:PortletModeAnchorTag.java

示例6: evaluatePortletId

import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager; //导入方法依赖的package包/类
/**
 * Evaluates the portlet ID attribute passed into this tag. This method
 * evaluates the member variable <code>portletId</code> and saves the
 * evaluated result to <code>evaluatedPortletId</code>
 * @throws JspException  if an error occurs.
 */
private void evaluatePortletId() throws JspException {
    Object obj = ExpressionEvaluatorManager.evaluate(
            "portletId", portletId, String.class, this, pageContext);
    if (LOG.isTraceEnabled()) {
        LOG.debug("Evaluated portletId to: " + obj);
    }
    evaluatedPortletId = (String) obj;
}
 
开发者ID:apache,项目名称:portals-pluto,代码行数:15,代码来源:PortletWindowStateAnchorTag.java

示例7: setSelected

import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager; //导入方法依赖的package包/类
public void setSelected(String selected) {
  try {
    this.selected = (String) ExpressionEvaluatorManager.evaluate("selected", selected, String.class, this, pageContext);
  } catch (JspException e) {
    Logger.warn("unable to evaluate expression", e);
  }
}
 
开发者ID:thinkberg,项目名称:snipsnap,代码行数:8,代码来源:PathSelectorTag.java

示例8: setAccesskey

import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager; //导入方法依赖的package包/类
public void setAccesskey(String accesskey) throws JspException {
	this.accesskey = accesskey;
	if (accesskey != null && accesskey.startsWith("${")
			&& accesskey.endsWith("}")) {
		this.accesskey = (String) ExpressionEvaluatorManager.evaluate(
				"accesskey", accesskey, Object.class, this, pageContext);
	}
}
 
开发者ID:wangzijian777,项目名称:contentManager,代码行数:9,代码来源:ItemTag.java

示例9: setCodeType

import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager; //导入方法依赖的package包/类
public void setCodeType(String codeType) throws JspException {
	this.codeType = codeType;
	if (codeType != null && codeType.startsWith("${")
			&& codeType.endsWith("}")) {
		this.codeType = (String) ExpressionEvaluatorManager.evaluate(
				"codeType", codeType, Object.class, this, pageContext);
	}
}
 
开发者ID:wangzijian777,项目名称:contentManager,代码行数:9,代码来源:CodeTag.java

示例10: setCssStyle

import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager; //导入方法依赖的package包/类
public void setCssStyle(String cssStyle) throws JspException {
	this.cssStyle = cssStyle;
	if (cssStyle != null && cssStyle.startsWith("${")
			&& cssStyle.endsWith("}")) {
		this.cssStyle = (String) ExpressionEvaluatorManager.evaluate(
				"cssStyle", cssStyle, Object.class, this, pageContext);
	}
}
 
开发者ID:wangzijian777,项目名称:contentManager,代码行数:9,代码来源:ItemTag.java

示例11: setSnip

import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager; //导入方法依赖的package包/类
public void setSnip(String snip) {
  try {
    this.snip = (Snip) ExpressionEvaluatorManager.evaluate("snip", snip, Snip.class, this, pageContext);
  } catch (JspException e) {
    Logger.warn("unable to evaluate expression", e);
  }
}
 
开发者ID:thinkberg,项目名称:snipsnap,代码行数:8,代码来源:SnipLinkTag.java

示例12: setName

import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager; //导入方法依赖的package包/类
public void setName(String name) throws JspException {
	this.name = name;
	if (name != null && name.startsWith("${") && name.endsWith("}")) {
		this.name = (String) ExpressionEvaluatorManager.evaluate("name",
				name, Object.class, this, pageContext);
	}
}
 
开发者ID:wangzijian777,项目名称:contentManager,代码行数:8,代码来源:ItemTag.java

示例13: setRiskCode

import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager; //导入方法依赖的package包/类
public void setRiskCode(String riskCode) throws JspException {
	this.riskCode = riskCode;
	if (riskCode != null && riskCode.startsWith("${")
			&& riskCode.endsWith("}")) {
		this.riskCode = (String) ExpressionEvaluatorManager.evaluate(
				"riskCode", riskCode, Object.class, this, pageContext);
	}
}
 
开发者ID:wangzijian777,项目名称:contentManager,代码行数:9,代码来源:CodeSelectTag.java

示例14: setOnchange

import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager; //导入方法依赖的package包/类
public void setOnchange(String onchange) throws JspException {
	this.onchange = onchange;
	if (onchange != null && onchange.startsWith("${")
			&& onchange.endsWith("}")) {
		this.onchange = (String) ExpressionEvaluatorManager.evaluate(
				"onchange", onchange, Object.class, this, pageContext);
	}
}
 
开发者ID:wangzijian777,项目名称:contentManager,代码行数:9,代码来源:ItemTag.java

示例15: setOnclick

import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager; //导入方法依赖的package包/类
public void setOnclick(String onclick) throws JspException {
	this.onclick = onclick;
	if (onclick != null && onclick.startsWith("${")
			&& onclick.endsWith("}")) {
		this.onclick = (String) ExpressionEvaluatorManager.evaluate(
				"onclick", onclick, Object.class, this, pageContext);
	}
}
 
开发者ID:wangzijian777,项目名称:contentManager,代码行数:9,代码来源:ItemTag.java


注:本文中的org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager.evaluate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。