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


Java EvaluationException.getCause方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: getType

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


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