本文整理汇总了Java中org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager类的典型用法代码示例。如果您正苦于以下问题:Java ExpressionEvaluatorManager类的具体用法?Java ExpressionEvaluatorManager怎么用?Java ExpressionEvaluatorManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ExpressionEvaluatorManager类属于org.apache.taglibs.standard.lang.support包,在下文中一共展示了ExpressionEvaluatorManager类的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: doEvaluate
import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
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);
}
}
示例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: setId
import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager; //导入依赖的package包/类
public void setId(String id) {
this.id = id;
if (id != null && id.startsWith("${") && id.endsWith("}")) {
try {
this.id = (String) ExpressionEvaluatorManager.evaluate("id",
id, Object.class, this, pageContext);
} catch (JspException e) {
e.printStackTrace();
throw new RuntimeException("setId fail.");
}
}
}
示例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: setCssClass
import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager; //导入依赖的package包/类
public void setCssClass(String cssClass) throws JspException {
this.cssClass = cssClass;
if (cssClass != null && cssClass.startsWith("${")
&& cssClass.endsWith("}")) {
this.cssClass = (String) ExpressionEvaluatorManager.evaluate(
"cssClass", cssClass, 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: setDisabled
import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager; //导入依赖的package包/类
public void setDisabled(String disabled) throws JspException {
this.disabled = disabled;
if (disabled != null && disabled.startsWith("${")
&& disabled.endsWith("}")) {
this.disabled = (String) ExpressionEvaluatorManager.evaluate(
"disabled", disabled, Object.class, this, pageContext);
}
}
示例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: setOnblur
import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager; //导入依赖的package包/类
public void setOnblur(String onblur) throws JspException {
this.onblur = onblur;
if (onblur != null && onblur.startsWith("${") && onblur.endsWith("}")) {
this.onblur = (String) ExpressionEvaluatorManager.evaluate(
"onblur", onblur, 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);
}
}