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


Java EvaluationException类代码示例

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


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


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