• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java EvaluationException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中javax.faces.el.EvaluationException的典型用法代码示例。如果您正苦于以下问题:Java EvaluationException类的具体用法?Java EvaluationException怎么用?Java EvaluationException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



EvaluationException类属于javax.faces.el包,在下文中一共展示了EvaluationException类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: resolveVariable

import javax.faces.el.EvaluationException; //导入依赖的package包/类
@Override
public Object resolveVariable(FacesContext facesContext, String varName)throws EvaluationException {
	IGuicer guicer = Guicer.getInstance(Activator.bundle);

	Object o = null;

	//create instance standard jsf/xpage way.
	o = resolver.resolveVariable(facesContext, varName);
	
	//if the object belongs to com.tc.websocket, attempt to inject the object if needed
	if(o!=null && o.getClass().getName().startsWith(TARGET_PACKAGE)){
		guicer.inject(o);
	}

	return o;
}
 
开发者ID:mwambler,项目名称:xockets.io,代码行数:17,代码来源:GuiceVariableResolver.java


示例2: getManagedBean

import javax.faces.el.EvaluationException; //导入依赖的package包/类
/**
 * Return a JSF managed bean reference.
 * 
 * @param fc      FacesContext
 * @param name    Name of the managed bean to return
 * 
 * @return the managed bean or null if not found
 */
public static Object getManagedBean(FacesContext fc, String name)
{
   Object obj = null;
   
   try
   {
      ValueBinding vb = fc.getApplication().createValueBinding("#{" + name + "}");
      obj = vb.getValue(fc);
   }
   catch (EvaluationException ee)
   {
      // catch exception to resolve ADB-158/ACT-7343
      // not much we can do here, just make sure return is null
      if (logger.isDebugEnabled())
          logger.debug("Failed to resolve managed bean: " + name, ee);
      obj = null;
   }
   
   return obj;
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:29,代码来源:FacesHelper.java


示例3: processActionMethod

import javax.faces.el.EvaluationException; //导入依赖的package包/类
/**
 * Invoke the method encapsulated by the supplied MethodBinding
 * 
 * @param context    FacesContext
 * @param method     MethodBinding to invoke
 * @param event      ActionEvent to pass to the method of signature:
 *                   public void myMethodName(ActionEvent event)
 */
public static void processActionMethod(FacesContext context, MethodBinding method, ActionEvent event)
{
   try
   {
      method.invoke(context, new Object[] {event});
   }
   catch (EvaluationException e)
   {
      Throwable cause = e.getCause();
      if (cause instanceof AbortProcessingException)
      {
         throw (AbortProcessingException)cause;
      }
      else
      {
         throw e;
      }
   }   
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:28,代码来源:Utils.java


示例4: invoke

import javax.faces.el.EvaluationException; //导入依赖的package包/类
@Override
public Object invoke(FacesContext context, Object[] params) throws EvaluationException, MethodNotFoundException {

    String forId = getFor();
    UIInPlaceForm inPlaceForm = findNonNullInPlaceForm(forId);

    String action = getFormAction();

    if (StringUtil.equals(action, ACTION_SHOW)) {
            inPlaceForm.show();
    } else if (StringUtil.equals(action, ACTION_HIDE)) {
        	inPlaceForm.hide();
    }
    else {
    		inPlaceForm.toggle();
    }

    return null; // do not move to a different page
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:20,代码来源:InPlaceFormAction.java


示例5: resolveVariable

import javax.faces.el.EvaluationException; //导入依赖的package包/类
@Override
public Object resolveVariable(FacesContext facesContext, String varName)throws EvaluationException {
	IGuicer guicer = Guicer.getInstance(Activator.BUNDLE);

	Object o = null;

	//create instance standard jsf/xpage way.
	o = resolver.resolveVariable(facesContext, varName);
	
	//if the object belongs to com.tc.websocket, attempt to inject the object if needed
	if(o!=null && o.getClass().getName().startsWith(TARGET_PACKAGE)){
		guicer.inject(o);
	}

	return o;
}
 
开发者ID:mwambler,项目名称:webshell-xpages-ext-lib,代码行数:17,代码来源:GuiceVariableResolver.java


示例6: invoke

import javax.faces.el.EvaluationException; //导入依赖的package包/类
public Object invoke(FacesContext context, Object[] params) 
{
  try
  {
    return _expression.invoke(context.getELContext(), params);
  }
  // Convert EL exceptions into EvaluationExceptions
  catch (ELException ee)
  {
    throw new EvaluationException(ee.getMessage(), ee.getCause());
  }
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:13,代码来源:MethodExpressionMethodBinding.java


示例7: invoke

import javax.faces.el.EvaluationException; //导入依赖的package包/类
public Object invoke(ELContext elContext, Object[] params)
{
  try
  {
    return _binding.invoke(FacesContext.getCurrentInstance(), params);
  }
  // Convert EvaluationExceptions into ELExceptions
  catch (EvaluationException ee)
  {
    throw new ELException(ee.getMessage(), ee.getCause());
  }
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:13,代码来源:MethodBindingMethodExpression.java


示例8: invoke

import javax.faces.el.EvaluationException; //导入依赖的package包/类
public Object invoke(FacesContext facesContext, Object[] params)
{
  try
  {
    return _me.invoke(facesContext.getELContext(), params);
  }
  // Convert EL exceptions into EvaluationExceptions
  catch (ELException ee)
  {
    throw new EvaluationException(ee.getMessage(), ee.getCause());
  }
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:13,代码来源:MethodExpressionMethodBinding.java


示例9: broadcastToMethodBinding

import javax.faces.el.EvaluationException; //导入依赖的package包/类
/**
 * Broadcast an event to a MethodBinding.
 * This can be used to support MethodBindings such as the "actionListener"
 * binding on ActionSource components:
 * <tr:commandButton actionListener="#{mybean.myActionListener}">
 * @deprecated
 */
protected final void broadcastToMethodBinding(
  FacesEvent event,
  MethodBinding method) throws AbortProcessingException
{
  if (method != null)
  {
    try
    {
      FacesContext context = getFacesContext();
      method.invoke(context, new Object[] { event });
    }
    catch (EvaluationException ee)
    {
      // Checking for AbortProcessingExceptions, and unwrapping
      // it if the underlying exception is AbortProcessingExceptions.
      Throwable currentThrowable = ee.getCause();
      while (currentThrowable != null)
      {
        if (currentThrowable instanceof AbortProcessingException)
        {
          throw ((AbortProcessingException)currentThrowable);
        }
        currentThrowable = currentThrowable.getCause();
      }
      throw ee;
    }
  }
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:36,代码来源:UIXComponentBase.java


示例10: getValue

import javax.faces.el.EvaluationException; //导入依赖的package包/类
@SuppressWarnings("deprecation")
public Object getValue(FacesContext facesContext)
{
  try
  {
    return _ve.getValue(facesContext.getELContext());
  }
  // Convert EL exceptions into EvaluationExceptions
  catch (ELException ee)
  {
    throw new EvaluationException(ee.getMessage(), ee.getCause());
  }    
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:14,代码来源:ValueExpressionValueBinding.java


示例11: setValue

import javax.faces.el.EvaluationException; //导入依赖的package包/类
@SuppressWarnings("deprecation")
public void setValue(FacesContext facesContext, Object object)
{
  try
  {
    _ve.setValue(facesContext.getELContext(), object);
  }
  // Convert EL exceptions into EvaluationExceptions
  catch (ELException ee)
  {
    throw new EvaluationException(ee.getMessage(), ee.getCause());
  }    
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:14,代码来源:ValueExpressionValueBinding.java


示例12: isReadOnly

import javax.faces.el.EvaluationException; //导入依赖的package包/类
@SuppressWarnings("deprecation")
public boolean isReadOnly(FacesContext facesContext)
{
  try
  {
    return _ve.isReadOnly(facesContext.getELContext());
  }
  // Convert EL exceptions into EvaluationExceptions
  catch (ELException ee)
  {
    throw new EvaluationException(ee.getMessage(), ee.getCause());
  }    
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:14,代码来源:ValueExpressionValueBinding.java


示例13: getType

import javax.faces.el.EvaluationException; //导入依赖的package包/类
@SuppressWarnings("deprecation")
public Class getType(FacesContext facesContext)
{
  try
  {
    return _ve.getType(facesContext.getELContext());
  }
  // Convert EL exceptions into EvaluationExceptions
  catch (ELException ee)
  {
    throw new EvaluationException(ee.getMessage(), ee.getCause());
  }
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:14,代码来源:ValueExpressionValueBinding.java


示例14: getValue

import javax.faces.el.EvaluationException; //导入依赖的package包/类
@SuppressWarnings("deprecation")
public Object getValue(ELContext elContext)
{
  try
  {
    return _binding.getValue(FacesContext.getCurrentInstance());
  }
  // Convert EvaluationExceptions into ELExceptions
  catch (EvaluationException ee)
  {
    throw new ELException(ee.getMessage(), ee.getCause());
  }
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:14,代码来源:ValueBindingValueExpression.java


示例15: setValue

import javax.faces.el.EvaluationException; //导入依赖的package包/类
@SuppressWarnings("deprecation")
public void setValue(ELContext elContext, Object object)
{
  try
  {
    _binding.setValue(FacesContext.getCurrentInstance(), object);
  }
  // Convert EvaluationExceptions into ELExceptions
  catch (EvaluationException ee)
  {
    throw new ELException(ee.getMessage(), ee.getCause());
  }
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:14,代码来源:ValueBindingValueExpression.java


示例16: isReadOnly

import javax.faces.el.EvaluationException; //导入依赖的package包/类
@SuppressWarnings("deprecation")
public boolean isReadOnly(ELContext elContext)
{
  try
  {
    return _binding.isReadOnly(FacesContext.getCurrentInstance());
  }
  // Convert EvaluationExceptions into ELExceptions
  catch (EvaluationException ee)
  {
    throw new ELException(ee.getMessage(), ee.getCause());
  }
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:14,代码来源:ValueBindingValueExpression.java


示例17: getValue

import javax.faces.el.EvaluationException; //导入依赖的package包/类
@Override
public Object getValue(FacesContext context) throws EvaluationException, PropertyNotFoundException
{
  if (doNotCall)
    throw new AssertionFailedError("This method should not be called");

  return _createTableData();
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:9,代码来源:UIXTableTest.java


示例18: resolveVariable

import javax.faces.el.EvaluationException; //导入依赖的package包/类
/**
 * Resolves the variable with the given name.
 * <p>
 * This implementation will first delegate to the Spring variable resolver.
 * If the variable is not found by the Spring resolver and the variable name
 * is <code>Container</code> the current viewId is examined.
 * If the current viewId matches a configured dialog or wizard container 
 * the appropriate manager object is returned i.e. DialogManager or WizardManager.
 * 
 * @param context FacesContext
 * @param name The name of the variable to resolve
 */
public Object resolveVariable(FacesContext context, String name) 
   throws EvaluationException 
{
   Object variable = super.resolveVariable(context, name);
   
   if (variable == null)
   {
      // if the variable was not resolved see if the name is "Container"
      if (name.equals(CONTAINER))
      {
         // get the current view id and the configured dialog and wizard 
         // container pages
         String viewId = context.getViewRoot().getViewId();
         List<String> dialogContainers = getDialogContainers(context);
         List<String> wizardContainers = getWizardContainers(context);
         
         // see if we are currently in a wizard or a dialog
         if (dialogContainers.contains(viewId))
         {
            variable = Application.getDialogManager();
         }
         else if (wizardContainers.contains(viewId))
         {
            variable = Application.getWizardManager();   
         }
         
         if (variable != null && logger.isDebugEnabled())
         {
            logger.debug("Resolved 'Container' variable to: " + variable);
         }
      }
   }
   
   return variable;
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:48,代码来源:AlfrescoVariableResolver.java


示例19: resolveVariable

import javax.faces.el.EvaluationException; //导入依赖的package包/类
/**
 * Delegate to the original VariableResolver first, then try to
 * resolve the variable as Spring bean in the root WebApplicationContext.
 */
@Override
public Object resolveVariable(FacesContext facesContext, String name) throws EvaluationException {
	Object value = resolveOriginal(facesContext, name);
	if (value != null) {
		return value;
	}
	Object bean = resolveSpringBean(facesContext, name);
	if (bean != null) {
		return bean;
	}
	return null;
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:17,代码来源:DelegatingVariableResolver.java


示例20: resolveVariable

import javax.faces.el.EvaluationException; //导入依赖的package包/类
/**
 * Check for the special "webApplicationContext" variable first,
 * then delegate to the original VariableResolver.
 * <p>If no WebApplicationContext is available, all requests
 * will be delegated to the original VariableResolver.
 */
@Override
public Object resolveVariable(FacesContext context, String name) throws EvaluationException {
	Object value = null;
	if (WEB_APPLICATION_CONTEXT_VARIABLE_NAME.equals(name)) {
		value = getWebApplicationContext(context);
	}
	if (value == null) {
		value = getOriginalVariableResolver().resolveVariable(context, name);
	}
	return value;
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:18,代码来源:WebApplicationContextVariableResolver.java



注:本文中的javax.faces.el.EvaluationException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DefaultFilterChainManager类代码示例发布时间:2022-05-21
下一篇:
Java Activation类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap