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