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