本文整理汇总了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);
}
}
示例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;
}
示例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);
}
}
示例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);
}
}
示例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;
}
示例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;
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}